Versions Compared

Key

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

...

  • As noted before, multi-byte values are in little-endian and that means, to calculate the realm value, you will need to switch octets places (switch octets order). So the first step is to swap places for the values from 0x0200 to 0x0002. 0x0002 converted from hexadecimal to decimal is 02.
  • Keep in mind that acceleration is in signed 8.8 fixed point format (two's complement) and that means that you basically need to divide the result by "256". The second step is to divide the value by 256 → (0x0002 hex or 02 dec)/256 = 0.0078 m/s2.
  • The same calculation principle applies to the acceleration for the X and Y-axis. In our example, they just happen to be 0 → 0x0000/256=0.

...