From 0669f0d74fc24c4f1925a45a9975b7a49a65b692 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 27 Oct 2011 00:49:23 -0700 Subject: altosui: Only update GPS data when new GPS information arrives Track which telemetry packets are actually producing new GPS information and only update the GPS average position and count of stable GPS reports with new GPS info, instead of on every telemetry packet. Signed-off-by: Keith Packard --- altosui/AltosRecord.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'altosui/AltosRecord.java') diff --git a/altosui/AltosRecord.java b/altosui/AltosRecord.java index 486c96b2..4dfa98be 100644 --- a/altosui/AltosRecord.java +++ b/altosui/AltosRecord.java @@ -65,6 +65,7 @@ public class AltosRecord implements Comparable { int flight_pres; AltosGPS gps; + boolean new_gps; double time; /* seconds since boost */ @@ -274,6 +275,7 @@ public class AltosRecord implements Comparable { speed = old.speed; height = old.height; gps = new AltosGPS(old.gps); + new_gps = false; companion = old.companion; } @@ -304,6 +306,7 @@ public class AltosRecord implements Comparable { speed = MISSING; height = MISSING; gps = new AltosGPS(); + new_gps = false; companion = null; } } -- cgit v1.2.3