Quote:
Originally Posted by Richard100
Not finding this to be very clear either. We're likely discussing different aspects of the problem.
|
I am discussing the solution to this aspect of the OP's original framing of the problem (see bolded portion):
Quote:
Originally Posted by lethc
Does anyone have any ideas on how I would get a continuous angle heading from the NavX? I.E. one that doesn't jump from 360 to 0 instantly, because that messes up the derivative calculation
|
You don't need a continuous angle to do a simple difference calculation (which is what I anticipated the OP was really wanting).
The IEEERemainder gives you that answer:
Quote:
Originally Posted by Ether
what you want is the shortest angle from the previous reading to the present reading, with the correct sign. The IEEERemainder function 1 does this with one line of code:
Code:
shortest_angle = IEEERemainder(present-previous,360);
|
Quote:
Originally Posted by lethc
Just tried this out and it works perfectly. Thank you for your help.
|