1 // FGAIFlightPlan - class for loading and storing AI flight plans
2 // Written by David Culp, started May 2004
3 // - davidculp2@comcast.net
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License as
7 // published by the Free Software Foundation; either version 2 of the
8 // License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful, but
11 // WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 #ifndef _FG_AIFLIGHTPLAN_HXX
20 #define _FG_AIFLIGHTPLAN_HXX
22 #include <simgear/compiler.h>
29 class FGAIFlightPlan {
46 FGAIFlightPlan(string filename);
47 FGAIFlightPlan(string filename,
55 waypoint* getPreviousWaypoint( void );
56 waypoint* getCurrentWaypoint( void );
57 waypoint* getNextWaypoint( void );
58 void IncrementWaypoint( void );
60 double getDistanceToGo(double lat, double lon, waypoint* wp);
61 void setLeadDistance(double speed, double bearing, waypoint* current, waypoint* next);
62 void setLeadDistance(double distance_ft);
63 double getLeadDistance( void ) const {return lead_distance;}
64 double getBearing(waypoint* previous, waypoint* next);
65 double getBearing(double lat, double lon, waypoint* next);
69 typedef vector <waypoint*> wpt_vector_type;
70 typedef wpt_vector_type::iterator wpt_vector_iterator;
72 wpt_vector_type waypoints;
73 wpt_vector_iterator wpt_iterator;
75 double distance_to_go;
82 #endif // _FG_AIFLIGHTPLAN_HXX