public interface ErrorModel extends Cloneable, Configurable
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Clone this error model (e.g. for performance reasons).
|
double |
getAverageError()
Gets the average error this model produced until this point in time.
|
double |
getMaximumAllowedError()
Gets the maximum error this model is allowed to produce.
|
double |
getMaximumError()
Gets the maximum error this model produced until this point in time.
|
String |
getName()
Returns the name of the error model.
|
double |
getOffset(double distance,
double pNlos)
Gets the distance offset in meters from this error model.
|
double |
getScaleFactor()
Get the scale factor (bias).
|
boolean |
isNegativeOffsetsEnabled()
Tests if negative distance offsets are enabled.
|
void |
reset()
Reset the error model to initial state (statistics).
|
void |
setMaximumAllowedError(double max)
Sets the maximum error this model is allowed to produce.
|
void |
setNegativeOffsetsEnabled(boolean b)
Enables or disables negative distance offsets.
|
void |
setScaleFactor(double bias)
Set the scale factor (bias).
|
configure, isConfigurable
String getName()
The name should not be too long, e.g. less than 20 chars.
Object clone()
null
if
cloning is not supported by error model.double getMaximumAllowedError()
void setMaximumAllowedError(double max)
This might be useful to cut off too large values produces by the error model, e.g. values larger than the radio range.
max
- The new maximum error.boolean isNegativeOffsetsEnabled()
true
if negative distance offsets are enabled;
false
otherwise.void setNegativeOffsetsEnabled(boolean b)
Note that the error model still must support negative offsets, not all do.
b
- true
if negative distance offsets should be used;
false
otherwise.double getScaleFactor()
void setScaleFactor(double bias)
Default value is 1
.
bias
- The new bias to set.double getOffset(double distance, double pNlos)
The real distance between reference node and mobile node might be used by a model to model some sort of NLOS probability if second parameter is not used by the model.
distance
- The real distance between reference node and mobile node
corresponding to the current measurement. Will be ignored
by most error models.pNlos
- The NLOS probability in range (0,1).double getAverageError()
double getMaximumError()
void reset()
Copyright © 2012 Thomas Hillebrandt. All Rights Reserved.