RemoteTechnologiesGroup / RemoteTech

Community developed continuation of Kerbal Space Program's RemoteTech mod.
http://remotetechnologiesgroup.github.io/RemoteTech
GNU General Public License v2.0
233 stars 102 forks source link

Yet another fix of RoverComputer overshooting target coords. #808

Closed JDPKSP closed 4 years ago

JDPKSP commented 4 years ago

Added detection of HDG error when <1m from the target coord. When the error goes above 90 degrees the rover is overshooting and execution of the command will halt.

The previous fix did not take into account that the HDG PID will not hit the target precisely enough for even a 0.1 delta being a sufficient trigger.

This functionality was in place way back when I originally wrote RoverComputer. Not sure if there was a reason for its removal.

JDPKSP commented 4 years ago

Made a derp. Completely forgot that AngleBetween doesn't return an absolute value