From ac181cff5f9c63db59d9a808e8f5fa5c3617c7fd Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Wed, 6 Apr 2022 22:06:54 -0500 Subject: [PATCH] Adding fix for the negative altitude problem. Only tested in positive altitudes, but doesn't seem to break anything else, and probably works. --- ir-aprsisd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ir-aprsisd b/ir-aprsisd index 4d05942..96b98a5 100755 --- a/ir-aprsisd +++ b/ir-aprsisd @@ -231,7 +231,7 @@ def parsePlacemark(Placemark): #Altitude needs to be in feet above sea-level # what we get instead is a string with a number of meters # at the beginning. - elevation = re.sub(r'^(\d+\.?\d+)\s*m.*',r'\1',extended['Elevation']) + elevation = re.sub(r'^(-?\d+\.?\d+)\s*m.*',r'\1',extended['Elevation']) elevation = float(elevation) * 3.2808399 if 'Velocity' in extended: #Velocity in knots, according to APRS.