+ case AO_TELEMETRY_LOCATION:
+ printf ("sats %d flags %s%s%s%s",
+ telem.location.flags & 0xf,
+ (telem.location.flags & (1 << 4)) ? "valid" : "invalid",
+ (telem.location.flags & (1 << 5)) ? ",running" : "",
+ (telem.location.flags & (1 << 6)) ? ",date" : "",
+ (telem.location.flags & (1 << 7)) ? ",course" : "");
+ printf (" alt %5d lat %12.7f lon %12.7f",
+ telem.location.altitude,
+ telem.location.latitude / 1e7,
+ telem.location.longitude / 1e7);
+ if ((telem.location.flags & (1 << 6)) != 0) {
+ printf (" year %2d month %2d day %2d",
+ telem.location.year,
+ telem.location.month,
+ telem.location.day);
+ printf (" hour %2d minute %2d second %2d",
+ telem.location.hour,
+ telem.location.minute,
+ telem.location.second);
+ }
+ printf (" pdop %3.1f hdop %3.1f vdop %3.1f mode %d",
+ telem.location.pdop / 5.0,
+ telem.location.hdop / 5.0,
+ telem.location.vdop / 5.0,
+ telem.location.mode);
+ if ((telem.location.flags & (1 << 7)) != 0)
+ printf (" ground_speed %6.2f climb_rate %6.2f course %d",
+ telem.location.ground_speed / 100.0,
+ telem.location.climb_rate / 100.0,
+ telem.location.course * 2);
+ printf ("\n");
+ break;
+ case AO_TELEMETRY_SATELLITE:
+ printf ("sats %d", telem.satellite.channels);
+ for (c = 0; c < 12 && c < telem.satellite.channels; c++) {
+ printf (" sat %d svid %d c_n_1 %d",
+ c,
+ telem.satellite.sats[c].svid,
+ telem.satellite.sats[c].c_n_1);
+ }
+ printf ("\n");
+ break;