Hi, I'm having trouble working out a neat equation which will determine the change in degrees from a gyro who's output is 0 to 359.
The problem I'm having is that I need to cater for when say the output goes from 0 to 359 or 359 to 0 and ensuring this is only calculated as a
1 deg shift, not 358. I've got an alg to do this but other issues such as ensuring this the following reading are taken say:2, 358, 359, 1
then the overall degs shift is 1 deg.
Anyone got any code, or idea where I can look to achieve this.
Many thanks
Mark