code: def altitude_difference(self, pressure1, pressure2, ground_temp):
          '''calculate barometric altitude'''
          scaling = pressure2 / pressure1
          temp = ground_temp + 273.15
          return 153.8462 * temp * (1.0 - math.exp(0.190259 * math.log(scaling))f altitude_difference(self, pressure1, pressure2, ground_temp):
          '''calculate barometric altitude'''
          scaling = pressure2 / pressure1
          temp = ground_temp + 273.15
          return 153.8462 * temp * (1.0 - math.exp(0.190259 * math.log(scaling)))
docs: calculate barometric altitude