JSON: tx_frequency from telemetry (RS41, RS92, MEISEI)

pull/43/head
Zilog80 2021-10-27 23:27:14 +02:00
rodzic 9b16769d7c
commit 61635ab8d9
3 zmienionych plików z 23 dodań i 0 usunięć

Wyświetl plik

@ -700,6 +700,7 @@ int main(int argc, char **argv) {
gpx.sek = (double)ms/1000.0;
if (option_jsn && err_blks==0 && gpx.frnr1-gpx.frnr==1) {
char *ver_jsn = NULL;
char id_str[] = "xxxxxx\0\0\0\0\0\0";
//if (gpx._sn > 0) { sprintf(id_str, "%08x", gpx._sn); }
if (gpx.sn > 0 && gpx.sn < 1e9) {
@ -712,6 +713,13 @@ int main(int argc, char **argv) {
if (gpx.jsn_freq > 0) {
printf(", \"freq\": %d", gpx.jsn_freq);
}
if (gpx.fq > 0) { // include frequency derived from subframe information if available
fprintf(stdout, ", \"tx_frequency\": %.0f", gpx.fq );
}
#ifdef VER_JSN_STR
ver_jsn = VER_JSN_STR;
#endif
if (ver_jsn && *ver_jsn != '\0') printf(", \"version\": \"%s\"", ver_jsn);
printf(" }\n");
printf("\n");
}
@ -934,6 +942,9 @@ int main(int argc, char **argv) {
if (gpx.jsn_freq > 0) { // not gpx.fq, because gpx.sn not in every frame
printf(", \"freq\": %d", gpx.jsn_freq);
}
if (gpx.fq > 0) { // include frequency derived from subframe information if available
fprintf(stdout, ", \"tx_frequency\": %.0f", gpx.fq );
}
#ifdef VER_JSN_STR
ver_jsn = VER_JSN_STR;
#endif

Wyświetl plik

@ -1848,6 +1848,12 @@ static int print_position(gpx_t *gpx, int ec) {
if (gpx->freq > 0) fq_kHz = gpx->freq;
fprintf(stdout, ", \"freq\": %d", fq_kHz);
}
// Include frequency derived from subframe information if available.
if (gpx->freq > 0) {
fprintf(stdout, ", \"tx_frequency\": %d", gpx->freq );
}
#ifdef VER_JSN_STR
ver_jsn = VER_JSN_STR;
#endif

Wyświetl plik

@ -1518,6 +1518,12 @@ static int print_position(gpx_t *gpx, int ec) { // GPS-Hoehe ueber Ellipsoid
//if (gpx->freq > 0) fq_kHz = gpx->freq; // L-band: option.ngp ?
fprintf(stdout, ", \"freq\": %d", fq_kHz);
}
// Include frequency derived from subframe information if available.
if (gpx->freq > 0) {
fprintf(stdout, ", \"tx_frequency\": %d", gpx->freq);
}
#ifdef VER_JSN_STR
ver_jsn = VER_JSN_STR;
#endif