result = fdmex->LoadModel( aircraft_path.str(),
engine_path.str(),
- fgGetString("/sim/aircraft") );
+ fgGetString("/sim/aero") );
if (result) {
- SG_LOG( SG_FLIGHT, SG_INFO, " loaded aircraft.");
+ SG_LOG( SG_FLIGHT, SG_INFO, " loaded aero.");
} else {
SG_LOG( SG_FLIGHT, SG_INFO,
- " aircraft does not exist (you may have mis-typed the name).");
+ " aero does not exist (you may have mis-typed the name).");
throw(-1);
}
SG_LOG( SG_FLIGHT, SG_INFO, "" );
SG_LOG( SG_FLIGHT, SG_INFO, "" );
- SG_LOG( SG_FLIGHT, SG_INFO, "After loading aircraft definition file ..." );
+ SG_LOG( SG_FLIGHT, SG_INFO, "After loading aero definition file ..." );
int Neng = Propulsion->GetNumEngines();
SG_LOG( SG_FLIGHT, SG_INFO, "num engines = " << Neng );
rudder_trim = fgGetNode("/fdm/trim/rudder", true );
- stall_warning = fgGetNode("/sim/aircraft/alarms/stall-warning",true);
+ stall_warning = fgGetNode("/sim/aero/alarms/stall-warning",true);
stall_warning->setDoubleValue(0);
}
set_delta_t( dt );
speed_up = fgGetNode("/sim/speed-up", true);
- aircraft = fgGetNode("/sim/aircraft", true);
+ aero = fgGetNode("/sim/aero", true);
- ls_toplevel_init( 0.0, (char *)(aircraft->getStringValue().c_str()) );
+ ls_toplevel_init( 0.0, (char *)(aero->getStringValue().c_str()) );
lsic=new LaRCsimIC; //this needs to be brought up after LaRCsim is
- if ( aircraft->getStringValue() == "c172" ) {
+ if ( aero->getStringValue() == "c172" ) {
copy_to_LaRCsim(); // initialize all of LaRCsim's vars
//this should go away someday -- formerly done in fg_init.cxx
// Run an iteration of the EOM (equations of motion)
bool FGLaRCsim::update( int multiloop ) {
- if ( aircraft->getStringValue() == "c172" ) {
+ if ( aero->getStringValue() == "c172" ) {
// set control inputs
// cout << "V_calibrated_kts = " << V_calibrated_kts << '\n';
eng.set_IAS( V_calibrated_kts );
speed_up->getIntValue();
Flap_handle = 30.0 * globals->get_controls()->get_flaps();
- if ( aircraft->getStringValue() == "c172" ) {
+ if ( aero->getStringValue() == "c172" ) {
Use_External_Engine = 1;
} else {
Use_External_Engine = 0;
_set_Climb_Rate( -1 * V_down );
// cout << "climb rate = " << -V_down * 60 << endl;
- if ( aircraft->getStringValue() == "uiuc" ) {
+ if ( aero->getStringValue() == "uiuc" ) {
if (pilot_elev_no) {
globals->get_controls()->set_elevator(Long_control);
globals->get_controls()->set_elevator_trim(Long_trim);
void snap_shot(void);
double time_step;
SGPropertyNode *speed_up;
- SGPropertyNode *aircraft;
+ SGPropertyNode *aero;
public:
} else {
SG_LOG(SG_GENERAL, SG_ALERT,
"Unrecognized flight model '" << model
- << ", can't init aircraft");
+ << "', cannot init flight dynamics model.");
exit(-1);
}
} catch ( ... ) {
} else {
SG_LOG(SG_GENERAL, SG_ALERT,
"Unrecognized flight model '" << model
- << ", can't init aircraft");
+ << "', cannot init flight dynamics model.");
exit(-1);
}
} catch ( ... ) {
// Flight Model options
fgSetString("/sim/flight-model", "jsb");
- fgSetString("/sim/aircraft", "c172");
+ fgSetString("/sim/aero", "c172");
fgSetInt("/sim/model-hz", NEW_DEFAULT_MODEL_HZ);
fgSetInt("/sim/speed-up", 1);
fgSetBool("/sim/startup/trim", false);
globals->set_fg_scenery(arg.substr( 13 ));
} else if ( arg.find( "--fdm=" ) == 0 ) {
fgSetString("/sim/flight-model", arg.substr(6));
- } else if ( arg.find( "--aircraft=" ) == 0 ) {
- fgSetString("/sim/aircraft", arg.substr(11));
+ } else if ( arg.find( "--aero=" ) == 0 ) {
+ fgSetString("/sim/aero", arg.substr(7));
} else if ( arg.find( "--aircraft-dir=" ) == 0 ) {
fgSetString("/sim/aircraft-dir", arg.substr(15));
} else if ( arg.find( "--model-hz=" ) == 0 ) {
cout << "\t--fdm=abcd: selects the core flight model code." << endl;
cout << "\t\tcan be one of jsb, larcsim, magic, null, external, balloon, or ada"
<< endl;
- cout << "\t--aircraft=abcd: aircraft model to load" << endl;
+ cout << "\t--aero=abcd: aerodynamics model to load" << endl;
cout << "\t--model-hz=n: run the FDM this rate (iterations per second)"
<< endl;
cout << "\t--speed=n: run the FDM this much faster than real time" << endl;
sprintf(buf, "/engines/engine[%d]/cranking", i);
_engine_cranking_prop[i] = fgGetNode(buf, true);
}
- _stall_warning_prop = fgGetNode("/sim/aircraft/alarms/stall-warning", true);
+ _stall_warning_prop = fgGetNode("/sim/aero/alarms/stall-warning", true);
_vc_prop = fgGetNode("/velocities/airspeed-kt", true);
_flaps_prop = fgGetNode("/controls/flaps", true);
_gear_prop = fgGetNode("/controls/gear-down", true);
SGPath zone( globals->get_fg_root() );
zone.append( "Timezone" );
+ cout << "updateLocal("
+ << longitude->getDoubleValue() * SGD_DEGREES_TO_RADIANS
+ << ", "
+ << latitude->getDoubleValue() * SGD_DEGREES_TO_RADIANS
+ << ", " << zone.str() << ")" << endl;
globals->get_time_params()->updateLocal( longitude->getDoubleValue()
* SGD_DEGREES_TO_RADIANS,
latitude->getDoubleValue()