From e1d9e23c8ee188f8335e0e47d170794bfe085949 Mon Sep 17 00:00:00 2001 From: Jacob W Smith <jws52@cam.ac.uk> Date: Tue, 30 Jan 2024 14:38:15 +0000 Subject: [PATCH] fix: Parse negative altitudes from surveys --- coordinator/ProcessorSurveyUtils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coordinator/ProcessorSurveyUtils.py b/coordinator/ProcessorSurveyUtils.py index 23462b7..100b432 100644 --- a/coordinator/ProcessorSurveyUtils.py +++ b/coordinator/ProcessorSurveyUtils.py @@ -19,7 +19,7 @@ def parse_location_str(location_str): # expecting a space-separated string containing four numbers which # contain a decimal point - regex = r'(?P<lat>[-?0-9\.]+)\s(?P<lon>[-?0-9\.]+)\s(?P<alt>[0-9\.]+)\s(?P<acc>[0-9\.]+)' + regex = r'(?P<lat>-?[0-9\.]+)\s(?P<lon>-?[0-9\.]+)\s(?P<alt>-?[0-9\.]+)\s(?P<acc>[0-9\.]+)' # needed because the ODK names are too complicated for regex named groups name_dict = { -- GitLab