ao-tools: Parse TeleGPS state value from gps location packet
[fw/altos] / ao-tools / ao-telem / ao-telem.c
index f1755b824f82ef233a89d6ec9312bdea623700c9..75f94ec14aa0a8c37a764e9e3a9eccef4e7ca5c3 100644 (file)
@@ -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:
@@ -158,7 +160,8 @@ main (int argc, char **argv)
                                        printf ("\n");
                                        break;
                                case AO_TELEMETRY_MEGA_SENSOR:
-                                       printf ("accel %5d pres %9d temp %5d accel_x %5d accel_y %5d accel_z %5d gyro_x %5d gyro_y %5d gyro_z %5d mag_x %5d mag_y %5d mag_z %5d\n",
+                                       printf ("orient %3d accel %5d pres %9d temp %5d accel_x %5d accel_y %5d accel_z %5d gyro_x %5d gyro_y %5d gyro_z %5d mag_x %5d mag_y %5d mag_z %5d\n",
+                                               telem.mega_sensor.orient,
                                                telem.mega_sensor.accel,
                                                telem.mega_sensor.pres,
                                                telem.mega_sensor.temp,