]> git.mxchange.org Git - flightgear.git/commitdiff
Changed --aircraft= to --aero= to make way for a high level aircraft definition
authorcurt <curt>
Thu, 6 Dec 2001 23:10:50 +0000 (23:10 +0000)
committercurt <curt>
Thu, 6 Dec 2001 23:10:50 +0000 (23:10 +0000)
that will tie together fdm, aero model, 3d model, sounds, etc. into one
top level config file.

src/FDM/JSBSim.cxx
src/FDM/LaRCsim.cxx
src/FDM/LaRCsim.hxx
src/Main/fg_init.cxx
src/Main/options.cxx
src/Sound/fg_fx.cxx
src/Time/tmp.cxx

index b4c2c7340cbed0dea3415d81254a52305b46d377..b952113c19bfb3a1c97eac95b9ed7af3c28793a8 100644 (file)
@@ -95,19 +95,19 @@ FGJSBsim::FGJSBsim( double dt )
 
     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 );
@@ -143,7 +143,7 @@ FGJSBsim::FGJSBsim( double dt )
     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);
 }
 
index fedef5a210c2a3823aabab8102e6e7187a7882ce..32e93444c25d277babb4dbb96e2ea2b4f63dd861 100644 (file)
@@ -43,12 +43,12 @@ FGLaRCsim::FGLaRCsim( double dt ) {
     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
@@ -98,7 +98,7 @@ void FGLaRCsim::init() {
 // 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 );
@@ -172,7 +172,7 @@ bool FGLaRCsim::update( int multiloop ) {
         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;
@@ -544,7 +544,7 @@ bool FGLaRCsim::copy_from_LaRCsim() {
     _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);
index bc37e85a5932ac4d0cb202dc6f468c318fe6a0e2..3d598dd529640c4d2d89f9473fd6932abe71df85 100644 (file)
@@ -41,7 +41,7 @@ private:
     void snap_shot(void);
     double time_step;
     SGPropertyNode *speed_up;
-    SGPropertyNode *aircraft;
+    SGPropertyNode *aero;
     
 public:
 
index 7080b616330c51f75a93ca299ad011d5671f1a7f..9917c989ce736a8f259cdb6abfea5d41697e1371 100644 (file)
@@ -566,7 +566,7 @@ bool fgInitSubsystems( void ) {
        } else {
            SG_LOG(SG_GENERAL, SG_ALERT,
                   "Unrecognized flight model '" << model
-                  << ", can't init aircraft");
+                  << "', cannot init flight dynamics model.");
            exit(-1);
        }
     } catch ( ... ) {
@@ -942,7 +942,7 @@ void fgReInitSubsystems( void )
        } else {
            SG_LOG(SG_GENERAL, SG_ALERT,
                   "Unrecognized flight model '" << model
-                  << ", can't init aircraft");
+                  << "', cannot init flight dynamics model.");
            exit(-1);
        }
     } catch ( ... ) {
index 43056119b4a3d907d053c6b41551412ea652431f..cb144687542bf444ff4c3a7d53be858aa2e69494 100644 (file)
@@ -160,7 +160,7 @@ fgSetDefaults ()
 
                                // 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);
@@ -662,8 +662,8 @@ parse_option (const string& arg)
         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 ) {
@@ -1092,7 +1092,7 @@ fgUsage ()
     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;
index 668e9d3564174f7dc1edcde76fb4b97044bf2b4f..a344fd425e05f9d95559f7b1674e673643574a98 100644 (file)
@@ -188,7 +188,7 @@ FGFX::init ()
     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);
index e4df6525176eb473d1119a92193ec308fb428484..b15514934bb2ae006d9a0764fda6c6967a50cbcc 100644 (file)
@@ -48,6 +48,11 @@ void fgUpdateLocalTime() {
     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()