stella.sensor
Interface PhysicalDerivative

All Superinterfaces:
ConvertToPhysical
All Known Implementing Classes:
AbstractDerivative, CosineConversion, LimitedPolynomialConversion, PolynomialConversion

public interface PhysicalDerivative
extends ConvertToPhysical

An interface describing the capability of a sensor to interpret its reading in a physical sense. Note that it is not necessary for automated weather interpretation to convert the sensor reading to a physically meaningful value. For readability or visualization efforts, it is nevertheless advisable to do so.


Method Summary
 NumberFormat getDerivativeValueFormat()
          Returns the decimal format to use for the physical derivative.
 double getPhysicalDerivative(double derive, double raw)
          (Sensor) Classes defining this interface should know how to convert a numerical derivative of their raw values into a derivative with a physically meaning.
 double getRawDerivative(double derive, double physical)
          The inversion of the getPhysicalDerivative(double, double) method.
 
Methods inherited from interface stella.sensor.ConvertToPhysical
getDeviation, getPhysical, getRaw, getSigmaValueFormat, getUnit, getValueFormat
 

Method Detail

getPhysicalDerivative

double getPhysicalDerivative(double derive,
                             double raw)
(Sensor) Classes defining this interface should know how to convert a numerical derivative of their raw values into a derivative with a physically meaning. E.g. a temperature sensor should be able to deliver degrees Celcius per second.

Parameters:
derive - The numerical derivative from raw values.
raw - The raw reading of the sensor.

getRawDerivative

double getRawDerivative(double derive,
                        double physical)
The inversion of the getPhysicalDerivative(double, double) method. A call to this method recalculates the first derivative of the raw values using the physical meaningful value and its derivative.

Parameters:
derive - The physical quantity of the first derivative.
physical - The physical quantity.

getDerivativeValueFormat

NumberFormat getDerivativeValueFormat()
Returns the decimal format to use for the physical derivative.