refactored wx parsing
This commit is contained in:
parent
fc835ea851
commit
67b37ca8a1
|
|
@ -248,7 +248,7 @@ def parse(packet):
|
||||||
if parsed['symbol'] == '_':
|
if parsed['symbol'] == '_':
|
||||||
logger.debug("Attempting to parse weather report from comment")
|
logger.debug("Attempting to parse weather report from comment")
|
||||||
body, result = _parse_comment_weather(body)
|
body, result = _parse_comment_weather(body)
|
||||||
parsed.update(result)
|
parsed.update({'weather': result})
|
||||||
else:
|
else:
|
||||||
# decode comment
|
# decode comment
|
||||||
body, result = _parse_comment(body)
|
body, result = _parse_comment(body)
|
||||||
|
|
@ -937,125 +937,49 @@ def _parse_comment_weather(body):
|
||||||
wind_multiplier = 0.44704
|
wind_multiplier = 0.44704
|
||||||
rain_multiplier = 0.254
|
rain_multiplier = 0.254
|
||||||
|
|
||||||
|
key_map = {
|
||||||
|
'g': 'wind_gust',
|
||||||
|
'c': 'wind_direction',
|
||||||
|
't': 'temperature',
|
||||||
|
'S': 'wind_speed',
|
||||||
|
'r': 'rain_1h',
|
||||||
|
'p': 'rain_24h',
|
||||||
|
'P': 'rain_since_midnight',
|
||||||
|
'h': 'humidity',
|
||||||
|
'b': 'pressure',
|
||||||
|
'l': 'luminosity',
|
||||||
|
'L': 'luminosity',
|
||||||
|
's': 'snow',
|
||||||
|
'#': 'rain_raw',
|
||||||
|
}
|
||||||
|
val_map = {
|
||||||
|
'g': lambda x: int(x) * wind_multiplier,
|
||||||
|
'c': lambda x: int(x),
|
||||||
|
'S': lambda x: int(x) * wind_multiplier,
|
||||||
|
't': lambda x: (float(x) - 32) / 1.8,
|
||||||
|
'r': lambda x: int(x) * rain_multiplier,
|
||||||
|
'p': lambda x: int(x) * rain_multiplier,
|
||||||
|
'P': lambda x: int(x) * rain_multiplier,
|
||||||
|
'h': lambda x: int(x),
|
||||||
|
'b': lambda x: float(x) / 10,
|
||||||
|
'l': lambda x: int(x) + 1000,
|
||||||
|
'L': lambda x: int(x),
|
||||||
|
's': lambda x: float(x) * 25.4,
|
||||||
|
'#': lambda x: int(x),
|
||||||
|
}
|
||||||
|
|
||||||
parsed = {}
|
parsed = {}
|
||||||
match = re.findall(r"^([0-9]{3})/([0-9]{3})", body)
|
|
||||||
if match:
|
|
||||||
wind_direction, wind_speed = match[0]
|
|
||||||
parsed.update({
|
|
||||||
'wind_direction': int(wind_direction),
|
|
||||||
# mph to meters per second
|
|
||||||
'wind_speed': float(int(wind_speed) * wind_multiplier)
|
|
||||||
})
|
|
||||||
|
|
||||||
match = re.findall(r"g([0-9]{3})", body)
|
# parse weather data
|
||||||
if match:
|
body = re.sub(r"^([0-9]{3})/([0-9]{3})", "c\\1s\\2", body)
|
||||||
wind_gust = match[0]
|
body = body.replace('s', 'S', 1)
|
||||||
parsed.update({
|
|
||||||
# mph to meters per second
|
|
||||||
'wind_gust': float(int(wind_gust) * wind_multiplier)
|
|
||||||
})
|
|
||||||
|
|
||||||
# Positionless Weather report
|
data = re.findall(r"([cSgtrpPlLs#]\d{3}|t-\d{2}|h\d{2}|b\d{5}|s\.\d{2}|s\d\.\d)", body)
|
||||||
match = re.findall(r"c([0-9]{3})s([0-9]{3})", body)
|
data = map(lambda x: (key_map[x[0]] , val_map[x[0]](x[1:])), data)
|
||||||
if match:
|
|
||||||
wind_direction, wind_speed = match[0]
|
|
||||||
parsed.update({
|
|
||||||
'wind_direction': int(wind_direction),
|
|
||||||
# mph to meters per second
|
|
||||||
'wind_speed': float(int(wind_speed) * wind_multiplier)
|
|
||||||
})
|
|
||||||
|
|
||||||
match = re.findall(r"(?<!c[0-9. ]{3})s([.0-9]{3})", body)
|
parsed.update(dict(data))
|
||||||
if match:
|
|
||||||
snow = match[0]
|
|
||||||
parsed.update({
|
|
||||||
# inches to mm
|
|
||||||
'snow': float(snow) * 25.4
|
|
||||||
})
|
|
||||||
|
|
||||||
match = re.findall(r"g([0-9]{3})", body)
|
# strip weather data
|
||||||
if match:
|
body = re.sub(r"([cSgtrpPlLs#][0-9\-\. ]{3}|h[0-9\. ]{2}|b[0-9\. ]{5})", '', body)
|
||||||
wind_gust = match[0]
|
|
||||||
parsed.update({
|
|
||||||
# mph to meters per second
|
|
||||||
'wind_gust': float(int(wind_gust) * wind_multiplier)
|
|
||||||
})
|
|
||||||
|
|
||||||
match = re.findall(r"t([0-9]{3})", body)
|
|
||||||
if match:
|
|
||||||
degrees_farenheit = match[0]
|
|
||||||
parsed.update({
|
|
||||||
# Farenheight to Centigrade
|
|
||||||
'temp': float(int(degrees_farenheit) - 32) / 1.8
|
|
||||||
})
|
|
||||||
|
|
||||||
# Negative Farenheight
|
|
||||||
match = re.findall(r"t(-[0-9]{2})", body)
|
|
||||||
if match:
|
|
||||||
degrees_farenheit = match[0]
|
|
||||||
parsed.update({
|
|
||||||
# Farenheight to Centigrade
|
|
||||||
'temp': (float(degrees_farenheit) - 32) / 1.8
|
|
||||||
})
|
|
||||||
|
|
||||||
match = re.findall(r"r([0-9]{3})", body)
|
|
||||||
if match:
|
|
||||||
rainfall_hour = match[0]
|
|
||||||
parsed.update({
|
|
||||||
# hundreths of an inch to mm
|
|
||||||
'rain_1h': float(int(rainfall_hour) * rain_multiplier)
|
|
||||||
})
|
|
||||||
|
|
||||||
match = re.findall(r"p([0-9]{3})", body)
|
|
||||||
if match:
|
|
||||||
rainfall_24h = match[0]
|
|
||||||
parsed.update({
|
|
||||||
'rain_24h': float(int(rainfall_24h) * rain_multiplier)
|
|
||||||
})
|
|
||||||
|
|
||||||
match = re.findall(r"P([0-9]{3})", body)
|
|
||||||
if match:
|
|
||||||
rainfall_since_midnight = match[0]
|
|
||||||
parsed.update({
|
|
||||||
# hundreths of an inch to mm
|
|
||||||
'rain_since_mid': float(int(rainfall_since_midnight) * 0.254)
|
|
||||||
})
|
|
||||||
|
|
||||||
match = re.findall(r"h([0-9]{2})", body)
|
|
||||||
if match:
|
|
||||||
humidity = match[0]
|
|
||||||
parsed.update({
|
|
||||||
'humidity': int(humidity)
|
|
||||||
})
|
|
||||||
|
|
||||||
match = re.findall(r"b([0-9]{5})", body)
|
|
||||||
if match:
|
|
||||||
pressure = match[0]
|
|
||||||
parsed.update({
|
|
||||||
# deci hPA to hPa
|
|
||||||
'hPa': float(pressure) / 10
|
|
||||||
})
|
|
||||||
|
|
||||||
match = re.findall(r"l([0-9]{3})", body)
|
|
||||||
if match:
|
|
||||||
luminosity = match[0]
|
|
||||||
parsed.update({
|
|
||||||
# http://www.aprs.org/aprs11/spec-wx.txt
|
|
||||||
'luminosity': int(luminosity) + 1000
|
|
||||||
})
|
|
||||||
|
|
||||||
match = re.findall(r"L([0-9]{3})", body)
|
|
||||||
if match:
|
|
||||||
luminosity = match[0]
|
|
||||||
parsed.update({
|
|
||||||
'luminosity': int(luminosity)
|
|
||||||
})
|
|
||||||
|
|
||||||
match = re.findall(r"\#([0-9]{3})", body)
|
|
||||||
if match:
|
|
||||||
rain_raw = match[0]
|
|
||||||
parsed.update({
|
|
||||||
'rain_raw': int(rain_raw)
|
|
||||||
})
|
|
||||||
|
|
||||||
return (body, parsed)
|
return (body, parsed)
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ class ParseCommentWeather(unittest.TestCase):
|
||||||
|
|
||||||
def test_wind(self):
|
def test_wind(self):
|
||||||
# misc value
|
# misc value
|
||||||
expected = "009/009", {
|
expected = "", {
|
||||||
"wind_speed": (9 * wind_multiplier),
|
"wind_speed": (9 * wind_multiplier),
|
||||||
"wind_direction": 9
|
"wind_direction": 9
|
||||||
}
|
}
|
||||||
|
|
@ -17,7 +17,7 @@ class ParseCommentWeather(unittest.TestCase):
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
# Daft result but possible
|
# Daft result but possible
|
||||||
expected = "999/999", {
|
expected = "", {
|
||||||
"wind_speed": (999 * wind_multiplier),
|
"wind_speed": (999 * wind_multiplier),
|
||||||
"wind_direction": 999
|
"wind_direction": 999
|
||||||
}
|
}
|
||||||
|
|
@ -25,7 +25,7 @@ class ParseCommentWeather(unittest.TestCase):
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
#Positionless packet
|
#Positionless packet
|
||||||
expected = "c009s009", {
|
expected = "", {
|
||||||
"wind_speed": float(9 * wind_multiplier),
|
"wind_speed": float(9 * wind_multiplier),
|
||||||
"wind_direction": 9
|
"wind_direction": 9
|
||||||
}
|
}
|
||||||
|
|
@ -33,7 +33,7 @@ class ParseCommentWeather(unittest.TestCase):
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
# Daft result but possible
|
# Daft result but possible
|
||||||
expected = "c999s999", {
|
expected = "", {
|
||||||
"wind_speed": (999 * wind_multiplier),
|
"wind_speed": (999 * wind_multiplier),
|
||||||
"wind_direction": 999
|
"wind_direction": 999
|
||||||
}
|
}
|
||||||
|
|
@ -42,156 +42,150 @@ class ParseCommentWeather(unittest.TestCase):
|
||||||
|
|
||||||
def test_temp(self):
|
def test_temp(self):
|
||||||
# Min
|
# Min
|
||||||
expected = "t-99", {
|
expected = "", {
|
||||||
"temp": float((-99.0 - 32) / 1.8)
|
"temperature": float((-99.0 - 32) / 1.8)
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("t-99")
|
result = _parse_comment_weather("t-99")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
expected = "t-40", {
|
expected = "", {
|
||||||
"temp": -40.0
|
"temperature": -40.0
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("t-40")
|
result = _parse_comment_weather("t-40")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
# Zero F
|
# Zero F
|
||||||
expected = "t000", {
|
expected = "", {
|
||||||
"temp": -17.77777777777778
|
"temperature": -17.77777777777778
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("t000")
|
result = _parse_comment_weather("t000")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
# Daft, but possible
|
# Daft, but possible
|
||||||
expected = "t999", {
|
expected = "", {
|
||||||
"temp": 537.2222222222222
|
"temperature": 537.2222222222222
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("t999")
|
result = _parse_comment_weather("t999")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
def test_rain_1h(self):
|
def test_rain_1h(self):
|
||||||
expected = "r000", {
|
expected = "", {
|
||||||
"rain_1h": 0.0
|
"rain_1h": 0.0
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("r000")
|
result = _parse_comment_weather("r000")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
expected = "r999", {
|
expected = "", {
|
||||||
"rain_1h": float(999 * mm_multiplier)
|
"rain_1h": float(999 * mm_multiplier)
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("r999")
|
result = _parse_comment_weather("r999")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
def test_rain_24h(self):
|
def test_rain_24h(self):
|
||||||
expected = "p000", {
|
expected = "", {
|
||||||
"rain_24h": 0.0
|
"rain_24h": 0.0
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("p000")
|
result = _parse_comment_weather("p000")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
expected = "p999", {
|
expected = "", {
|
||||||
"rain_24h": float(999 * mm_multiplier)
|
"rain_24h": float(999 * mm_multiplier)
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("p999")
|
result = _parse_comment_weather("p999")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
def test_rain_since_mid(self):
|
def test_rain_since_midnight(self):
|
||||||
expected = "P000", {
|
expected = "", {
|
||||||
"rain_since_mid": 0.0
|
"rain_since_midnight": 0.0
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("P000")
|
result = _parse_comment_weather("P000")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
expected = "P999", {
|
expected = "", {
|
||||||
"rain_since_mid": float(999 * mm_multiplier)
|
"rain_since_midnight": float(999 * mm_multiplier)
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("P999")
|
result = _parse_comment_weather("P999")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
def test_humidity(self):
|
def test_humidity(self):
|
||||||
expected = "h00", {
|
expected = "", {
|
||||||
"humidity": 0.0
|
"humidity": 0.0
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("h00")
|
result = _parse_comment_weather("h00")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
expected = "h99", {
|
expected = "", {
|
||||||
"humidity": 99
|
"humidity": 99
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("h99")
|
result = _parse_comment_weather("h99")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
# Invalid value
|
|
||||||
expected = "h9", {
|
|
||||||
}
|
|
||||||
result = _parse_comment_weather("h9")
|
|
||||||
self.assertEqual(expected, result)
|
|
||||||
|
|
||||||
def test_pressure(self):
|
def test_pressure(self):
|
||||||
expected = "b00000", {
|
expected = "", {
|
||||||
"hPa": 0.0
|
"pressure": 0.0
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("b00000")
|
result = _parse_comment_weather("b00000")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
expected = "b99999", {
|
expected = "", {
|
||||||
"hPa": 9999.9
|
"pressure": 9999.9
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("b99999")
|
result = _parse_comment_weather("b99999")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
def test_luminosity(self):
|
def test_luminosity(self):
|
||||||
expected = "L000", {
|
expected = "", {
|
||||||
"luminosity": 000
|
"luminosity": 000
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("L000")
|
result = _parse_comment_weather("L000")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
expected = "L999", {
|
expected = "", {
|
||||||
"luminosity": 999
|
"luminosity": 999
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("L999")
|
result = _parse_comment_weather("L999")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
expected = "l123", {
|
expected = "", {
|
||||||
"luminosity": 1123
|
"luminosity": 1123
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("l123")
|
result = _parse_comment_weather("l123")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
expected = "l999", {
|
expected = "", {
|
||||||
"luminosity": 1999
|
"luminosity": 1999
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("l999")
|
result = _parse_comment_weather("l999")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
def test_snow(self):
|
def test_snow(self):
|
||||||
expected = "s000", {
|
expected = "", {
|
||||||
"snow": 000
|
"snow": 000
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("s000")
|
result = _parse_comment_weather("s...s000")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
expected = "s5.5", {
|
expected = "", {
|
||||||
"snow": float(5.5 * 25.4)
|
"snow": float(5.5 * 25.4)
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("s5.5")
|
result = _parse_comment_weather("s...s5.5")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
expected = "s999", {
|
expected = "", {
|
||||||
"snow": float(999 * 25.4)
|
"snow": float(999 * 25.4)
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("s999")
|
result = _parse_comment_weather("s...s999")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
def test_rain_raw(self):
|
def test_rain_raw(self):
|
||||||
expected = "#000", {
|
expected = "", {
|
||||||
"rain_raw": 000
|
"rain_raw": 000
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("#000")
|
result = _parse_comment_weather("#000")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
expected = "#999", {
|
expected = "", {
|
||||||
"rain_raw": 999
|
"rain_raw": 999
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("#999")
|
result = _parse_comment_weather("#999")
|
||||||
|
|
@ -199,14 +193,14 @@ class ParseCommentWeather(unittest.TestCase):
|
||||||
|
|
||||||
# Not possible in real world (rain and snow measurements)
|
# Not possible in real world (rain and snow measurements)
|
||||||
def test_positionless_packet(self):
|
def test_positionless_packet(self):
|
||||||
expected = "10090556c220s004g005t077r010p020P030h50b09900s5.5wRSW", {
|
expected = "10090556wRSW", {
|
||||||
"hPa": 990.0,
|
"pressure": 990.0,
|
||||||
"humidity": 50,
|
"humidity": 50,
|
||||||
"rain_1h": float(010.0 * mm_multiplier),
|
"rain_1h": float(010.0 * mm_multiplier),
|
||||||
"rain_24h": float(020.0 * mm_multiplier),
|
"rain_24h": float(020.0 * mm_multiplier),
|
||||||
"rain_since_mid": float(030.0 * mm_multiplier),
|
"rain_since_midnight": float(030.0 * mm_multiplier),
|
||||||
"snow": float(5.5 * 25.4),
|
"snow": float(5.5 * 25.4),
|
||||||
"temp": float((77.0 - 32) / 1.8),
|
"temperature": float((77.0 - 32) / 1.8),
|
||||||
"wind_direction": 220,
|
"wind_direction": 220,
|
||||||
"wind_gust": 5.0 * wind_multiplier,
|
"wind_gust": 5.0 * wind_multiplier,
|
||||||
"wind_speed": 4.0 * wind_multiplier
|
"wind_speed": 4.0 * wind_multiplier
|
||||||
|
|
@ -215,7 +209,7 @@ class ParseCommentWeather(unittest.TestCase):
|
||||||
result = _parse_comment_weather("10090556c220s004g005t077r010p020P030h50b09900s5.5wRSW")
|
result = _parse_comment_weather("10090556c220s004g005t077r010p020P030h50b09900s5.5wRSW")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
expected = "10090556c220s112g t r p P h b wRSW", {
|
expected = "10090556wRSW", {
|
||||||
"wind_direction": 220,
|
"wind_direction": 220,
|
||||||
"wind_speed": 112 * wind_multiplier
|
"wind_speed": 112 * wind_multiplier
|
||||||
}
|
}
|
||||||
|
|
@ -223,25 +217,19 @@ class ParseCommentWeather(unittest.TestCase):
|
||||||
result = _parse_comment_weather("10090556c220s112g t r p P h b wRSW")
|
result = _parse_comment_weather("10090556c220s112g t r p P h b wRSW")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
expected = "10090556c220s112g...t...r...p...P...h..b.....wRSW", {
|
expected = "10090556wRSW", {
|
||||||
"wind_direction": 220,
|
"wind_direction": 220,
|
||||||
"wind_speed": 112 * wind_multiplier
|
"wind_speed": 112 * wind_multiplier
|
||||||
}
|
}
|
||||||
result = _parse_comment_weather("10090556c220s112g...t...r...p...P...h..b.....wRSW")
|
result = _parse_comment_weather("10090556c220s112g...t...r...p...P...h..b.....wRSW")
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
expected = "_10090556s9.9", {
|
|
||||||
"snow": 9.9 * 25.4
|
|
||||||
}
|
|
||||||
result = _parse_comment_weather("_10090556s9.9")
|
|
||||||
self.assertEqual(expected, result)
|
|
||||||
|
|
||||||
def test_position_packet(self):
|
def test_position_packet(self):
|
||||||
expected = "319/001g004t048r...p P000h19b10294eCumulusWMR100", {
|
expected = "eCumulusWMR100", {
|
||||||
"hPa": 1029.4,
|
"pressure": 1029.4,
|
||||||
"humidity": 19,
|
"humidity": 19,
|
||||||
"rain_since_mid": 0.0,
|
"rain_since_midnight": 0.0,
|
||||||
"temp": (48.0 - 32) / 1.8,
|
"temperature": (48.0 - 32) / 1.8,
|
||||||
"wind_direction": 319,
|
"wind_direction": 319,
|
||||||
"wind_gust": 4.0 * wind_multiplier,
|
"wind_gust": 4.0 * wind_multiplier,
|
||||||
"wind_speed": 1 * wind_multiplier
|
"wind_speed": 1 * wind_multiplier
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue