// Flight Model options
flight_model( FGInterface::FG_LARCSIM ),
+ aircraft( "c172" ),
model_hz( NEW_DEFAULT_MODEL_HZ ),
speed_up( 1 ),
// Parse --fdm=abcdefg type option
int
fgOPTIONS::parse_fdm( const string& fm ) {
- // printf("fdm = %s\n", fm);
+ // cout << "fdm = " << fm << endl;
if ( fm == "balloon" ) {
return FGInterface::FG_BALLOONSIM;
fg_root = arg.substr( 10 );
} else if ( arg.find( "--fdm=" ) != string::npos ) {
flight_model = parse_fdm( arg.substr(6) );
+ } else if ( arg.find( "--aircraft=" ) != string::npos ) {
+ aircraft = arg.substr(11);
} else if ( arg.find( "--model-hz=" ) != string::npos ) {
model_hz = atoi( arg.substr(11) );
} else if ( arg.find( "--speed=" ) != string::npos ) {
cout << endl;
cout << "Flight Model:" << endl;
- cout << "\t--fdm=abcd: one of slew, jsb, larcsim, or external" << endl;
+ cout << "\t--fdm=abcd: selects the core flight model code." << endl;
+ cout << "\t\tcan be one of jsb, larcsim, magic, or external" << endl;
+ cout << "\t--aircraft=abcd: aircraft 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;
bool sound; // play sound effects
// Flight Model options
- int flight_model; // Flight Model: FG_SLEW, FG_LARCSIM, etc.
+ int flight_model; // Core flight model code: jsb, larcsim, magic, etc.
+ string aircraft; // Aircraft to model
int model_hz; // number of FDM iterations per second
int speed_up; // Sim mechanics run this much faster than normal speed
inline bool get_panel_status() const { return panel_status; }
inline bool get_sound() const { return sound; }
inline int get_flight_model() const { return flight_model; }
+ inline string get_aircraft() const { return aircraft; }
inline int get_model_hz() const { return model_hz; }
inline int get_speed_up() const { return speed_up; }
inline void set_speed_up( int speed ) { speed_up = speed; }