@@ -585,6 +585,7 @@ void SFE_UBLOX_GPS::processUBXpacket(ubxPacket *msg)
585585 // Parse various byte fields into global vars
586586 constexpr int startingSpot = 0 ; // fixed value used in processUBX
587587
588+ timeOfWeek = extractLong (0 );
588589 gpsMillisecond = extractLong (0 ) % 1000 ; // Get last three digits of iTOW
589590 gpsYear = extractInt (4 );
590591 gpsMonth = extractByte (6 );
@@ -639,14 +640,14 @@ void SFE_UBLOX_GPS::processUBXpacket(ubxPacket *msg)
639640 verticalAccuracy = extractLong (32 );
640641
641642 highResModuleQueried.all = true ;
642- highResModuleQueried.timeOfWeek = true ;
643643 highResModuleQueried.highResLatitude = true ;
644644 highResModuleQueried.highResLongitude = true ;
645645 highResModuleQueried.elipsoid = true ;
646646 highResModuleQueried.meanSeaLevel = true ;
647647 highResModuleQueried.geoidSeparation = true ;
648648 highResModuleQueried.horizontalAccuracy = true ;
649649 highResModuleQueried.verticalAccuracy = true ;
650+ moduleQueried.gpsiTOW = true ; // this can arrive via HPPOS too.
650651
651652 if (_printDebug == true )
652653 {
@@ -1765,12 +1766,13 @@ boolean SFE_UBLOX_GPS::getPVT(uint16_t maxWait)
17651766
17661767uint32_t SFE_UBLOX_GPS::getTimeOfWeek (uint16_t maxWait /* = 250*/ )
17671768{
1768- if (highResModuleQueried. timeOfWeek == false )
1769- getHPPOSLLH ();
1770- highResModuleQueried. timeOfWeek = false ; // Since we are about to give this to user, mark this data as stale
1769+ if (moduleQueried. gpsiTOW == false )
1770+ getPVT ();
1771+ moduleQueried. gpsiTOW = false ; // Since we are about to give this to user, mark this data as stale
17711772 return (timeOfWeek);
17721773}
17731774
1775+
17741776int32_t SFE_UBLOX_GPS::getHighResLatitude (uint16_t maxWait /* = 250*/ )
17751777{
17761778 if (highResModuleQueried.highResLatitude == false )
0 commit comments