Attitude monitor using Peripheral:XIAO_BLE_Sence and Central:XIAO_BLE with mbed 2.7.2 and ArduinoBLE

Hi msfujino,

Thanks for your reply. I am using exactly the same library as you are…
One thing I am not sure is whether roll, pitch and yaw are described in device frame or world frame.
I did two tests:

  1. First, device was flat, then I increased device’s pitch. The reading of pitch was increasing, which is good.
  2. First device was flat, then I rotated the device along Z-axis by a random angle, then I increased the device’s pitch. The reading of pitch was increasing, and it seemed that roll, ptich, yaw were described in the device frame, right?
  3. Weird thing happened. First, device was flat, then I rotated the roll for about 90 degrees. Then I increased the device’s pitch, however, the reading of yaw was changing. It seems that the angles are described in world frame now…

Super weird.
Anyway, thanks for sharing.

Yi