Implementing VNAV support in FlightGear: Difference between revisions

Jump to navigation Jump to search
Line 175: Line 175:
=== FGWaypoint ===
=== FGWaypoint ===
There are some basic building blocks for supporting waypoints via the [https://en.wikipedia.org/wiki/Haversine_formula Haversine formula] in $JSBSIM_SRC/model/flight_controls/FGWaypoint.cpp, currently these are:
There are some basic building blocks for supporting waypoints via the [https://en.wikipedia.org/wiki/Haversine_formula Haversine formula] in $JSBSIM_SRC/model/flight_controls/FGWaypoint.cpp, currently these are:
* waypoint_heading
* waypoint_heading (computes the heading to the waypoint)
* waypoint_distance
* waypoint_distance (computes the distance between to waypoints)


The '''FGWaypoint''' class would need to be extended to help with the calculation of other types of waypoints related to VNAV. To add a stub for a new waypoint named '''waypoint_custom''', these would be the required changes:
The '''FGWaypoint''' class would need to be extended to help with the calculation of other types of waypoints related to VNAV. To add a stub for a new waypoint named '''waypoint_custom''', these would be the required changes:

Navigation menu