Contained in this PR is an implementation of using RC override and a PID controller to navigate a plane to a waypoint. It is currently written as an example program. If the functions were to be imported to a module, the driver and functions would need to be separated (which should not be hard).
This example has been successfully tested in ArduPlane - SITL, where it was capable of navigating a plane going ~22m/s to a waypoint within a ~10m margin of error. The destination checking was done every 0.5 seconds. Provided in the example are four coordinates, each at a different quadrant relative to the default location of the plane.
This example currently operates on a single thread. If better accuracy is needed, parallel processing can be implemented to concurrently check if vehicle has reached target and send RC override messages at the same time.
Contained in this PR is an implementation of using RC override and a PID controller to navigate a plane to a waypoint. It is currently written as an example program. If the functions were to be imported to a module, the driver and functions would need to be separated (which should not be hard).
This example has been successfully tested in ArduPlane - SITL, where it was capable of navigating a plane going ~22m/s to a waypoint within a ~10m margin of error. The destination checking was done every 0.5 seconds. Provided in the example are four coordinates, each at a different quadrant relative to the default location of the plane.
This example currently operates on a single thread. If better accuracy is needed, parallel processing can be implemented to concurrently check if vehicle has reached target and send RC override messages at the same time.