I have this sensor fused data coming from a GYRO-ACC-MAG-hardware sensor.
It's data (YAW-PITCH-ROLL) goes from -180
to +180
or -90
to +90
Which algorithm helps me offset this to an arbitrary position and also have no sign change to minus?
What I mean is: -180
to +180
for instance leads to 0
to 359
. And I want 0
not where 0
of the sensor is but also offset to a certain position. In other words, picture a circle. Now put a zero at an arbitrary position on that circle. Now rotate that circle around it's center point. The zero rotates along, so it is now at a different position than it was before, right? That's the idea.
What I did:
YAW + 180
leads to 0 to 359
. Pitch + 90
leads to 0 to 179
. Roll + 180
leads to 0 to 359
.