]> git.mxchange.org Git - flightgear.git/commitdiff
Fixed so that ASI will indicate correctly (or at least, more
authordavid <david>
Wed, 16 Oct 2002 22:09:26 +0000 (22:09 +0000)
committerdavid <david>
Wed, 16 Oct 2002 22:09:26 +0000 (22:09 +0000)
correctly) in winds.

src/Systems/pitot.cxx
src/Systems/pitot.hxx

index 3cd8f948543ba25c810b351c233085f2e5a312e2..daa20edec50d2fffd542c12d5a24f13cd630cffb 100644 (file)
@@ -22,7 +22,7 @@ PitotSystem::init ()
     _serviceable_node = fgGetNode("/systems/pitot[0]/serviceable", true);
     _pressure_node = fgGetNode("/environment/pressure-inhg", true);
     _density_node = fgGetNode("/environment/density-slugft3", true);
-    _velocity_node = fgGetNode("/velocities/uBody-fps", true);
+    _velocity_node = fgGetNode("/velocities/airspeed-kt", true);
     _total_pressure_node =
         fgGetNode("/systems/pitot[0]/total-pressure-inhg", true);
 }
@@ -41,6 +41,11 @@ PitotSystem::unbind ()
 # define INHGTOPSF (2116.217/29.9212)
 #endif
 
+#ifndef KTTOFPS
+# define KTTOFPS 1.68781
+#endif
+
+
 void
 PitotSystem::update (double dt)
 {
@@ -49,7 +54,7 @@ PitotSystem::update (double dt)
                                 // velocity in the body axis.
         double p = _pressure_node->getDoubleValue(); // static
         double r = _density_node->getDoubleValue();
-        double v = _velocity_node->getDoubleValue();
+        double v = _velocity_node->getDoubleValue() * KTTOFPS;
         double q = 0.5 * r * v * v / INHGTOPSF; // dynamic
         _total_pressure_node->setDoubleValue(p + q);
     }
index 65a3896aa6cc281d6a5f49eef30ba99366761d1f..8d0146fc3d351c1f258f95a10b064c6551d52abd 100644 (file)
@@ -26,7 +26,7 @@
  * /systems/pitot[0]/serviceable
  * /environment/pressure-slugft3
  * /environment/density-slugft3
- * /velocities/uBody-fps
+ * /velocities/airspeed-kt
  *
  * Output properties:
  *