public final class Trilateration2 extends BasicLaterationAlgorithm implements Releasable
Eigene Herleitung, etwas schneller.
Constructor and Description |
---|
Trilateration2() |
Modifier and Type | Method and Description |
---|---|
String |
getName()
Returns the name of the algorithm.
|
Point2d |
localize(Point2d[] anchors,
double[] ranges,
Point2d actualPosition,
ErrorModel errorModel,
int width,
int height)
Runs the localization algorithm and returns the estimated position.
|
String |
toString()
Returns a string representation of this lateration algorithm.
|
static Point2d |
trilaterate(Point2d[] anchors,
double[] ranges)
Static call to this lateration algorithm.
|
static Point2d |
trilaterate(Point2d v1,
double r1,
Point2d v2,
double r2,
Point2d v3,
double r3)
Static call to this lateration algorithm.
|
addRuntime, configure, evaluate, getAverageRuntime, getHistogramData, getLocalizationFailCount, getMaximumError, getMeanAbsoluteError, getMeanAbsoluteErrorPerAnchor, getMeanSquareError, getMeanSquareErrorMMSE, getRootMeanSquareError, getRootMeanSquareErrorMMSE, getStandardDeviation, isConfigurable, reset
public String getName()
LaterationAlgorithm
The name should not be too long, e.g. less than 20 chars.
getName
in interface LaterationAlgorithm
public Point2d localize(Point2d[] anchors, double[] ranges, Point2d actualPosition, ErrorModel errorModel, int width, int height)
LaterationAlgorithm
The size of the anchor and measured ranges array must be at least 3.
The actual position of the mobile node is passed to this method to allow the development of some sort of "cheating algorithm" which does some sort of optimum selection along a set of different algorithms.
The error model can be used by algorithms to determine the current average and maximum distance measurement error.
localize
in interface LaterationAlgorithm
anchors
- The anchor/reference nodes.ranges
- The measured distances to the anchor/reference nodes.actualPosition
- The actual location of the mobile node to be located.errorModel
- The current error model used for simulation or
null
if running with real data (no error
model available).width
- The width of the playing field used for simulation or
-1
if running with real data.height
- The height of the playing field used for simulation or
-1
if running with real data.null
if no position could be calculated, e.g.
localization failed.public String toString()
public static Point2d trilaterate(Point2d[] anchors, double[] ranges)
This might be useful if one is only interested in the result and not
the additional features of the BasicLaterationAlgorithm
class.
If more than 3 anchor nodes are passed to this method, the first three anchors will be taken for localization.
anchors
- The anchor/reference nodes.ranges
- The measured distances to the anchor/reference nodes.null
if no position could be calculated, e.g.
localization failed.public static Point2d trilaterate(Point2d v1, double r1, Point2d v2, double r2, Point2d v3, double r3)
This might be useful if one is only interested in the result and not
the additional features of the BasicLaterationAlgorithm
class.
v1
- The first anchor/reference node.r1
- The measured distance to the first anchor/reference node.v2
- The second anchor/reference node.r2
- The measured distance to the second anchor/reference node.v3
- The third anchor/reference node.r3
- The measured distance to the third anchor/reference node.null
if no position could be calculated, e.g.
localization failed.Copyright © 2012 Thomas Hillebrandt. All Rights Reserved.