]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/atis.cxx
Modified Files:
[flightgear.git] / src / ATC / atis.cxx
index e4f5dcb0cfa6cbc58a41a1e4fa445fe40594b6c7..c4caefdd6303212fa5d24e21fad2edc1228d3c26 100644 (file)
@@ -17,7 +17,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 
 #ifdef HAVE_CONFIG_H
@@ -56,8 +56,8 @@ FGATIS::FGATIS() :
        refname("atis")
        //type(ATIS)
 {
-       vPtr = globals->get_ATC_mgr()->GetVoicePointer(ATIS);
-       voiceOK = (vPtr == NULL ? false : true);
+       _vPtr = globals->get_ATC_mgr()->GetVoicePointer(ATIS);
+       _voiceOK = (_vPtr == NULL ? false : true);
        _type = ATIS;
 }
 
@@ -100,7 +100,7 @@ void FGATIS::UpdateTransmission() {
        
        FGEnvironment stationweather =
             ((FGEnvironmentMgr *)globals->get_subsystem("environment"))
-              ->getEnvironment(lat, lon, elev);
+              ->getEnvironment(lat, lon, 0.0);
        
        transmission = "";
        
@@ -180,15 +180,20 @@ void FGATIS::UpdateTransmission() {
        }
        
        // Get the pressure / altimeter
-       double pressure_inches = fgGetDouble("/environment/pressure-sea-level-inhg");
+       double P = fgGetDouble("/environment/pressure-sea-level-inhg");
+       if(ident.substr(0,2) == "EG" && fgGetBool("/sim/atc/use-millibars") == true) {
+               // Convert to millibars for the UK!
+               P *= 33.864;
+               sprintf(buf, "%.0f", P);
+       } else {
+               sprintf(buf, "%.2f", P);
+       }               
        transmission += " / Altimeter ";
-       sprintf(buf, "%.2f", pressure_inches);
        tempstr1 = buf;
        transmission += ConvertNumToSpokenDigits(tempstr1);
        
        // Based on the airport-id and wind get the active runway
        //FGRunway *r;
-
        double speed = stationweather.get_wind_speed_kt();
        double hdg = stationweather.get_wind_from_heading_deg();
        if (speed == 0) {