Quote:
Originally Posted by Oblarg
This is unnecessary with the NavX and WPILib, as one can simply call AHRS pidGet() (which always ranges from -180 to 180) and ensure that the PIDController object is set to have a continuous range and not have to ever explicitly do any of the math.
|
Yes.
I was responding to
DanielHa's post, to show a simple way to compute shortest angle... which would be useful to know for situations where the library functions or the hardware don't do the math for you.