diff --git a/smarc_bt/src/mission_log.py b/smarc_bt/src/mission_log.py index 7fc42b1..ea9ff20 100644 --- a/smarc_bt/src/mission_log.py +++ b/smarc_bt/src/mission_log.py @@ -159,6 +159,13 @@ def xround(num, precision=0): except: return num + try: + gps_lat = xround(v.raw_gps_obj.latitude, 6), + gps_lon = xround(v.raw_gps_obj.longitude, 6), + except: + gps_lat = None + gps_lon = None + record = [ int(time.time()), annotation, @@ -179,8 +186,8 @@ def xround(num, precision=0): v.t2, xround(v.batt_v, 1), v.batt_percent, - xround(v.raw_gps_obj.latitude, 6), - xround(v.raw_gps_obj.longitude, 6), + gps_lat, + gps_lon, tip.name, status_strings.get(tip.status, "unknown")[0], plan.plan_id