From 72b0ac307d44845617485d2b09d6bb8cadf445c4 Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 16 Aug 2000 20:16:09 +0000 Subject: [PATCH] Setting airport position from within flightgear now also takes advantage of the new runway positioning code. --- src/GUI/gui.cxx | 4 +++- src/Main/options.cxx | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/GUI/gui.cxx b/src/GUI/gui.cxx index 631accc8f..f5bd04092 100644 --- a/src/GUI/gui.cxx +++ b/src/GUI/gui.cxx @@ -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); diff --git a/src/Main/options.cxx b/src/Main/options.cxx index 1c4c0a387..b96105b02 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -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; -- 2.39.5