Fix units for wind heights aloft

This commit is contained in:
XANTRONIX 2025-03-30 01:46:50 -04:00
parent 857814bdbf
commit c5c7778772

View file

@ -459,19 +459,19 @@ class RAOBObs():
if heights[0] != '9':
return dict()
if heights[1] != '/':
if heights[1] != '/' and len(heights) == 5:
tens = int(heights[1])
if len(heights) > 1 and heights[2] != '/' and len(tokens) > 1:
h = 0.3048 * (10000 * tens) + (1000 * int(heights[2]))
if heights[2] != '/' and len(tokens) > 1:
h = 0.3048 * ((10000 * tens) + (1000 * int(heights[2])))
ret[h] = self.parse_wind(tokens[1])
if len(heights) > 2 and heights[3] != '/' and len(tokens) > 2:
h = 0.3048 * (10000 * tens) + (1000 * int(heights[3]))
if heights[3] != '/' and len(tokens) > 2:
h = 0.3048 * ((10000 * tens) + (1000 * int(heights[3])))
ret[h] = self.parse_wind(tokens[2])
if len(heights) > 3 and heights[4] != '/' and len(tokens) > 3:
h = 0.3048 * (10000 * tens) + (1000 * int(heights[4]))
if heights[4] != '/' and len(tokens) > 3:
h = 0.3048 * ((10000 * tens) + (1000 * int(heights[4])))
ret[h] = self.parse_wind(tokens[3])
return ret