Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

And the formula used is: value = (intValue + ref) * 10-scale
So when we encode a value of 213.61 we do the above formula in reverse i.e.

intValue = round(value/10) value*10scale - ref

intValue = value*10-1 - 0 = round(213.61/10) = 21
So we store the integer 21 in the BUFR message using 14 bits.
When we come to decode it, we use the first formula i.e. value = (21 + 0) * 10^--1 = 21 * 10 = 210
So when you put in 213.61, you will get out 210. Precision of this element is 10^-scale i.e. 10 so it will not store intermediate values. It will be 210 or 220 or 230 etc..

...