From b6d30b722454faa2a00e02e6b73d143cce781e06 Mon Sep 17 00:00:00 2001 From: daveluff Date: Tue, 23 Mar 2004 23:36:27 +0000 Subject: [PATCH] Convert altimeter to millibars for the UK --- src/ATC/atis.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ATC/atis.cxx b/src/ATC/atis.cxx index e4f5dcb0c..8e7079cd5 100644 --- a/src/ATC/atis.cxx +++ b/src/ATC/atis.cxx @@ -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") { + // Convert to millibars for the UK! + P *= 33.864; + sprintf(buf, "%.1f", 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) {