]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/flight.cxx
Add speed-brake and spoilers controlls
[flightgear.git] / src / FDM / flight.cxx
index 808ae614feeb20e4d8d9228be2250b2eaa188f73..808da0580ee0e768d9e6749ef52a0f777249bb80 100644 (file)
@@ -326,11 +326,6 @@ FGInterface::bind ()
        &FGInterface::set_Psi_deg);
   fgSetArchivable("/orientation/heading-deg");
 
-                                // Rates
-  fgTie("/rates/roll-deg_sec", this, &FGInterface::get_Phi_dot_degps);
-  fgTie("/rates/pitch-deg_sec", this, &FGInterface::get_Theta_dot_degps);
-  fgTie("/rates/heading-deg_sec", this, &FGInterface::get_Psi_dot_degps);
-
   // Body-axis "euler rates" (rotation speed, but in a funny
   // representation).
   fgTie("/orientation/roll-rate-degps", this,
@@ -344,6 +339,12 @@ FGInterface::bind ()
   fgTie("/velocities/airspeed-kt", this,
        &FGInterface::get_V_calibrated_kts,
        &FGInterface::set_V_calibrated_kts,
+       false);
+
+                               // Mach number
+  fgTie("/velocities/mach", this,
+       &FGInterface::get_Mach_number,
+       &FGInterface::set_Mach_number,
        false);
 
                                // Local velocities
@@ -396,21 +397,29 @@ FGInterface::bind ()
   fgTie("/velocities/glideslope", this,
   &FGInterface::get_Gamma_vert_rad,
   &FGInterface::set_Gamma_vert_rad );
-  fgTie("/velocities/side-slip-rad", this,
+  fgTie("/orientation/side-slip-rad", this,
        &FGInterface::get_Beta); // read-only
-  fgTie("/velocities/side-slip-deg", this,
+  fgTie("/orientation/side-slip-deg", this,
   &FGInterface::get_Beta_deg); // read-only
-  fgTie("/velocities/alpha-deg", this,
+  fgTie("/orientation/alpha-deg", this,
   &FGInterface::get_Alpha_deg); // read-only
   fgTie("/accelerations/nlf", this,
   &FGInterface::get_Nlf); // read-only
 
+                                // NED accelerations
+  fgTie("/accelerations/ned/north-accel-fps_sec",
+        this, &FGInterface::get_V_dot_north);
+  fgTie("/accelerations/ned/east-accel-fps_sec",
+        this, &FGInterface::get_V_dot_east);
+  fgTie("/accelerations/ned/down-accel-fps_sec",
+        this, &FGInterface::get_V_dot_down);
+
                                 // Pilot accelerations
-  fgTie("/accelerations/pilot/x-accel-ft_sec2",
+  fgTie("/accelerations/pilot/x-accel-fps_sec",
         this, &FGInterface::get_A_X_pilot);
-  fgTie("/accelerations/pilot/y-accel-ft_sec2",
+  fgTie("/accelerations/pilot/y-accel-fps_sec",
         this, &FGInterface::get_A_Y_pilot);
-  fgTie("/accelerations/pilot/z-accel-ft_sec2",
+  fgTie("/accelerations/pilot/z-accel-fps_sec",
         this, &FGInterface::get_A_Z_pilot);
 
 }
@@ -438,10 +447,8 @@ FGInterface::unbind ()
   fgUntie("/orientation/roll-deg");
   fgUntie("/orientation/pitch-deg");
   fgUntie("/orientation/heading-deg");
-  fgUntie("/rates/roll-deg_sec");
-  fgUntie("/rates/pitch-deg_sec");
-  fgUntie("/rates/heading-deg_sec");
   fgUntie("/velocities/airspeed-kt");
+  fgUntie("/velocities/mach");
   fgUntie("/velocities/speed-north-fps");
   fgUntie("/velocities/speed-east-fps");
   fgUntie("/velocities/speed-down-fps");
@@ -490,7 +497,9 @@ void FGInterface::_updateGeodeticPosition( double lat, double lon, double alt )
     _set_Geodetic_Position( lat, lon, alt );
 
     _set_Sea_level_radius( sl_radius * SG_METER_TO_FEET );
-    _set_Runway_altitude( getACModel()->get3DModel()->getFGLocation()->get_cur_elev_m() * SG_METER_TO_FEET );
+    if ( getACModel() != NULL ) {
+        _set_Runway_altitude( getACModel()->get3DModel()->getFGLocation()->get_cur_elev_m() * SG_METER_TO_FEET );
+    }
 
     _set_sin_lat_geocentric( lat_geoc );
     _set_cos_lat_geocentric( lat_geoc );