05-27-2020 05:19 AM
hi,i read the bsxlite example of bmf055.and i want to know what is the specific quaternion.and i see abnormal data from terminal window .
4 17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 56 161 8 233 26 246 246 174 0 0 0 0 0 0 4 126 0 0 0 0 0 0 3 0 0
i can not understand the data ,especially 246 174.
i know the code converts a float quaternion to a 16-bit integer regarding the scaling factor which is 16393.
but when i use [(246-128)*256+174 ]/16393to get quaternion, i find the value exceeds 1.
can you tell me why ?
Solved! Go to Solution.
05-28-2020 08:22 PM
The data is actually in signed 16 bit and scaled to the full scale, and is in the little endian format.
Dec array : 56 161 8 233 26 246 246 174
Hex array: 38 A1 08 E9 1A F6 F6 AE
Hex combined: A138 E908 F61A AEF6
Dec combined: -24264 -5880 -2534 -20746
Scaled quaternion approx: -0.7404 -0.1794 -0.0077 -0.6331
Values read are plausible.