I am using a BNO055 sensor with a ESP32 development board to control my mouse cursor. I'm able to get data from the sensor as angular velocity, or as absolute orientation in quaternions and use that to control the cursor movement on screen.
My aim is to be able to get yaw and pitch angular velocity measurements, which align to the movement of the hand in space, with the device attached to the hand. I'm able to do this when the device is straight. But I'm facing issues, if the device is rotated on its frame's roll axis. This results in a movement of the hand registering angular velocity on both the yaw and pitch axis. I have made a short video to demonstrate the issue, which hopefully makes more sense than the written explanation.
If you would like to view the current project code that is available here.
I understand this is very specific, and potentially time-consuming to answer so no expectations! Still, I would appreciate any guidance on how to approach solving this.
PS. Sorry for bad video quality, I have RSI and can't spend too long on touchy stuff like this.