From 090bc92edb94b0823275ac86570154b5744bab46 Mon Sep 17 00:00:00 2001 From: Michaela Date: Fri, 20 Aug 2021 14:07:11 +1000 Subject: [PATCH] add some protection for rolling over the lon line --- sonde-api-to-iot-core/lambda_function.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonde-api-to-iot-core/lambda_function.py b/sonde-api-to-iot-core/lambda_function.py index f372c8c..83821b1 100644 --- a/sonde-api-to-iot-core/lambda_function.py +++ b/sonde-api-to-iot-core/lambda_function.py @@ -275,7 +275,7 @@ def upload(event, context): check_data = payload_serials[serial] if len(check_data) > 10: # need at least 10 payloads to be useful lats = [ x['lat'] for x in check_data ] - lons = [ x['lon'] for x in check_data ] + lons = [ abs(x['lon']) for x in check_data ] alts = [ x['alt'] for x in check_data ] lat_outliers = z_check(lats, 3) lon_outliers = z_check(lons, 3)