1
0
Fork 0

Setting airport position from within flightgear now also takes advantage

of the new runway positioning code.
This commit is contained in:
curt 2000-08-16 20:16:09 +00:00
parent 26bdfd033b
commit 72b0ac307d
2 changed files with 6 additions and 2 deletions

View file

@ -1043,7 +1043,9 @@ void AptDialog_OK (puObject *)
{
current_options.set_airport_id( AptId.c_str() );
current_options.set_altitude( -9999.0 );
fgSetPosFromAirportID( AptId );
// fgSetPosFromAirportID( AptId );
fgSetPosFromAirportIDandHdg( AptId,
cur_fdm_state->get_Psi() * RAD_TO_DEG);
BusyCursor(0);
fgReInitSubsystems();
BusyCursor(1);

View file

@ -233,7 +233,7 @@ fgOPTIONS::fgOPTIONS() :
fg_scenery = "";
}
airport_id = ""; // default airport id
airport_id = "P13"; // default airport id
net_id = "Johnney"; // default pilot's name
// initialize port config string list
@ -646,8 +646,10 @@ int fgOPTIONS::parse_option( const string& arg ) {
airport_id = arg.substr( 13 );
} else if ( arg.find( "--lon=" ) != string::npos ) {
lon = parse_degree( arg.substr(6) );
airport_id = "";
} else if ( arg.find( "--lat=" ) != string::npos ) {
lat = parse_degree( arg.substr(6) );
airport_id = "";
} else if ( arg.find( "--altitude=" ) != string::npos ) {
if ( units == FG_UNITS_FEET ) {
altitude = atof( arg.substr(11) ) * FEET_TO_METER;