diff options
| author | Keith Packard <keithp@keithp.com> | 2014-06-07 21:12:44 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2014-06-07 21:12:44 -0700 |
| commit | 428d09294ba0395fedd71346ad00fd90a4cdde97 (patch) | |
| tree | 7020af7376b79d761aeebe2b276d989fd4c82a28 /ao-tools/ao-telem/ao-telem.c | |
| parent | 23d9d37fd2a8f4b867f34e71a2b0f7cb090717c1 (diff) | |
ao-tools: Parse TeleGPS state value from gps location packet
TeleGPS encodes state in a spare gps location packet byte, masking in
0x80 to signify that the state value is valid
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/ao-telem/ao-telem.c')
| -rw-r--r-- | ao-tools/ao-telem/ao-telem.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ao-tools/ao-telem/ao-telem.c b/ao-tools/ao-telem/ao-telem.c index da873838..75f94ec1 100644 --- a/ao-tools/ao-telem/ao-telem.c +++ b/ao-tools/ao-telem/ao-telem.c @@ -145,6 +145,8 @@ main (int argc, char **argv) telem.location.ground_speed / 100.0, telem.location.climb_rate / 100.0, telem.location.course * 2); + if ((telem.location.state & AO_GPS_STATE_VALID)) + printf (" state %1d", telem.location.state & ~(AO_GPS_STATE_VALID)); printf ("\n"); break; case AO_TELEMETRY_SATELLITE: |
