@@ -1135,7 +1135,7 @@ static int get_posdatetime(gpx_t *gpx, int pos_posdatetime) {
11351135 // ublox M10 UBX-NAV-POSECEF (0x01 0x01) ?
11361136 err |= get_ECEFkoord (gpx , pos_posdatetime + 2 ); // plausibility-check: altitude, if ecef=(0,0,0)
11371137
1138- // ublox M10 UBX-NAV-PVT (0x01 0x07) ? (UTC? )
1138+ // ublox M10 UBX-NAV-PVT (0x01 0x07) ? (UTC)
11391139 // date
11401140 gpx -> jahr = gpx -> frame [pos_posdatetime + 20 ] | gpx -> frame [pos_posdatetime + 21 ]<<8 ;
11411141 gpx -> monat = gpx -> frame [pos_posdatetime + 22 ];
@@ -1144,6 +1144,8 @@ static int get_posdatetime(gpx_t *gpx, int pos_posdatetime) {
11441144 gpx -> std = gpx -> frame [pos_posdatetime + 24 ];
11451145 gpx -> min = gpx -> frame [pos_posdatetime + 25 ];
11461146 gpx -> sek = gpx -> frame [pos_posdatetime + 26 ];
1147+ if (gpx -> frame [pos_posdatetime + 27 ] < 100 ) gpx -> sek += gpx -> frame [pos_posdatetime + 27 ]/100.0 ;
1148+ //
11471149 gpx -> isUTC = 1 ;
11481150
11491151 ///TODO: numSV/fixOK
@@ -2024,8 +2026,8 @@ static int prn_gpspos(gpx_t *gpx) {
20242026static int prn_posdatetime (gpx_t * gpx ) {
20252027 //Gps2Date(gpx);
20262028 //fprintf(stdout, "%s ", weekday[gpx->wday]);
2027- fprintf (stdout , "%04d-%02d-%02d %02d:%02d:%02d " ,
2028- gpx -> jahr , gpx -> monat , gpx -> tag , gpx -> std , gpx -> min , ( int ) gpx -> sek );
2029+ fprintf (stdout , "%04d-%02d-%02d %02d:%02d:%05.2f " ,
2030+ gpx -> jahr , gpx -> monat , gpx -> tag , gpx -> std , gpx -> min , gpx -> sek );
20292031 //if (gpx->option.vbs == 3) fprintf(stdout, " (W %d)", gpx->week);
20302032 fprintf (stdout , " " );
20312033
@@ -2372,7 +2374,7 @@ static int print_position(gpx_t *gpx, int ec) {
23722374 fprintf (stdout , ", \"tx_frequency\": %d" , gpx -> freq );
23732375 }
23742376
2375- // Reference time/position (fw 0x50dd: datetime UTC ? )
2377+ // Reference time/position (fw 0x50dd: datetime UTC)
23762378 fprintf (stdout , ", \"ref_datetime\": \"%s\"" , gpx -> isUTC ? "UTC" : "GPS" ); // {"GPS", "UTC"} GPS-UTC=leap_sec
23772379 fprintf (stdout , ", \"ref_position\": \"%s\"" , "GPS" ); // {"GPS", "MSL"} GPS=ellipsoid , MSL=geoid
23782380
0 commit comments