]> git.mxchange.org Git - flightgear.git/commitdiff
Andy Ross:
authorcurt <curt>
Tue, 29 Oct 2002 19:27:05 +0000 (19:27 +0000)
committercurt <curt>
Tue, 29 Oct 2002 19:27:05 +0000 (19:27 +0000)
Make rotational rate FDM values available from the property tree.
This is required for some cool stuff I've been doing with the Harrier.

src/FDM/flight.cxx
src/FDM/flight.hxx

index 362fc062b6b5b41475be7af4e66033d5b0de66ca..1bf5808271882e86baf2a50d30408787490ec033 100644 (file)
@@ -323,6 +323,15 @@ FGInterface::bind ()
        &FGInterface::set_Psi_deg);
   fgSetArchivable("/orientation/heading-deg");
 
+  // Body-axis "euler rates" (rotation speed, but in a funny
+  // representation).
+  fgTie("/orientation/roll-rate-degps", this,
+       &FGInterface::get_Phi_dot_degps);
+  fgTie("/orientation/pitch-rate-degps", this,
+       &FGInterface::get_Theta_dot_degps);
+  fgTie("/orientation/yaw-rate-degps", this,
+       &FGInterface::get_Psi_dot_degps);
+
                                // Calibrated airspeed
   fgTie("/velocities/airspeed-kt", this,
        &FGInterface::get_V_calibrated_kts,
index 4a6d98c3d298bc08daeb0328e005fde068db2875..a458aac0712e25b73bab86dcefeb64e01523f980 100644 (file)
@@ -839,6 +839,9 @@ public:
     inline double get_Phi_dot() const { return euler_rates_v[0]; }
     inline double get_Theta_dot() const { return euler_rates_v[1]; }
     inline double get_Psi_dot() const { return euler_rates_v[2]; }
+    inline double get_Phi_dot_degps() const { return euler_rates_v[0] * SGD_RADIANS_TO_DEGREES; }
+    inline double get_Theta_dot_degps() const { return euler_rates_v[1] * SGD_RADIANS_TO_DEGREES; }
+    inline double get_Psi_dot_degps() const { return euler_rates_v[2] * SGD_RADIANS_TO_DEGREES; }
 
     // inline double * get_Geocentric_rates_v() { return geocentric_rates_v; }
     inline double get_Latitude_dot() const { return geocentric_rates_v[0]; }