diff options
| author | Keith Packard <keithp@keithp.com> | 2010-08-05 13:50:18 -0400 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2010-08-05 13:50:18 -0400 |
| commit | d8bf05f7ad55964c9bce0551e58f4ef6c9f721ad (patch) | |
| tree | fb6683cd1b832be828a82497b57f42e8db082b5d /ao-tools/altosui/AltosGPS.java | |
| parent | 85a670b5a904d6750d0f179ae307baeb8fc7cbd2 (diff) | |
altosui: Split flight record out of telemetry class
This will permit either telemetry or eeprom data to be used to
construct the sequence of flight events for reply or data generation.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/altosui/AltosGPS.java')
| -rw-r--r-- | ao-tools/altosui/AltosGPS.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/ao-tools/altosui/AltosGPS.java b/ao-tools/altosui/AltosGPS.java index 42f4dc83..6b84d7a5 100644 --- a/ao-tools/altosui/AltosGPS.java +++ b/ao-tools/altosui/AltosGPS.java @@ -166,4 +166,34 @@ public class AltosGPS { ClearGPSTime(); cc_gps_sat = null; } + + public AltosGPS(AltosGPS old) { + nsat = old.nsat; + gps_locked = old.gps_locked; + gps_connected = old.gps_connected; + lat = old.lat; /* degrees (+N -S) */ + lon = old.lon; /* degrees (+E -W) */ + alt = old.alt; /* m */ + year = old.year; + month = old.month; + day = old.day; + hour = old.hour; + minute = old.minute; + second = old.second; + + gps_extended = old.gps_extended; /* has extra data */ + ground_speed = old.ground_speed; /* m/s */ + course = old.course; /* degrees */ + climb_rate = old.climb_rate; /* m/s */ + hdop = old.hdop; /* unitless? */ + h_error = old.h_error; /* m */ + v_error = old.v_error; /* m */ + + AltosGPSSat[] cc_gps_sat; /* tracking data */ + cc_gps_sat = new AltosGPSSat[old.cc_gps_sat.length]; + for (int i = 0; i < old.cc_gps_sat.length; i++) { + cc_gps_sat[i].svid = old.cc_gps_sat[i].svid; + cc_gps_sat[i].c_n0 = old.cc_gps_sat[i].c_n0; + } + } } |
