From 54ad15ef317c271cb81b8515e05a50527e2e4efc Mon Sep 17 00:00:00 2001 From: Mark Jessop Date: Sat, 28 Jul 2018 14:11:24 +0930 Subject: [PATCH] Fix display of chase car tail, don't display time-to-landing unless payload descent rate is < -1.0 m/s --- horusmapper.py | 4 ++-- templates/index.html | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/horusmapper.py b/horusmapper.py index 4f1df80..ec61b9d 100644 --- a/horusmapper.py +++ b/horusmapper.py @@ -144,8 +144,8 @@ def handle_new_payload_position(data): _vel_v = _state['ascent_rate'] _speed = _state['speed'] # If this payload is in descent, calculate the time to landing. - - if _vel_v < 0.0: + # Use < -1.0, to avoid jitter when the payload is on the ground. + if _vel_v < -1.0: # Try and get the altitude of the chase car - we use this as the expected 'ground' level. _car_state = car_track.get_latest_state() if _car_state != None: diff --git a/templates/index.html b/templates/index.html index b23d29c..a74b7c8 100644 --- a/templates/index.html +++ b/templates/index.html @@ -497,6 +497,7 @@ chase_car_position.path.addTo(map); } } else { + chase_car_position.path.addLatLng(chase_car_position.latest_data); chase_car_position.marker.setLatLng(chase_car_position.latest_data).update(); } // Rotate car icon based on heading, but only if we're going faster than 20kph (5.5m/s).