Z: UTC = GPS - 18s (1.1.2017)

pull/11/head
Zilog80 2019-03-21 20:33:12 +01:00
rodzic 4dbd01c336
commit c1b62a5986
2 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -627,6 +627,7 @@ static void print_frame(gpx_t *gpx, int crc_err, int len) {
if (gpx->option.jsn) {
// Print JSON output required by auto_rx.
if (crc_err==0) { // CRC-OK
// UTC oder GPS?
printf("{ \"frame\": %d, \"id\": \"%d\", \"time\": \"%02d:%02d:%06.3fZ\", \"lat\": %.5f, \"lon\": %.5f, \"alt\": %.5f, \"vel_h\": %.5f, \"heading\": %.5f, \"vel_v\": %.5f }\n",
gpx->frnr, gpx->sn, gpx->std, gpx->min, gpx->sek, gpx->lat, gpx->lon, gpx->alt, gpx->vH, gpx->vD, gpx->vV );
printf("\n");
@ -863,7 +864,7 @@ int main(int argc, char **argv) {
if (gpx->option.raw == 4) gpx->option.ecc = 1;
// init gpx
memcpy(gpx->blk_rawbits, blk_syncbits, sizeof(blk_syncbits));
memcpy(gpx->frame, frm_sync, sizeof(frm_sync));
gpx->frm_pos = 0; // ecc_blk <-> frm_blk

Wyświetl plik

@ -1113,6 +1113,7 @@ static int print_position(gpx_t *gpx, int ec) {
if (gpx->option.jsn) {
// Print JSON output required by auto_rx.
if (!err && !err1 && !err3) { // frame-nb/id && gps-time && gps-position (crc-)ok; 3 CRCs, RS not needed
// eigentlich GPS, d.h. UTC = GPS - 18sec (ab 1.1.2017)
printf("{ \"frame\": %d, \"id\": \"%s\", \"datetime\": \"%04d-%02d-%02dT%02d:%02d:%06.3fZ\", \"lat\": %.5f, \"lon\": %.5f, \"alt\": %.5f, \"vel_h\": %.5f, \"heading\": %.5f, \"vel_v\": %.5f, \"sats\": %d", gpx->frnr, gpx->id, gpx->jahr, gpx->monat, gpx->tag, gpx->std, gpx->min, gpx->sek, gpx->lat, gpx->lon, gpx->alt, gpx->vH, gpx->vD, gpx->vU, gpx->numSV );
if (gpx->option.ptu && !err0 && gpx->T > -273.0) {
printf(", \"temp\":%.1f", gpx->T );