void TgtAptDialog_Reset(puObject *)
{
- sprintf( NewTgtAirportId, "%s", fgGetString("/sim/startup/airport-id") );
+ sprintf( NewTgtAirportId, "%s", fgGetString("/sim/presets/airport-id") );
TgtAptDialogInput->setValue ( NewTgtAirportId );
TgtAptDialogInput->setCursor( 0 ) ;
}
void AddWayPoint(puObject *cb)
{
- sprintf( NewTgtAirportId, "%s", fgGetString("/sim/startup/airport-id") );
+ sprintf( NewTgtAirportId, "%s", fgGetString("/sim/presets/airport-id") );
TgtAptDialogInput->setValue( NewTgtAirportId );
/* refresh waypoint list */
void NewTgtAirportInit()
{
SG_LOG( SG_AUTOPILOT, SG_INFO, " enter NewTgtAirportInit()" );
- sprintf( NewTgtAirportId, "%s", fgGetString("/sim/startup/airport-id") );
+ sprintf( NewTgtAirportId, "%s", fgGetString("/sim/presets/airport-id") );
SG_LOG( SG_AUTOPILOT, SG_INFO, " NewTgtAirportId " << NewTgtAirportId );
TgtAptDialog = new puDialogBox (150, 350);
update_old_control_values();
- sprintf( NewTgtAirportId, "%s", fgGetString("/sim/startup/airport-id") );
+ sprintf( NewTgtAirportId, "%s", fgGetString("/sim/presets/airport-id") );
MakeTargetLatLonStr( get_TargetLatitude(), get_TargetLongitude() );
}
//set velocities
sgSetVec3( temp,
- fgGetDouble("/velocities/uBody-fps"),
- fgGetDouble("/velocities/vBody-fps"),
- fgGetDouble("/velocities/wBody-fps") );
+ fgGetDouble("/sim/presets/uBody-fps"),
+ fgGetDouble("/sim/presets/vBody-fps"),
+ fgGetDouble("/sim/presets/wBody-fps") );
current_balloon.setVelocity( temp );
SG_LOG( SG_FLIGHT, SG_INFO, "Finished initializing BalloonSim" );
// init method first.
common_init();
- double lon = fgGetDouble( "/position/longitude-deg" );
- double lat = fgGetDouble( "/position/latitude-deg" );
- double alt = fgGetDouble( "/position/altitude-ft" );
+ double lon = fgGetDouble( "/sim/presets/longitude-deg" );
+ double lat = fgGetDouble( "/sim/presets/latitude-deg" );
+ double alt = fgGetDouble( "/sim/presets/altitude-ft" );
double ground = fgGetDouble( "/environment/ground-elevation-m" );
- double heading = fgGetDouble("/orientation/heading-deg");
- double speed = fgGetDouble( "/velocities/airspeed-kt" );
+ double heading = fgGetDouble("/sim/presets/heading-deg");
+ double speed = fgGetDouble( "/sim/presets/airspeed-kt" );
char cmd[256];
SG_LOG( SG_IO, SG_INFO, "before sending reset command." );
- if( fgGetBool("/sim/startup/onground") ) {
+ if( fgGetBool("/sim/presets/onground") ) {
sprintf( cmd, "/reset?value=ground" );
} else {
sprintf( cmd, "/reset?value=air" );
fgSetDouble("/fdm/trim/aileron", FCS->GetDaCmd());
fgSetDouble("/fdm/trim/rudder", FCS->GetDrCmd());
- startup_trim = fgGetNode("/sim/startup/trim", true);
+ startup_trim = fgGetNode("/sim/presets/trim", true);
trimmed = fgGetNode("/fdm/trim/trimmed", true);
trimmed->setBoolValue(false);
void FGJSBsim::do_trim(void) {
FGTrim *fgtrim;
- if( fgGetBool("/sim/startup/onground") ) {
+ if( fgGetBool("/sim/presets/onground") ) {
fgic->SetVcalibratedKtsIC(0.0);
fgtrim=new FGTrim(fdmex,tGround);
} else {
// Set initial position
SG_LOG( SG_FLIGHT, SG_INFO, "...initializing position..." );
- set_Longitude( fgGetDouble("/position/longitude-deg")
+ set_Longitude( fgGetDouble("/sim/presets/longitude-deg")
* SGD_DEGREES_TO_RADIANS );
- set_Latitude( fgGetDouble("/position/latitude-deg")
+ set_Latitude( fgGetDouble("/sim/presets/latitude-deg")
* SGD_DEGREES_TO_RADIANS );
double ground_elev_m = globals->get_scenery()->get_cur_elev();
double ground_elev_ft = ground_elev_m * SG_METER_TO_FEET;
_acmodel->get3DModel()->getFGLocation()->set_cur_elev_m( ground_elev_m );
_set_Runway_altitude ( ground_elev_ft );
- if ( fgGetBool("/sim/startup/onground")
- || fgGetDouble("/position/altitude-ft") < ground_elev_ft ) {
+ if ( fgGetBool("/sim/presets/onground")
+ || fgGetDouble("/sim/presets/altitude-ft") < ground_elev_ft ) {
+ fgSetDouble("/sim/presets/altitude-ft", ground_elev_ft);
fgSetDouble("/position/altitude-ft", ground_elev_ft);
}
- set_Altitude( fgGetDouble("/position/altitude-ft") );
+ set_Altitude( fgGetDouble("/sim/presets/altitude-ft") );
// Set ground elevation
SG_LOG( SG_FLIGHT, SG_INFO,
// Set sea-level radius
SG_LOG( SG_FLIGHT, SG_INFO, "...initializing sea-level radius..." );
SG_LOG( SG_FLIGHT, SG_INFO, " lat = "
- << fgGetDouble("/position/latitude-deg")
- << " alt = " << fgGetDouble("/position/altitude-ft") );
+ << fgGetDouble("/sim/presets/latitude-deg")
+ << " alt = " << fgGetDouble("/sim/presets/altitude-ft") );
double sea_level_radius_meters;
double lat_geoc;
- sgGeodToGeoc( fgGetDouble("/position/latitude-deg")
+ sgGeodToGeoc( fgGetDouble("/sim/presets/latitude-deg")
* SGD_DEGREES_TO_RADIANS,
- fgGetDouble("/position/altitude-ft") * SG_FEET_TO_METER,
+ fgGetDouble("/sim/presets/altitude-ft") * SG_FEET_TO_METER,
&sea_level_radius_meters, &lat_geoc );
_set_Sea_level_radius( sea_level_radius_meters * SG_METER_TO_FEET );
// Set initial velocities
SG_LOG( SG_FLIGHT, SG_INFO, "...initializing velocities..." );
- if ( !fgHasNode("/sim/startup/speed-set") ) {
+ if ( !fgHasNode("/sim/presets/speed-set") ) {
set_V_calibrated_kts(0.0);
} else {
- const string speedset = fgGetString("/sim/startup/speed-set");
+ const string speedset = fgGetString("/sim/presets/speed-set");
if ( speedset == "knots" || speedset == "KNOTS" ) {
- set_V_calibrated_kts( fgGetDouble("/velocities/airspeed-kt") );
+ set_V_calibrated_kts( fgGetDouble("/sim/presets/airspeed-kt") );
} else if ( speedset == "mach" || speedset == "MACH" ) {
- set_Mach_number( fgGetDouble("/velocities/mach") );
+ set_Mach_number( fgGetDouble("/sim/presets/mach") );
} else if ( speedset == "UVW" || speedset == "uvw" ) {
set_Velocities_Wind_Body(
- fgGetDouble("/velocities/uBody-fps"),
- fgGetDouble("/velocities/vBody-fps"),
- fgGetDouble("/velocities/wBody-fps") );
+ fgGetDouble("/sim/presets/uBody-fps"),
+ fgGetDouble("/sim/presets/vBody-fps"),
+ fgGetDouble("/sim/presets/wBody-fps") );
} else if ( speedset == "NED" || speedset == "ned" ) {
set_Velocities_Local(
- fgGetDouble("/velocities/speed-north-fps"),
- fgGetDouble("/velocities/speed-east-fps"),
- fgGetDouble("/velocities/speed-down-fps") );
+ fgGetDouble("/sim/presets/speed-north-fps"),
+ fgGetDouble("/sim/presets/speed-east-fps"),
+ fgGetDouble("/sim/presets/speed-down-fps") );
} else {
SG_LOG( SG_FLIGHT, SG_ALERT,
- "Unrecognized value for /sim/startup/speed-set: "
+ "Unrecognized value for /sim/presets/speed-set: "
<< speedset);
set_V_calibrated_kts( 0.0 );
}
// Set initial Euler angles
SG_LOG( SG_FLIGHT, SG_INFO, "...initializing Euler angles..." );
- set_Euler_Angles( fgGetDouble("/orientation/roll-deg")
+ set_Euler_Angles( fgGetDouble("/sim/presets/roll-deg")
* SGD_DEGREES_TO_RADIANS,
- fgGetDouble("/orientation/pitch-deg")
+ fgGetDouble("/sim/presets/pitch-deg")
* SGD_DEGREES_TO_RADIANS,
- fgGetDouble("/orientation/heading-deg")
+ fgGetDouble("/sim/presets/heading-deg")
* SGD_DEGREES_TO_RADIANS );
SG_LOG( SG_FLIGHT, SG_INFO, "End common FDM init" );
cur_fdm_state->unbind();
AptId = a.id.c_str(); /// NHV fix wrong case crash
- fgSetString("/sim/startup/airport-id", AptId.c_str() );
+ fgSetString("/sim/presets/airport-id", AptId.c_str() );
// fgSetDouble("/position/altitude-ft", -9999.0 );
// fgSetPosFromAirportID( AptId );
fgSetPosFromAirportIDandHdg( AptId,
void AptDialog_Reset(puObject *)
{
- // strncpy( NewAirportId, fgGetString("/sim/startup/airport-id").c_str(), 16 );
- sprintf( NewAirportId, "%s", fgGetString("/sim/startup/airport-id") );
+ // strncpy( NewAirportId, fgGetString("/sim/presets/airport-id").c_str(), 16 );
+ sprintf( NewAirportId, "%s", fgGetString("/sim/presets/airport-id") );
AptDialogInput->setValue ( NewAirportId );
AptDialogInput->setCursor( 0 ) ;
}
void NewAirport(puObject *cb)
{
- // strncpy( NewAirportId, fgGetString("/sim/startup/airport-id").c_str(), 16 );
- sprintf( NewAirportId, "%s", fgGetString("/sim/startup/airport-id") );
+ // strncpy( NewAirportId, fgGetString("/sim/presets/airport-id").c_str(), 16 );
+ sprintf( NewAirportId, "%s", fgGetString("/sim/presets/airport-id") );
// cout << "NewAirport " << NewAirportId << endl;
AptDialogInput->setValue( NewAirportId );
void NewAirportInit(void)
{
- sprintf( NewAirportId, "%s", fgGetString("/sim/startup/airport-id") );
+ sprintf( NewAirportId, "%s", fgGetString("/sim/presets/airport-id") );
int len = 150
- puGetDefaultLabelFont().getStringWidth( NewAirportLabel ) / 2;
// Unsuccessful KLUDGE to fix the 'every other time'
// problem when doing a 'reset' after a 'goto airport'
- // string AptId( fgGetString("/sim/startup/airport-id") );
+ // string AptId( fgGetString("/sim/presets/airport-id") );
// if( AptId.c_str() != "\0" )
// fgSetPosFromAirportID( AptId );
}
-// Set current_options lon/lat given an airport id
+// Preset lon/lat given an airport id
bool fgSetPosFromAirportID( const string& id ) {
FGAirport a;
// double lon, lat;
"Attempting to set starting position from airport code " << id );
if ( fgFindAirportID( id, &a ) ) {
- fgSetDouble("/position/longitude-deg", a.longitude );
- fgSetDouble("/position/latitude-deg", a.latitude );
+ // presets
+ fgSetDouble("/sim/presets/longitude-deg", a.longitude );
+ fgSetDouble("/sim/presets/latitude-deg", a.latitude );
+
+ // other code depends on the actual postition being set so set
+ // that as well
+ fgSetDouble("/position/longitude-deg", a.longitude );
+ fgSetDouble("/position/latitude-deg", a.latitude );
+
SG_LOG( SG_GENERAL, SG_INFO,
- "Position for " << id << " is ("
- << a.longitude << ", "
- << a.latitude << ")" );
+ "Position for " << id << " is (" << a.longitude
+ << ", " << a.latitude << ")" );
return true;
} else {
azimuth, found_r.length * SG_FEET_TO_METER * 0.5 - 5.0,
&lat2, &lon2, &az2 );
- if ( fabs( fgGetDouble("/sim/startup/offset-distance") ) > SG_EPSILON ) {
+ if ( fabs( fgGetDouble("/sim/presets/offset-distance") ) > SG_EPSILON ) {
double olat, olon;
- double odist = fgGetDouble("/sim/startup/offset-distance");
+ double odist = fgGetDouble("/sim/presets/offset-distance");
odist *= SG_NM_TO_METER;
double oaz = azimuth;
- if ( fabs(fgGetDouble("/sim/startup/offset-azimuth")) > SG_EPSILON ) {
- oaz = fgGetDouble("/sim/startup/offset-azimuth") + 180;
+ if ( fabs(fgGetDouble("/sim/presets/offset-azimuth")) > SG_EPSILON ) {
+ oaz = fgGetDouble("/sim/presets/offset-azimuth") + 180;
}
while ( oaz >= 360.0 ) { oaz -= 360.0; }
geo_direct_wgs_84 ( 0, lat2, lon2, oaz, odist, &olat, &olon, &az2 );
lat2=olat;
lon2=olon;
}
-
+
+ // presets
+ fgSetDouble("/sim/presets/longitude-deg", lon2 );
+ fgSetDouble("/sim/presets/latitude-deg", lat2 );
+ fgSetDouble("/sim/presets/heading-deg", heading );
+
+ // other code depends on the actual values being set ...
fgSetDouble("/position/longitude-deg", lon2 );
fgSetDouble("/position/latitude-deg", lat2 );
fgSetDouble("/orientation/heading-deg", heading );
void fgSetPosFromGlideSlope(void) {
double gs = fgGetDouble("/velocities/glideslope");
- double od = fgGetDouble("/sim/startup/offset-distance");
- double alt = fgGetDouble("/position/altitude-ft");
+ double od = fgGetDouble("/sim/presets/offset-distance");
+ double alt = fgGetDouble("/sim/presets/altitude-ft");
//if glideslope and offset-distance are set and altitude is
//not, calculate the initial altitude
if( fabs(gs) > 0.01 && fabs(od) > 0.1 && alt < -9990 ) {
od *= SG_NM_TO_METER * SG_METER_TO_FEET;
alt = fabs(od*tan(gs));
- fgSetDouble("/position/altitude-ft",alt);
- fgSetBool("/sim/startup/onground", false);
+ fgSetDouble("/sim/presets/altitude-ft",alt);
+ fgSetBool("/sim/presets/onground", false);
SG_LOG(SG_GENERAL,SG_INFO, "Calculated altitude as: " << alt << " ft");
} else if( fabs(gs) > 0.01 && alt > 0 && fabs(od) < 0.1) {
od = alt/tan(gs);
od *= -1*SG_FEET_TO_METER * SG_METER_TO_NM;
- fgSetDouble("/sim/startup/offset-distance",od);
+ fgSetDouble("/sim/presets/offset-distance",od);
SG_LOG(SG_GENERAL,SG_INFO, "Calculated offset distance as: "
<< od << " nm");
} else if( fabs(gs) > 0.01 ) {
// Returns non-zero if a problem encountered.
bool fgInitSubsystems( void ) {
static const SGPropertyNode *longitude
- = fgGetNode("/position/longitude-deg");
+ = fgGetNode("/sim/presets/longitude-deg");
static const SGPropertyNode *latitude
- = fgGetNode("/position/latitude-deg");
+ = fgGetNode("/sim/presets/latitude-deg");
static const SGPropertyNode *altitude
- = fgGetNode("/position/altitude-ft");
+ = fgGetNode("/sim/presets/altitude-ft");
fgLIGHT *l = &cur_light_params;
void fgReInitSubsystems( void )
{
static const SGPropertyNode *longitude
- = fgGetNode("/position/longitude-deg");
+ = fgGetNode("/sim/presets/longitude-deg");
static const SGPropertyNode *latitude
- = fgGetNode("/position/latitude-deg");
+ = fgGetNode("/sim/presets/latitude-deg");
static const SGPropertyNode *altitude
- = fgGetNode("/position/altitude-ft");
+ = fgGetNode("/sim/presets/altitude-ft");
static const SGPropertyNode *master_freeze
= fgGetNode("/sim/freeze/master");
fgSaveFlight (ostream &output, bool write_all)
{
- fgSetBool("/sim/startup/onground", false);
- fgSetArchivable("/sim/startup/onground");
- fgSetBool("/sim/startup/trim", false);
- fgSetArchivable("/sim/startup/trim");
- fgSetString("/sim/startup/speed-set", "UVW");
- fgSetArchivable("/sim/startup/speed-set");
+ fgSetBool("/sim/presets/onground", false);
+ fgSetArchivable("/sim/presets/onground");
+ fgSetBool("/sim/presets/trim", false);
+ fgSetArchivable("/sim/presets/trim");
+ fgSetString("/sim/presets/speed-set", "UVW");
+ fgSetArchivable("/sim/presets/speed-set");
try {
writeProperties(output, globals->get_props(), write_all);
return false;
}
- fgSetBool("/sim/startup/onground", false);
- fgSetBool("/sim/startup/trim", false);
- fgSetString("/sim/startup/speed-set", "UVW");
+ fgSetBool("/sim/presets/onground", false);
+ fgSetBool("/sim/presets/trim", false);
+ fgSetString("/sim/presets/speed-set", "UVW");
copyProperties(&props, globals->get_props());
// When loading a flight, make it the
double lon_deg = fgGetDouble("/position/longitude-deg");
double lat_deg = fgGetDouble("/position/latitude-deg");
if (lon_deg < -180 || lon_deg > 180 || lat_deg < -90 || lat_deg > 90) {
- if ( fgGetString("/sim/startup/airport-id")[0] != '\0' ) {
- fgSetPosFromAirportIDandHdg( fgGetString("/sim/startup/airport-id"),
- fgGetDouble("/orientation/heading-deg") );
+ if ( fgGetString("/sim/presets/airport-id")[0] != '\0' ) {
+ fgSetPosFromAirportIDandHdg( fgGetString("/sim/presets/airport-id"),
+ fgGetDouble("/sim/presets/heading-deg") );
// set tower position (a little off the heading for single
// runway airports)
- fgSetTowerPosFromAirportID( fgGetString("/sim/startup/airport-id"),
- fgGetDouble("orientation/heading") );
+ fgSetTowerPosFromAirportID( fgGetString("/sim/presets/airport-id"),
+ fgGetDouble("/sim/presets/heading-deg") );
} else {
// Default to middle of KSFO field
- fgSetDouble("/position/longitude-deg", -122.374843);
- fgSetDouble("/position/latitude-deg", 37.619002);
+ fgSetDouble("/sim/presets/longitude-deg", -122.374843);
+ fgSetDouble("/sim/presets/latitude-deg", 37.619002);
}
}
fgSetDouble("/orientation/pitch-deg", 0.424);
// Velocities
- fgSetString("/sim/startup/speed-set", "knots");
fgSetDouble("/velocities/uBody-fps", 0.0);
fgSetDouble("/velocities/vBody-fps", 0.0);
fgSetDouble("/velocities/wBody-fps", 0.0);
fgSetDouble("/velocities/airspeed-kt", 0.0);
fgSetDouble("/velocities/mach", 0.0);
+ // Presets
+ fgSetDouble("/sim/presets/longitude-deg", 9999.0);
+ fgSetDouble("/sim/presets/latitude-deg", 9999.0);
+ fgSetDouble("/sim/presets/altitude-ft", -9999.0);
+
+ fgSetDouble("/sim/presets/heading-deg", 270);
+ fgSetDouble("/sim/presets/roll-deg", 0);
+ fgSetDouble("/sim/presets/pitch-deg", 0.424);
+
+ fgSetString("/sim/presets/speed-set", "knots");
+ fgSetDouble("/sim/presets/airspeed-kt", 0.0);
+ fgSetDouble("/sim/presets/mach", 0.0);
+ fgSetDouble("/sim/presets/uBody-fps", 0.0);
+ fgSetDouble("/sim/presets/vBody-fps", 0.0);
+ fgSetDouble("/sim/presets/wBody-fps", 0.0);
+ fgSetDouble("/sim/presets/speed-north-fps", 0.0);
+ fgSetDouble("/sim/presets/speed-east-fps", 0.0);
+ fgSetDouble("/sim/presets/speed-down-fps", 0.0);
+
+ fgSetBool("/sim/presets/onground", true);
+ fgSetBool("/sim/presets/trim", false);
+
// Miscellaneous
fgSetBool("/sim/startup/game-mode", false);
fgSetBool("/sim/startup/splash-screen", true);
fgSetString("/sim/aero", "c172");
fgSetInt("/sim/model-hz", NEW_DEFAULT_MODEL_HZ);
fgSetInt("/sim/speed-up", 1);
- fgSetBool("/sim/startup/trim", false);
- fgSetBool("/sim/startup/onground", true);
// Rendering options
fgSetString("/sim/rendering/fog", "nicest");
fgSetBool("/sim/sound/audible", true);
} else if ( arg.find( "--airport-id=") == 0 ) {
// NB: changed property name!!!
- fgSetString("/sim/startup/airport-id", arg.substr(13).c_str());
+ fgSetString("/sim/presets/airport-id", arg.substr(13).c_str());
} else if ( arg.find( "--offset-distance=") == 0 ) {
- fgSetDouble("/sim/startup/offset-distance", atof(arg.substr(18)));
+ fgSetDouble("/sim/presets/offset-distance", atof(arg.substr(18)));
} else if ( arg.find( "--offset-azimuth=") == 0 ) {
- fgSetDouble("/sim/startup/offset-azimuth", atof(arg.substr(17)));
+ fgSetDouble("/sim/presets/offset-azimuth", atof(arg.substr(17)));
} else if ( arg.find( "--lon=" ) == 0 ) {
- fgSetDouble("/position/longitude-deg",
- parse_degree(arg.substr(6)));
- fgSetString("/sim/startup/airport-id", "");
+ fgSetDouble("/sim/presets/longitude-deg", parse_degree(arg.substr(6)));
+ fgSetDouble("/position/longitude-deg", parse_degree(arg.substr(6)));
+ fgSetString("/sim/presets/airport-id", "");
} else if ( arg.find( "--lat=" ) == 0 ) {
- fgSetDouble("/position/latitude-deg",
- parse_degree(arg.substr(6)));
- fgSetString("/sim/startup/airport-id", "");
+ fgSetDouble("/sim/presets/latitude-deg", parse_degree(arg.substr(6)));
+ fgSetDouble("/position/latitude-deg", parse_degree(arg.substr(6)));
+ fgSetString("/sim/presets/airport-id", "");
} else if ( arg.find( "--altitude=" ) == 0 ) {
- fgSetBool("/sim/startup/onground", false);
+ fgSetBool("/sim/presets/onground", false);
if ( !strcmp(fgGetString("/sim/startup/units"), "feet") )
- fgSetDouble("/position/altitude-ft", atof(arg.substr(11)));
+ fgSetDouble("/sim/presets/altitude-ft", atof(arg.substr(11)));
else
- fgSetDouble("/position/altitude-ft",
+ fgSetDouble("/sim/presets/altitude-ft",
atof(arg.substr(11)) * SG_METER_TO_FEET);
} else if ( arg.find( "--uBody=" ) == 0 ) {
- fgSetString("/sim/startup/speed-set", "UVW");
+ fgSetString("/sim/presets/speed-set", "UVW");
if ( !strcmp(fgGetString("/sim/startup/units"), "feet") )
- fgSetDouble("/velocities/uBody-fps", atof(arg.substr(8)));
+ fgSetDouble("/sim/presets/uBody-fps", atof(arg.substr(8)));
else
- fgSetDouble("/velocities/uBody-fps",
- atof(arg.substr(8)) * SG_METER_TO_FEET);
+ fgSetDouble("/sim/presets/uBody-fps",
+ atof(arg.substr(8)) * SG_METER_TO_FEET);
} else if ( arg.find( "--vBody=" ) == 0 ) {
- fgSetString("/sim/startup/speed-set", "UVW");
+ fgSetString("/sim/presets/speed-set", "UVW");
if ( !strcmp(fgGetString("/sim/startup/units"), "feet") )
- fgSetDouble("/velocities/vBody-fps", atof(arg.substr(8)));
+ fgSetDouble("/sim/presets/vBody-fps", atof(arg.substr(8)));
else
- fgSetDouble("/velocities/vBody-fps",
+ fgSetDouble("/sim/presets/vBody-fps",
atof(arg.substr(8)) * SG_METER_TO_FEET);
} else if ( arg.find( "--wBody=" ) == 0 ) {
- fgSetString("/sim/startup/speed-set", "UVW");
+ fgSetString("/sim/presets/speed-set", "UVW");
if ( !strcmp(fgGetString("/sim/startup/units"), "feet") )
- fgSetDouble("/velocities/wBody-fps", atof(arg.substr(8)));
+ fgSetDouble("/sim/presets/wBody-fps", atof(arg.substr(8)));
else
- fgSetDouble("/velocities/wBody-fps",
+ fgSetDouble("/sim/presets/wBody-fps",
atof(arg.substr(8)) * SG_METER_TO_FEET);
} else if ( arg.find( "--vNorth=" ) == 0 ) {
- fgSetString("/sim/startup/speed-set", "NED");
+ fgSetString("/sim/presets/speed-set", "NED");
if ( !strcmp(fgGetString("/sim/startup/units"), "feet") )
- fgSetDouble("/velocities/speed-north-fps", atof(arg.substr(9)));
+ fgSetDouble("/sim/presets/speed-north-fps", atof(arg.substr(9)));
else
- fgSetDouble("/velocities/speed-north-fps",
+ fgSetDouble("/sim/presets/speed-north-fps",
atof(arg.substr(9)) * SG_METER_TO_FEET);
} else if ( arg.find( "--vEast=" ) == 0 ) {
- fgSetString("/sim/startup/speed-set", "NED");
+ fgSetString("/sim/presets/speed-set", "NED");
if ( !strcmp(fgGetString("/sim/startup/units"), "feet") )
- fgSetDouble("/velocities/speed-east-fps", atof(arg.substr(8)));
+ fgSetDouble("/sim/presets/speed-east-fps", atof(arg.substr(8)));
else
- fgSetDouble("/velocities/speed-east-fps",
+ fgSetDouble("/sim/presets/speed-east-fps",
atof(arg.substr(8)) * SG_METER_TO_FEET);
} else if ( arg.find( "--vDown=" ) == 0 ) {
- fgSetString("/sim/startup/speed-set", "NED");
+ fgSetString("/sim/presets/speed-set", "NED");
if ( !strcmp(fgGetString("/sim/startup/units"), "feet") )
- fgSetDouble("/velocities/speed-down-fps", atof(arg.substr(8)));
+ fgSetDouble("/sim/presets/speed-down-fps", atof(arg.substr(8)));
else
- fgSetDouble("/velocities/speed-down-fps",
+ fgSetDouble("/sim/presets/speed-down-fps",
atof(arg.substr(8)) * SG_METER_TO_FEET);
} else if ( arg.find( "--vc=" ) == 0) {
- fgSetString("/sim/startup/speed-set", "knots");
- fgSetDouble("/velocities/airspeed-kt", atof(arg.substr(5)));
+ // fgSetString("/sim/presets/speed-set", "knots");
+ // fgSetDouble("/velocities/airspeed-kt", atof(arg.substr(5)));
+ fgSetString("/sim/presets/speed-set", "knots");
+ fgSetDouble("/sim/presets/airspeed-kt", atof(arg.substr(5)));
} else if ( arg.find( "--mach=" ) == 0) {
- fgSetString("/sim/startup/speed-set", "mach");
- fgSetDouble("/velocities/mach", atof(arg.substr(7)));
+ fgSetString("/sim/presets/speed-set", "mach");
+ fgSetDouble("/sim/presets/mach", atof(arg.substr(7)));
} else if ( arg.find( "--heading=" ) == 0 ) {
- fgSetDouble("/orientation/heading-deg", atof(arg.substr(10)));
+ fgSetDouble("/sim/presets/heading-deg", atof(arg.substr(10)));
} else if ( arg.find( "--roll=" ) == 0 ) {
- fgSetDouble("/orientation/roll-deg", atof(arg.substr(7)));
+ fgSetDouble("/sim/presets/roll-deg", atof(arg.substr(7)));
} else if ( arg.find( "--pitch=" ) == 0 ) {
- fgSetDouble("/orientation/pitch-deg", atof(arg.substr(8)));
+ fgSetDouble("/sim/presets/pitch-deg", atof(arg.substr(8)));
} else if ( arg.find( "--glideslope=" ) == 0 ) {
fgSetDouble("/velocities/glideslope", atof(arg.substr(13))
*SG_DEGREES_TO_RADIANS);
} else if ( arg.find( "--speed=" ) == 0 ) {
fgSetInt("/sim/speed-up", atoi(arg.substr(8)));
} else if ( arg.find( "--trim") == 0) {
- fgSetBool("/sim/startup/trim", true);
+ fgSetBool("/sim/presets/trim", true);
} else if ( arg.find( "--notrim") == 0) {
- fgSetBool("/sim/startup/trim", false);
+ fgSetBool("/sim/presets/trim", false);
} else if ( arg.find( "--on-ground") == 0) {
- fgSetBool("/sim/startup/onground", true);
+ fgSetBool("/sim/presets/onground", true);
} else if ( arg.find( "--in-air") == 0) {
- fgSetBool("/sim/startup/onground", false);
+ fgSetBool("/sim/presets/onground", false);
} else if ( arg == "--fog-disable" ) {
fgSetString("/sim/rendering/fog", "disabled");
} else if ( arg == "--fog-fastest" ) {
continue;
}
- SGPropertyNode *desc, *node = root.getNode("sim");
- if (node)
+ SGPropertyNode *desc = NULL;
+ SGPropertyNode *node = root.getNode("sim");
+ if (node) {
desc = node->getNode("description");
+ }
char cstr[96];
if (strlen(dire->d_name) <= 27)
textured->disable( GL_BLEND );
textured->disable( GL_ALPHA_TEST );
if ( !defer_tex_load ) {
+ SG_LOG(SG_INPUT, SG_INFO, " " << texture_path );
textured->setTexture( (char *)texture_path.c_str(), wrapu, wrapv );
texture_loaded = true;
} else {