]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/ATISEncoder.cxx
Fix incorrect QNH in spoken ATIS when using live weather fetch
[flightgear.git] / src / ATC / ATISEncoder.cxx
index 03f48e282fd4b5889cc4038058b2242d3cc062f8..294bb8306710013d0604d10e0a5d00df97e19c34 100644 (file)
@@ -565,13 +565,13 @@ string ATISEncoder::getQnh( SGPropertyNode_ptr )
 
 string ATISEncoder::getInhgInteger( SGPropertyNode_ptr )
 {
-  double qnh = _atis->getQnh() * 100 / SG_INHG_TO_PA;
+  double qnh = _atis->getQnhInHg();
   return getSpokenNumber( (int)qnh, true, 2 );
 }
 
 string ATISEncoder::getInhgFraction( SGPropertyNode_ptr )
 {
-  double qnh = _atis->getQnh() * 100 / SG_INHG_TO_PA;
+  double qnh = _atis->getQnhInHg();
   int f = int(100 * (qnh - int(qnh)) + 0.5);
   return getSpokenNumber( f, true, 2 );
 }