public class PolynomialConversion extends AbstractDerivative
KEY_POLYNOM key for this behalf. Note
that averaging over data events (see DataFactory) is error-free as
long as the conversion polynom is linear.| Modifier and Type | Field and Description |
|---|---|
private static String |
DEFPOLYNOM
Default polynom.
|
private static DecimalFormat |
DEFVALUEFORMAT
The default decimal format for the values.
|
private static DecimalFormat |
DEFVALUESIGMA
The default deciaml format for the sigma of the values.
|
private Polynom |
invert
The polynom used to render raw values from physical ones.
|
static String |
KEY_INVERT
The key pointing to a comma-separated polynom-coefficient string.
|
static String |
KEY_POLYNOM
The key pointing to a comma-separated polynom-coefficient string.
|
private Polynom |
poly
The polynom used to render the physical value of the sensor.
|
KEY_VALUEDERIVATIVEKEY_UNIT, KEY_VALUEFORMAT, KEY_VALUESIGMAKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORCONFIG, KEY_CLASS| Constructor and Description |
|---|
PolynomialConversion(Map<String,String> prop)
Constructs a new polynomial conversion object.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getDeviation(double x,
double std)
Returns the value of the deviation of the physical value.
|
double |
getPhysical(double x)
Returns the polynomial approximation of the physical correct value.
|
double |
getPhysicalDerivative(double d1,
double raw)
Returns the value of the first derivative in physically meaningful
units.
|
double |
getRaw(double x)
Returns the polynomial approximation of the raw value.
|
double |
getRawDerivative(double d1,
double phys)
Returns the value of the first raw derivative.
|
getDerivativeValueFormatcreateConversion, getSigmaValueFormat, getUnit, getValueFormataugment, augment, augment, augment, augment, clone, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, initProperties, isNew, parseObject, parseObject, reload, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetSigmaValueFormat, getUnit, getValueFormatpublic static final transient String KEY_POLYNOM
public static final transient String KEY_INVERT
private static final transient String DEFPOLYNOM
private static final transient DecimalFormat DEFVALUEFORMAT
private static final transient DecimalFormat DEFVALUESIGMA
private final Polynom poly
private final Polynom invert
public double getDeviation(double x,
double std)
δf = dp(x)/dx * δx
x - The raw reading value.std - The standard deviation of the raw readings.public double getPhysical(double x)
x - The raw reading value.public double getRaw(double x)
public double getPhysicalDerivative(double d1,
double raw)
d1 - The numerical derivative from raw values.raw - The raw reading of the sensor.public double getRawDerivative(double d1,
double phys)
d1 - The physical quantity of the first derivative.phys - The physical quantity.