]> git.mxchange.org Git - flightgear.git/commitdiff
Setting airport position from within flightgear now also takes advantage
authorcurt <curt>
Wed, 16 Aug 2000 20:16:09 +0000 (20:16 +0000)
committercurt <curt>
Wed, 16 Aug 2000 20:16:09 +0000 (20:16 +0000)
of the new runway positioning code.

src/GUI/gui.cxx
src/Main/options.cxx

index 631accc8fa2be6adf62872d42fac0336f6a6fd69..f5bd04092cfe9546dfe31b445f092f135e26d883 100644 (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);
index 1c4c0a38781ce9e55e773894b1d5868746071936..b96105b020ddc79e952f9b3a82fd6320a544858a 100644 (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;