public class TriangleSelection extends Object implements AnchorSelection, Releasable
Constructor and Description |
---|
TriangleSelection() |
Modifier and Type | Method and Description |
---|---|
void |
configure(Frame parent)
If this object is configurable, a dialog to configure the
object is shown.
|
void |
deriveLogFilename(int uid,
LaterationAlgorithm algorithm,
LocationFilter filter)
Sets information to derive a unique log filename.
|
void |
finalize() |
String |
getName()
Gets a readable name of the anchor selection algorithm for display reasons.
|
boolean |
isConfigurable()
Tests, if this object is configurable.
|
void |
reset()
Resets the anchor selection to initial state.
|
AnchorSelectionResult |
select(Point2d[] anchors,
double[] ranges,
Point2d lastLocation)
Do anchor selection.
|
AnchorSelectionResult |
select(Point2d[] anchors,
double[] ranges,
Point2d lastLocation,
long ts)
Do anchor selection.
|
void |
setLogFileName(File name) |
public String getName()
AnchorSelection
getName
in interface AnchorSelection
public void setLogFileName(File name)
public void deriveLogFilename(int uid, LaterationAlgorithm algorithm, LocationFilter filter)
AnchorSelection
The file name can consist of the UID only or may be extended by the algorithm and filter names.
deriveLogFilename
in interface AnchorSelection
uid
- Unique ID for the log file.algorithm
- Algorithm assigned with the UID.filter
- Location filter assigned with the UID or null
if
no filter is set.public AnchorSelectionResult select(Point2d[] anchors, double[] ranges, Point2d lastLocation)
AnchorSelection
The algorithm may not alter the input arrays!
select
in interface AnchorSelection
anchors
- Available anchors.ranges
- Measured distances to anchors.lastLocation
- The last calculated position or null
if not available.public AnchorSelectionResult select(Point2d[] anchors, double[] ranges, Point2d lastLocation, long ts)
AnchorSelection
The algorithm may not alter the input arrays!
select
in interface AnchorSelection
anchors
- Available anchors.ranges
- Measured distances to anchors.lastLocation
- The last calculated position or null
if not available.ts
- Timestamp in milliseconds.public void reset()
AnchorSelection
reset
in interface AnchorSelection
public boolean isConfigurable()
Configurable
isConfigurable
in interface Configurable
true
if this object is configurable;
false
otherwise.public void configure(Frame parent)
Configurable
configure
in interface Configurable
parent
- The parent frame of the new dialog.Copyright © 2012 Thomas Hillebrandt. All Rights Reserved.