Let's say I have a physical device that I can rotate with my hands and receive X Y Z coordinates of that device. What I need to calculate is the offset - how far is the pendulum of gravity straight down. Basically how many degrees I am off centre. Is there a way of doing so? I've googled a lot of questions but so far I'm struggling.
Thanks.
Updated:
There is a physical device (sensor) which I can rotate. The device sends its X Y Z coordinates and a calculated acceleration vector in mg (mill mg). I can read this data from this device using BLE. The device should lie flat while transportation, so I need to calculate how many degrees the device is off centre (which is the laying flat on table).
Updated x2:
I need to calculate the angle between the device's centre vector and a gravity pendulum (the blue angle) on the photo.