SensorPrecision

  • Base type Integer32
  • Range -8 — 9

When in the range 1 to 9, SensorPrecision is the number of decimal places in the fractional part of a SensorValue fixed-point number. When in the range -8 to -1, SensorPrecision is the number of accurate digits in a SensorValue fixed-point number. SensorPrecision is 0 for non-fixed-point numbers. Agent implementors must choose a value for SensorPrecision so that the precision and accuracy of a SensorValue is correctly indicated. For example, a temperature sensor that can measure 0o to 100o C in 0.1o increments, +/- 0.05o, would have a SensorPrecision of 1, a SensorDataScale of units(0), and a SensorValue ranging from 0 to 1000. The SensorValue would be interpreted as (degrees C * 10). If that temperature sensor's precision were 0.1o but its accuracy were only +/- 0.5o, then the SensorPrecision would be 0. The SensorValue would be interpreted as degrees C. Another example: a fan rotation speed sensor that measures RPM from 0 to 10,000 in 100 RPM increments, with an accuracy of +50/-37 RPM, would have a SensorPrecision of -2, a SensorDataScale of units(9), and a SensorValue ranging from 0 to 10000. The 10s and 1s digits of SensorValue would always be 0.