stella.sensor
Class DewPointConvert
java.lang.Object
util.PropertyContainer
util.PropertyResources
util.PropertyBundles
stella.sensor.AbstractConversion
stella.sensor.DewPointConvert
- All Implemented Interfaces:
- Serializable, Cloneable, ConvertToPhysical, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying
public class DewPointConvert
- extends AbstractConversion
The helper class to convert dew-point offsets in degrees centigrade to
true temperatures in centigrades. To make this work under the general
ConvertToPhysical contract, some dirty tricks are involved.
- See Also:
- Serialized Form
|
Field Summary |
private double |
ambient
The last ambient temperature. |
|
Method Summary |
double |
getDeviation(double raw,
double dev)
A dew point sensor already delivers degrees centigrade. |
double |
getPhysical(double raw)
A dew point sensor already delivers degrees centigrade, but only the
difference to the ambient temperature. |
double |
getRaw(double physical)
A dew point sensor always delivers degrees centrigrade, but only the
difference to the ambient temperature. |
protected void |
setAmbientTemperature(double temperature)
Sets the last ambient temperature used for calculating the raw reading
of the dew-point sensor. |
| Methods inherited from class util.PropertyResources |
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, init, keyCreate, keyCreate, reload, setApplet |
| Methods inherited from class util.PropertyContainer |
augment, augment, augment, 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, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString |
| Methods inherited from interface util.PropertySupplying |
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties |
ambient
private double ambient
- The last ambient temperature.
DewPointConvert
public DewPointConvert(Map info)
- Constructs a new cosine converter. Since the conversion does not
need any additional parameters, all the properties defined for
the decimal formats should be given in the properties of the
solz sensor itself. Its properties are also used to construct
this converter.
getPhysical
public double getPhysical(double raw)
- A dew point sensor already delivers degrees centigrade, but only the
difference to the ambient temperature. It seems feasable to change
the physical value delivered by the dewpoint to the 'true' dewpoint
temperature. This is only possible with a 'dirty trick'; the dew-point
sensor reading-delivery method must call the conversions
setAmbientTemperature(double) at each reading.
- Parameters:
raw - The raw reading value.
- Returns:
- The raw-reading plus the ambient temperature.
getRaw
public double getRaw(double physical)
- A dew point sensor always delivers degrees centrigrade, but only the
difference to the ambient temperature. The physical reading is the
raw reading plus the ambient temperature, therefore reconstruction of
the raw reading is only possible if the ambient temperature is known.
getDeviation
public double getDeviation(double raw,
double dev)
- A dew point sensor already delivers degrees centigrade. The deviation
is unaffected by an offset.
- Parameters:
raw - The raw reading value.dev - The standard deviation of the raw readings.
- Returns:
- The physical quantity corresponding to the standard deviation
of the raw readings.
setAmbientTemperature
protected void setAmbientTemperature(double temperature)
- Sets the last ambient temperature used for calculating the raw reading
of the dew-point sensor. This is a very dirty trick to make this
conversion class work without an inner class construct. This method
must be called whenever a dew-point sensor delivers a reading.