Package analoginput.calibration
Class AddThenMultiplyThenAdd
java.lang.Object
analoginput.calibration.AddThenMultiplyThenAdd
- All Implemented Interfaces:
 SensorCalibration
Add Then Multiply then Add is a calibration method in it that has 
 some unnecessary, but useful redundancy. Add then multipl makes it 
 easy to use 4 - 20mA sensors, since the output is imply (input-.004)*maxDepth/.016;
 However, if you then need to add an additional offset correction, it's much easier to 
 add a third parameter, so output is (input-.004)*maxDepth/.016 + offset. Without the 
 third parameter, it would be necessary to do a complicated recalculation of the
 first parameter, (input + a)*maxDepth/.016, where a = -.004 + offset*.016/maxDepth.
- Author:
 - dg50
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptiondoublerawToValue(double rawValue, CalibrationData calibrationData) Convert a value from an ADC, which will probably have already been converted to volts or amps into an 'engineering' unit, e.g. 
- 
Constructor Details
- 
AddThenMultiplyThenAdd
public AddThenMultiplyThenAdd() 
 - 
 - 
Method Details
- 
rawToValue
public double rawToValue(double rawValue, CalibrationData calibrationData) throws CalibrationException Description copied from interface:SensorCalibrationConvert a value from an ADC, which will probably have already been converted to volts or amps into an 'engineering' unit, e.g. depth, heading, etc.- Specified by:
 rawToValuein interfaceSensorCalibration- Parameters:
 rawValue- Value from acquisition device- Returns:
 - value in engineering units.
 - Throws:
 CalibrationException
 
 -