Overview
This module determines the desired heading and altitude of the aircraft and manages the waypoints (also called “path nodes”) of the plane’s flight path. The module takes in GPS coordinates and altitude measurements and calculates the heading and altitude the plane needs to stay on course. Additionally, the module takes instructions from the state machine to modify the waypoints in the plane’s flight path.
...
Figuring out where the tangent will touch requires some basic trigonometry. [WILL TOUCH ON LATER]. The coordinates at which this occurs can be calculated using:
...
State machine calls the
get_next_directions()
and passes in appropriate parameters.Algorithm stuff [ADD LATER]
State machine calls
GetResult()
and passes in a reference address for a_WaypointManager_Data
structure.The function sets the members of the structure using the newly calculated values.
...