def qnh_estimate(self):
        '''estimate QNH pressure from GPS altitude and scaled pressure'''
        alt_gps = self.master.field('GPS_RAW_INT', 'alt', 0) * 0.001
        pressure2 = self.master.field('SCALED_PRESSURE', 'press_abs', 0)
        ground_temp = self.get_mav_param('GND_TEMP', 21)
        temp = ground_temp + 273.15
        pressure1 = pressure2 / math.exp(math.log(1.0 - (alt_gps / (153.8462 * temp))) / 0.190259)
        return pressure1
def qnh_estimate ( self ) : alt_gps = self . master . field ( 'GPS_RAW_INT' , 'alt' , 0 ) * 0.001 pressure2 = self . master . field ( 'SCALED_PRESSURE' , 'press_abs' , 0 ) ground_temp = self . get_mav_param ( 'GND_TEMP' , 21 ) temp = ground_temp + 273.15 pressure1 = pressure2 / math . exp ( math . log ( 1.0 - ( alt_gps / ( 153.8462 * temp ) ) ) / 0.190259 ) return pressure1
estimate QNH pressure from GPS altitude and scaled pressure