start_time = 0;
leg = 10;
gateId = 0;
+ taxiRoute = 0;
SGPath path( globals->get_fg_root() );
path.append( ("/AI/FlightPlans/" + filename).c_str() );
SGPropertyNode root;
const string& acType,
const string& airline)
{
+ repeat = false;
leg = 10;
gateId=0;
+ taxiRoute = 0;
start_time = start;
bool useInitialWayPoint = true;
bool useCurrentWayPoint = false;
SGPath path( globals->get_fg_root() );
path.append( "/AI/FlightPlans" );
path.append( p );
+
SGPropertyNode root;
// This is a bit of a hack:
FGAIFlightPlan::~FGAIFlightPlan()
{
deleteWaypoints();
- //waypoints.clear();
- //while (waypoints.begin() != waypoints.end())
- // {
- // delete *(waypoints.begin());
- // waypoints.erase (waypoints.begin());
- // }
+ if (taxiRoute)
+ delete taxiRoute;
}
{
wpt_iterator = waypoints.begin();
}
+
+
+void FGAIFlightPlan::deleteTaxiRoute()
+{
+ if (taxiRoute)
+ delete taxiRoute;
+ taxiRoute = 0;
+}
+
+
+int FGAIFlightPlan::getRouteIndex(int i) {
+ if ((i > 0) && (i < waypoints.size())) {
+ return waypoints[i]->routeIndex;
+ }
+ else
+ return 0;
+}