From bb5cfe43c69d67b9bc91b55409146cc4f09a332d Mon Sep 17 00:00:00 2001 From: Zilog80 Date: Sat, 19 Jan 2019 00:12:09 +0100 Subject: [PATCH] m10: GPS sats --- m10/m10ptu.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/m10/m10ptu.c b/m10/m10ptu.c index 2f24096..b730767 100644 --- a/m10/m10ptu.c +++ b/m10/m10ptu.c @@ -40,6 +40,7 @@ int option_verbose = 0, // ausfuehrliche Anzeige option_b = 0, option_color = 0, option_ptu = 0, + option_sat = 0, wavloaded = 0; int wav_channel = 0; // audio channel: left @@ -1030,6 +1031,16 @@ int print_pos(int csOK) { } fprintf(stdout, "\n"); + if (csOK && option_sat) { + int i, byte; + fprintf(stdout, " %2d", frame_bytes[pos_GPSweek-2]); // GPS-sats + fprintf(stdout, " : "); + for (i = 0; i < frame_bytes[pos_GPSweek-2]; i++) { // PRN + fprintf(stdout, " %2d", frame_bytes[pos_GPSweek+2+i]&0x3F); + } + fprintf(stdout, "\n"); + } + } return err; @@ -1156,6 +1167,9 @@ int main(int argc, char **argv) { else if ( (strcmp(*argv, "--ptu") == 0) ) { option_ptu = 1; } + else if ( (strcmp(*argv, "--sat") == 0) ) { + option_sat = 1; + } else if (strcmp(*argv, "--ch2") == 0) { wav_channel = 1; } // right channel (default: 0=left) else { fp = fopen(*argv, "rb");