public class GeolaterationNO extends BasicLaterationAlgorithm implements Releasable
Copyright (c) 2011 Thomas Hillebrandt and Heiko Will. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are prohibited unless expressly permitted.
Modifier and Type | Field and Description |
---|---|
static int |
CENTER_OF_MASS
Final position estimation for GEO-N: center of mass
|
static int |
GEOMETRIC_MEDIAN
Final position estimation for GEO-N: geometric median
|
Constructor and Description |
---|
GeolaterationNO()
Create a new instance of
GeolaterationN
with default settings. |
GeolaterationNO(double medianFactor,
int finalPositionAlgorithm)
Create a new instance of
GeolaterationN . |
Modifier and Type | Method and Description |
---|---|
void |
configure(Frame parent)
If this object is configurable, a dialog to configure the
object is shown.
|
String |
getName()
Returns the name of the algorithm.
|
boolean |
isConfigurable()
Tests, if this object is configurable.
|
Point2d |
localize(Point2d[] anchors,
double[] ranges,
Point2d actualPosition,
ErrorModel errorModel,
int width,
int height)
Runs the localization algorithm and returns the estimated position.
|
static Point2d |
multilaterate(Point2d[] anchors,
double[] ranges,
boolean doApprox,
boolean doFilter1,
boolean doFilter1IncludeApprox,
int filter1Limit,
boolean doFilter2,
double medianFactor,
double weightRealIntersection,
double weightApproxIntersection,
int finalPositionAlgorithm)
Static call to this lateration algorithm.
|
void |
reset()
Resets all statistical metrics, counters and collected data.
|
String |
toString()
Returns a string representation of this lateration algorithm.
|
addRuntime, evaluate, getAverageRuntime, getHistogramData, getLocalizationFailCount, getMaximumError, getMeanAbsoluteError, getMeanAbsoluteErrorPerAnchor, getMeanSquareError, getMeanSquareErrorMMSE, getRootMeanSquareError, getRootMeanSquareErrorMMSE, getStandardDeviation
public static final int CENTER_OF_MASS
public static final int GEOMETRIC_MEDIAN
public GeolaterationNO()
GeolaterationN
with default settings.public GeolaterationNO(double medianFactor, int finalPositionAlgorithm)
GeolaterationN
.medianFactor
- Weighting factor for median filter.finalPositionAlgorithm
- Algorithm for final position estimation
after intersection building and filtering,
must be either CENTER_OF_MASS
or GEOMETRIC_MEDIAN
.public String getName()
LaterationAlgorithm
The name should not be too long, e.g. less than 20 chars.
getName
in interface LaterationAlgorithm
public void reset()
BasicLaterationAlgorithm
reset
in class BasicLaterationAlgorithm
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 boolean isConfigurable()
Configurable
isConfigurable
in interface Configurable
isConfigurable
in class BasicLaterationAlgorithm
true
if this object is configurable;
false
otherwise.public void configure(Frame parent)
Configurable
configure
in interface Configurable
configure
in class BasicLaterationAlgorithm
parent
- The parent frame of the new dialog.public static Point2d multilaterate(Point2d[] anchors, double[] ranges, boolean doApprox, boolean doFilter1, boolean doFilter1IncludeApprox, int filter1Limit, boolean doFilter2, double medianFactor, double weightRealIntersection, double weightApproxIntersection, int finalPositionAlgorithm)
This might be useful if one is only interested in the result and not
the additional features of the BasicLaterationAlgorithm
class.
anchors
- The anchor/reference nodes.ranges
- The measured distances to the anchor/reference nodes.doApprox
- Use approximation for circle intersections.doFilter1
- Use minimum circle containment filter.doFilter1IncludeApprox
- Filter also approximated circle intersections.filter1Limit
- Threshold for minimum circle containment filter.doFilter2
- Use median filter.medianFactor
- Weighting factor for median filter.weightRealIntersection
- Weight scale of real intersection point.weightApproxIntersection
- Weight scale of approximated intersection point.finalPositionAlgorithm
- Algorithm for final position estimation
after intersection building and filtering,
must be either CENTER_OF_MASS
or GEOMETRIC_MEDIAN
.null
if no position could be calculated, e.g.
localization failed.Copyright © 2012 Thomas Hillebrandt. All Rights Reserved.