Setting airport position from within flightgear now also takes advantage
of the new runway positioning code.
This commit is contained in:
parent
26bdfd033b
commit
72b0ac307d
2 changed files with 6 additions and 2 deletions
|
@ -1043,7 +1043,9 @@ void AptDialog_OK (puObject *)
|
||||||
{
|
{
|
||||||
current_options.set_airport_id( AptId.c_str() );
|
current_options.set_airport_id( AptId.c_str() );
|
||||||
current_options.set_altitude( -9999.0 );
|
current_options.set_altitude( -9999.0 );
|
||||||
fgSetPosFromAirportID( AptId );
|
// fgSetPosFromAirportID( AptId );
|
||||||
|
fgSetPosFromAirportIDandHdg( AptId,
|
||||||
|
cur_fdm_state->get_Psi() * RAD_TO_DEG);
|
||||||
BusyCursor(0);
|
BusyCursor(0);
|
||||||
fgReInitSubsystems();
|
fgReInitSubsystems();
|
||||||
BusyCursor(1);
|
BusyCursor(1);
|
||||||
|
|
|
@ -233,7 +233,7 @@ fgOPTIONS::fgOPTIONS() :
|
||||||
fg_scenery = "";
|
fg_scenery = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
airport_id = ""; // default airport id
|
airport_id = "P13"; // default airport id
|
||||||
net_id = "Johnney"; // default pilot's name
|
net_id = "Johnney"; // default pilot's name
|
||||||
|
|
||||||
// initialize port config string list
|
// initialize port config string list
|
||||||
|
@ -646,8 +646,10 @@ int fgOPTIONS::parse_option( const string& arg ) {
|
||||||
airport_id = arg.substr( 13 );
|
airport_id = arg.substr( 13 );
|
||||||
} else if ( arg.find( "--lon=" ) != string::npos ) {
|
} else if ( arg.find( "--lon=" ) != string::npos ) {
|
||||||
lon = parse_degree( arg.substr(6) );
|
lon = parse_degree( arg.substr(6) );
|
||||||
|
airport_id = "";
|
||||||
} else if ( arg.find( "--lat=" ) != string::npos ) {
|
} else if ( arg.find( "--lat=" ) != string::npos ) {
|
||||||
lat = parse_degree( arg.substr(6) );
|
lat = parse_degree( arg.substr(6) );
|
||||||
|
airport_id = "";
|
||||||
} else if ( arg.find( "--altitude=" ) != string::npos ) {
|
} else if ( arg.find( "--altitude=" ) != string::npos ) {
|
||||||
if ( units == FG_UNITS_FEET ) {
|
if ( units == FG_UNITS_FEET ) {
|
||||||
altitude = atof( arg.substr(11) ) * FEET_TO_METER;
|
altitude = atof( arg.substr(11) ) * FEET_TO_METER;
|
||||||
|
|
Loading…
Add table
Reference in a new issue