]> git.mxchange.org Git - flightgear.git/commitdiff
Revert "pitot tube using velocities/mach as mach norm, not the u componant"
authorjanodesbois <jean.pellotier@wanadoo.fr>
Thu, 31 Oct 2013 21:27:29 +0000 (22:27 +0100)
committerjanodesbois <jean.pellotier@wanadoo.fr>
Thu, 31 Oct 2013 21:27:29 +0000 (22:27 +0100)
pushed a testing patch, need to learn a good workflow ...
This reverts commit 05fa7130fc328cca43272b65de7ae508339d53e6.

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

index 8fdbdd19e38793beb8fbaf52e116286d4b3166ad..4f18431cd46631eefbf26669aa9d4b77fe690708 100644 (file)
@@ -37,8 +37,6 @@ PitotSystem::init ()
     _serviceable_node = node->getChild("serviceable", 0, true);
     _pressure_node = fgGetNode("/environment/pressure-inhg", true);
     _mach_node = fgGetNode("/velocities/mach", true);
-    _alpha_deg_node = fgGetNode("/orientation/alpha-deg", true);
-    _beta_deg_node = fgGetNode("/orientation/side-slip-deg", true);
     _total_pressure_node = node->getChild("total-pressure-inhg", 0, true);
     _measured_total_pressure_node = node->getChild("measured-total-pressure-inhg", 0, true);
 }
@@ -59,17 +57,14 @@ PitotSystem::update (double dt)
     if (_serviceable_node->getBoolValue()) {
         double p = _pressure_node->getDoubleValue();
         double mach = _mach_node->getDoubleValue();
-        double alpha = _alpha_deg_node->getDoubleValue() * SGD_DEGREES_TO_RADIANS;
-        double beta = _beta_deg_node->getDoubleValue() * SGD_DEGREES_TO_RADIANS;
-        mach = mach * fabs(cos(alpha)) * cos(beta);
-        mach = std::max( mach , 0.0 ); // we want a mach=0 if the airflow comes from behind
+        mach = std::max( mach , 0.0 );
         double p_t = p * pow(1 + 0.2 * mach*mach, 3.5 );    // true total pressure around aircraft
         _total_pressure_node->setDoubleValue(p_t);
         double p_t_meas = p_t;
         if (mach > 1) {    
           p_t_meas = p * pow( 1.2 * mach*mach, 3.5 ) * pow( 2.8/2.4*mach*mach - 0.4 / 2.4 , -2.5 );    // measured total pressure by pitot tube (Rayleigh formula, at Mach>1, normal shockwave in front of pitot tube)     
         }
-        _measured_total_pressure_node->setDoubleValue(mach);
+        _measured_total_pressure_node->setDoubleValue(p_t_meas);
     }
 }
 
index cad000f2233b9a5f3fc62a14b896ac1a9804e56b..7f1e487875b268827385b6d4a31471df10e56f94 100644 (file)
@@ -60,8 +60,6 @@ private:
     SGPropertyNode_ptr _mach_node;
     SGPropertyNode_ptr _total_pressure_node;
     SGPropertyNode_ptr _measured_total_pressure_node;
-    SGPropertyNode_ptr _alpha_deg_node;
-    SGPropertyNode_ptr _beta_deg_node;
 };
 
 #endif // __SYSTEMS_PITOT_HXX