]> git.mxchange.org Git - flightgear.git/blobdiff - src/Environment/atmosphere.cxx
Pull Sound-manager out of FGGlobals
[flightgear.git] / src / Environment / atmosphere.cxx
index 099669586a82b41f046ef5a7ecedb91d58be26ca..dc823292faf12420adc1f2a5cb11e92543a62ed5 100644 (file)
@@ -7,6 +7,7 @@
 
 using namespace std;
 #include <iostream>
+#include <cstdio>
 
 const ISA_layer ISA_def[] = {
 //        0    1        2        3           4         5      6         7         8
@@ -18,11 +19,10 @@ ISA_layer(3,  32000,  104986,  868.019,    0.256326, 228.65, -44.50, -0.0028,  -
 ISA_layer(4,  47000,  154199,  110.906,   0.0327506, 270.65,  -2.50,       0,           0),
 ISA_layer(5,  51000,  167322,  66.9389,   0.0197670, 270.65,  -2.50,  0.0028,   0.0008534),
 ISA_layer(6,  71000,  232939,  3.95642,  0.00116833, 214.65, -58.50,  0.0020,   0.0006096),
-ISA_layer(7,  80000,  262467,  0.88628, 0.000261718, 196.65, -76.50),
+ISA_layer(7,  80000,  262467,  0.88628, 0.000261718, 196.65, -76.50,  0.0,      0.0),
+ISA_layer(8,  1.0e9,  3.28e9,  0.00001, 3.0e-9,        2.73, -270.4,  0.0,      0.0),
 };
 
-const int ISA_def_size(sizeof(ISA_def) / sizeof(ISA_layer));
-
 // Pressure within a layer, as a function of height.
 // Physics model:  standard or nonstandard atmosphere,
 //    depending on what parameters you pass in.
@@ -108,7 +108,7 @@ pair<double,double> PT_vs_hpt(
   }
   
 // Should never get here.
-  SG_LOG(SG_GENERAL, SG_ALERT, "PT_vs_hpt: ran out of layers");
+  SG_LOG(SG_ENVIRONMENT, SG_ALERT, "PT_vs_hpt: ran out of layers for h=" << hh );
   return make_pair(d0, d0);
 }
 
@@ -222,7 +222,7 @@ void FGAtmoCache::check_model() {
 
 //////////////////////////////////////////////////////////////////////
 
-FGAltimeter::FGAltimeter() : kset(atmodel::ISA::P0), kft(0)
+FGAltimeter::FGAltimeter()
 {
     cache();
 }
@@ -250,7 +250,7 @@ double FGAtmo::QNH(const double field_elev, const double field_press) {
     double rslt =  field_press
             * pow(1. + ISA::lam0 * field_elev / ISA::T0 * prat, 1./nn);
 #if 0
-    SG_LOG(SG_GENERAL, SG_ALERT, "QNH: elev: " << field_elev
+    SG_LOG(SG_ENVIRONMENT, SG_ALERT, "QNH: elev: " << field_elev
                 << "  press: " << field_press
                 << "  prat: "  << prat
                 << "  rslt: " << rslt