Revert "altoslib: Parse TeleGPS state value from GPS telemetry packet"
authorKeith Packard <keithp@keithp.com>
Sun, 8 Jun 2014 23:08:30 +0000 (16:08 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 8 Jun 2014 23:08:30 +0000 (16:08 -0700)
This reverts commit d69547796caf74405f8304d23d4ae318315bbd7b.

altoslib/AltosGPS.java
altoslib/AltosState.java
altoslib/AltosTelemetryLocation.java

index f28108334ade41b1f9400e3a61c31557c1037524..2708d026e840184a0013c8b632a26a1ffe7780db 100644 (file)
@@ -45,10 +45,6 @@ public class AltosGPS implements Cloneable {
        public int      h_error;        /* m */
        public int      v_error;        /* m */
 
        public int      h_error;        /* m */
        public int      v_error;        /* m */
 
-       public int      state;          /* for TeleGPS */
-
-       static final int AO_GPS_STATE_VALID = 0x80;
-
        public AltosGPSSat[] cc_gps_sat;        /* tracking data */
 
        public void ParseGPSDate(String date) throws ParseException {
        public AltosGPSSat[] cc_gps_sat;        /* tracking data */
 
        public void ParseGPSDate(String date) throws ParseException {
@@ -302,7 +298,6 @@ public class AltosGPS implements Cloneable {
                g.hdop = hdop;          /* unitless? */
                g.h_error = h_error;    /* m */
                g.v_error = v_error;    /* m */
                g.hdop = hdop;          /* unitless? */
                g.h_error = h_error;    /* m */
                g.v_error = v_error;    /* m */
-               g.state = state;
 
                if (cc_gps_sat != null) {
                        g.cc_gps_sat = new AltosGPSSat[cc_gps_sat.length];
 
                if (cc_gps_sat != null) {
                        g.cc_gps_sat = new AltosGPSSat[cc_gps_sat.length];
@@ -335,7 +330,6 @@ public class AltosGPS implements Cloneable {
                        hdop = old.hdop;                /* unitless? */
                        h_error = old.h_error;  /* m */
                        v_error = old.v_error;  /* m */
                        hdop = old.hdop;                /* unitless? */
                        h_error = old.h_error;  /* m */
                        v_error = old.v_error;  /* m */
-                       state = old.state;
 
                        if (old.cc_gps_sat != null) {
                                cc_gps_sat = new AltosGPSSat[old.cc_gps_sat.length];
 
                        if (old.cc_gps_sat != null) {
                                cc_gps_sat = new AltosGPSSat[old.cc_gps_sat.length];
@@ -351,7 +345,6 @@ public class AltosGPS implements Cloneable {
                        alt = AltosLib.MISSING;
                        ClearGPSTime();
                        cc_gps_sat = null;
                        alt = AltosLib.MISSING;
                        ClearGPSTime();
                        cc_gps_sat = null;
-                       state = 0;
                }
        }
 
                }
        }
 
index 7871da77b3a73a3bc60edefaa68a6adf1b58c88a..1d6ee3c8ff81fe9137f04389159356390f19e485 100644 (file)
@@ -918,9 +918,6 @@ public class AltosState implements Cloneable {
                        elevation = from_pad.elevation;
                        range = from_pad.range;
                }
                        elevation = from_pad.elevation;
                        range = from_pad.range;
                }
-
-               if ((gps.state & AltosGPS.AO_GPS_STATE_VALID) != 0)
-                       set_state (gps.state & ~(AltosGPS.AO_GPS_STATE_VALID));
        }
 
        public void set_tick(int new_tick) {
        }
 
        public void set_tick(int new_tick) {
index 67705cde57750df8d724f0011b34ab04383799db..8368188f895492d42b83385babb524836e1a0b68 100644 (file)
@@ -36,7 +36,6 @@ public class AltosTelemetryLocation extends AltosTelemetryStandard {
        int     ground_speed;
        int     climb_rate;
        int     course;
        int     ground_speed;
        int     climb_rate;
        int     course;
-       int     state;
 
        public AltosTelemetryLocation(int[] bytes) {
                super(bytes);
 
        public AltosTelemetryLocation(int[] bytes) {
                super(bytes);
@@ -58,7 +57,6 @@ public class AltosTelemetryLocation extends AltosTelemetryStandard {
                ground_speed   = uint16(26);
                climb_rate     = int16(28);
                course         = uint8(30);
                ground_speed   = uint16(26);
                climb_rate     = int16(28);
                course         = uint8(30);
-               state          = uint8(31);
        }
 
        public void update_state(AltosState state) {
        }
 
        public void update_state(AltosState state) {
@@ -68,7 +66,6 @@ public class AltosTelemetryLocation extends AltosTelemetryStandard {
                gps.nsat = flags & 0xf;
                gps.locked = (flags & (1 << 4)) != 0;
                gps.connected = (flags & (1 << 5)) != 0;
                gps.nsat = flags & 0xf;
                gps.locked = (flags & (1 << 4)) != 0;
                gps.connected = (flags & (1 << 5)) != 0;
-               gps.state = this.state;
 
                if (gps.locked) {
                        gps.lat = latitude * 1.0e-7;
 
                if (gps.locked) {
                        gps.lat = latitude * 1.0e-7;