void FGRouteMgr::add_waypoint( const SGWayPoint& wp, int n ) {
+ if ( n == 0 )
+ altitude_set = false;
+
route->add_waypoint( wp, n );
update_mirror();
}
wp0_eta->setStringValue( "" );
}
+ if ( n == 0 && route->size() )
+ altitude_set = false;
+
update_mirror();
return wp;
}
int type = make_waypoint( &wp, target );
if (wp) {
- fgSetString( "/autopilot/locks/heading", "true-heading-hold" );
add_waypoint( *wp, n );
+ fgSetString( "/autopilot/locks/heading", "true-heading-hold" );
delete wp;
}
return type;
}
// check for lon,lat
- pos = target.find(',');
+ pos = target.find( ',' );
if ( pos != string::npos ) {
double lon = atof( target.substr(0, pos).c_str());
double lat = atof( target.c_str() + pos + 1);
return 4;
}
- // target not identified
+ // unknown target
return 0;
}