From 83e8b1a7c12dc61d517a7216376253b26752d2a4 Mon Sep 17 00:00:00 2001
From: XANTRONIX Industrial <xan@xantronix.com>
Date: Thu, 13 Mar 2025 00:32:54 -0400
Subject: [PATCH] Hack: Apply magic numbers to match other charts

---
 lib/xmet/thermo.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/xmet/thermo.py b/lib/xmet/thermo.py
index be0e3e8..e9c0846 100644
--- a/lib/xmet/thermo.py
+++ b/lib/xmet/thermo.py
@@ -73,7 +73,7 @@ def pressure_height(pressure: float, surface: float=PRESSURE_MSL) -> float:
     Return the approximate altitude, in meters, for a given pressure in
     millibar.
     """
-    return (1 - (pressure / surface) ** 0.190284) * 145366.45 * 0.3048
+    return (1 - (pressure / surface) ** 0.190284) * 145366.45 * 0.3107596
 
 def lapse(temp: float, delta: float, rate=LAPSE_RATE_DRY) -> float:
     """
@@ -121,7 +121,7 @@ def loft_parcel(start_temp: float,
             except OverflowError:
                 break
 
-            temp = lapse(temp, height - last_height, 1.08*rate)
+            temp = lapse(temp, height - last_height, 1.09*rate)
 
             yield temp, pressure