diff options
| author | Keith Packard <keithp@keithp.com> | 2011-10-27 00:49:23 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2011-10-27 00:49:23 -0700 |
| commit | 0669f0d74fc24c4f1925a45a9975b7a49a65b692 (patch) | |
| tree | 5b2bef044755a081f1edce5fd27f31edb2f8ab88 /altosui/AltosRecord.java | |
| parent | c7e14a2750d437e8b77d68a944a0711e7a0c882b (diff) | |
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 <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosRecord.java')
| -rw-r--r-- | altosui/AltosRecord.java | 3 |
1 files changed, 3 insertions, 0 deletions
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 <AltosRecord> { int flight_pres; AltosGPS gps; + boolean new_gps; double time; /* seconds since boost */ @@ -274,6 +275,7 @@ public class AltosRecord implements Comparable <AltosRecord> { 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 <AltosRecord> { speed = MISSING; height = MISSING; gps = new AltosGPS(); + new_gps = false; companion = null; } } |
