X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FEnvironment%2Fatmosphere.hxx;h=466cba270e60eefe4bb71f47b42576e3c935d32c;hb=c6221b2c84f47041ef92aff2a2cfffee25b84a73;hp=55ccfb3f9e580a76d6d08c4ee1006fcb714bef02;hpb=a6db6d89ff41a619569e6433409e8bf62ff98499;p=flightgear.git diff --git a/src/Environment/atmosphere.hxx b/src/Environment/atmosphere.hxx index 55ccfb3f9..466cba270 100644 --- a/src/Environment/atmosphere.hxx +++ b/src/Environment/atmosphere.hxx @@ -31,8 +31,6 @@ #include #include -using namespace std; - /** * Model the atmosphere in a way consistent with the laws * of physics. @@ -110,6 +108,15 @@ public: // Field pressure in pascals // Valid for fields within the troposphere only. double QNH(const double field_elev, const double field_press); +/** + * Invert the QNH calculation to get the field pressure from a metar + * report. Valid for fields within the troposphere only. + * @param field_elev field elevation in m + * @param qnh altimeter setting in pascals + * @return field pressure _in pascals_. Caller gets to convert to inHg + * or millibars + */ + static double fieldPressure(const double field_elev, const double qnh); };