diff options
author | qctecmdr <qctecmdr@localhost> | 2022-01-06 17:10:16 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2022-01-06 17:10:15 -0800 |
commit | cf77e9a0c916925290533269894490c3aa1902be (patch) | |
tree | c5e8d42e04a07215fb75cdeb2ead75d7484312aa | |
parent | fd0ffe9d8151342810a6b55f6433ef70d4914c2a (diff) | |
parent | dc30a7c9b0fa12aa1e0ae63f9feb5112c9513f3f (diff) |
Merge "GNSS adapter: use time association in meas for boot timestamp"
-rw-r--r-- | android/2.0/location_api/LocationUtil.cpp | 2 | ||||
-rw-r--r-- | android/2.1/location_api/LocationUtil.cpp | 2 | ||||
-rw-r--r-- | core/LocApiBase.cpp | 106 | ||||
-rw-r--r-- | core/LocApiBase.h | 26 | ||||
-rw-r--r-- | gnss/GnssAdapter.cpp | 55 | ||||
-rw-r--r-- | gnss/GnssAdapter.h | 3 | ||||
-rw-r--r-- | location/LocationDataTypes.h | 4 | ||||
-rw-r--r-- | utils/gps_extended_c.h | 9 | ||||
-rw-r--r-- | utils/loc_gps.h | 4 |
9 files changed, 186 insertions, 25 deletions
diff --git a/android/2.0/location_api/LocationUtil.cpp b/android/2.0/location_api/LocationUtil.cpp index 961b7b1..f55a5f9 100644 --- a/android/2.0/location_api/LocationUtil.cpp +++ b/android/2.0/location_api/LocationUtil.cpp @@ -89,7 +89,7 @@ void convertGnssLocation(Location& in, V2_0::GnssLocation& out) memset(&out, 0, sizeof(V2_0::GnssLocation)); convertGnssLocation(in, out.v1_0); - if (in.flags & LOCATION_HAS_ELAPSED_REAL_TIME) { + if (in.flags & LOCATION_HAS_ELAPSED_REAL_TIME_BIT) { out.elapsedRealtime.flags |= ElapsedRealtimeFlags::HAS_TIMESTAMP_NS; out.elapsedRealtime.timestampNs = in.elapsedRealTime; out.elapsedRealtime.flags |= ElapsedRealtimeFlags::HAS_TIME_UNCERTAINTY_NS; diff --git a/android/2.1/location_api/LocationUtil.cpp b/android/2.1/location_api/LocationUtil.cpp index 5154e70..690b820 100644 --- a/android/2.1/location_api/LocationUtil.cpp +++ b/android/2.1/location_api/LocationUtil.cpp @@ -90,7 +90,7 @@ void convertGnssLocation(Location& in, V2_0::GnssLocation& out) memset(&out, 0, sizeof(V2_0::GnssLocation)); convertGnssLocation(in, out.v1_0); - if (in.flags & LOCATION_HAS_ELAPSED_REAL_TIME) { + if (in.flags & LOCATION_HAS_ELAPSED_REAL_TIME_BIT) { out.elapsedRealtime.flags |= ElapsedRealtimeFlags::HAS_TIMESTAMP_NS; out.elapsedRealtime.timestampNs = in.elapsedRealTime; out.elapsedRealtime.flags |= ElapsedRealtimeFlags::HAS_TIME_UNCERTAINTY_NS; diff --git a/core/LocApiBase.cpp b/core/LocApiBase.cpp index 52e5174..9d92810 100644 --- a/core/LocApiBase.cpp +++ b/core/LocApiBase.cpp @@ -934,7 +934,7 @@ void LocApiBase:: DEFAULT_IMPL() int64_t ElapsedRealtimeEstimator::getElapsedRealtimeEstimateNanos(int64_t curDataTimeNanos, - bool isCurDataTimeTrustable, int64_t tbf) { + bool isCurDataTimeTrustable, int64_t tbfNanos) { //The algorithm works follow below steps: //When isCurDataTimeTrustable is meet (means Modem timestamp is already stable), //1, Wait for mFixTimeStablizationThreshold fixes; While waiting for modem time @@ -957,7 +957,7 @@ int64_t ElapsedRealtimeEstimator::getElapsedRealtimeEstimateNanos(int64_t curDat int64_t sinceBootTimeNanos = 0; if (getCurrentTime(currentTime, sinceBootTimeNanos)) { if (isCurDataTimeTrustable) { - if (tbf > 0 && tbf != curDataTimeNanos - mPrevDataTimeNanos) { + if (tbfNanos > 0 && tbfNanos != curDataTimeNanos - mPrevDataTimeNanos) { mFixTimeStablizationThreshold = 5; } int64_t currentTimeNanos = (int64_t)currentTime.tv_sec*1000000000 + currentTime.tv_nsec; @@ -991,6 +991,8 @@ void ElapsedRealtimeEstimator::reset() { mPrevUtcTimeNanos = 0; mPrevBootTimeNanos = 0; mFixTimeStablizationThreshold = 5; + memset(&mTimePairPVTReport, 0, sizeof(mTimePairPVTReport)); + memset(&mTimePairMeasReport, 0, sizeof(mTimePairMeasReport)); } int64_t ElapsedRealtimeEstimator::getElapsedRealtimeQtimer(int64_t qtimerTicksAtOrigin) { @@ -1032,6 +1034,106 @@ int64_t ElapsedRealtimeEstimator::getElapsedRealtimeQtimer(int64_t qtimerTicksAt return elapsedRealTimeNanos; } +void ElapsedRealtimeEstimator::saveGpsTimeAndQtimerPairInPvtReport( + const GpsLocationExtended& locationExtended) { + + // Use GPS timestamp and qtimer tick for 1Hz PVT report for association + if ((locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_GPS_TIME) && + (locationExtended.gpsTime.gpsTimeOfWeekMs % 1000 == 0) && + (locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_SYSTEM_TICK) && + (locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_SYSTEM_TICK_UNC)) { + mTimePairPVTReport.gpsTime.gpsWeek = locationExtended.gpsTime.gpsWeek; + mTimePairPVTReport.gpsTime.gpsTimeOfWeekMs = + locationExtended.gpsTime.gpsTimeOfWeekMs; + mTimePairPVTReport.qtimerTick = locationExtended.systemTick; + mTimePairPVTReport.timeUncMsec = locationExtended.systemTickUnc; + + LOC_LOGv("gps time (%d, %d), qtimer tick %" PRIi64 ", qtime unc %f", + mTimePairPVTReport.gpsTime.gpsWeek, mTimePairPVTReport.gpsTime.gpsTimeOfWeekMs, + mTimePairPVTReport.qtimerTick, mTimePairPVTReport.timeUncMsec); + } +} + +void ElapsedRealtimeEstimator::saveGpsTimeAndQtimerPairInMeasReport( + const GnssSvMeasurementSet& svMeasurementSet) { + + const GnssSvMeasurementHeader& svMeasSetHeader = svMeasurementSet.svMeasSetHeader; + // Use 1Hz measurement report timestamp and qtimer tick for association + if ((svMeasurementSet.isNhz == false) && + (svMeasSetHeader.gpsSystemTime.validityMask & GNSS_SYSTEM_TIME_WEEK_VALID) && + (svMeasSetHeader.gpsSystemTime.validityMask & GNSS_SYSTEM_TIME_WEEK_MS_VALID)) { + + LOC_LOGv("gps time %d %d, meas unc %f, ref cnt tick %" PRIi64 "," + "system rtc ms %" PRIi64 ", systemClkTimeUncMs %f", + svMeasurementSet.svMeasSetHeader.gpsSystemTime.systemWeek, + svMeasurementSet.svMeasSetHeader.gpsSystemTime.systemMsec, + svMeasurementSet.svMeasSetHeader.gpsSystemTime.systemClkTimeUncMs, + svMeasurementSet.svMeasSetHeader.refCountTicks, + svMeasurementSet.svMeasSetHeader.gpsSystemTimeExt.systemRtcMs, + svMeasurementSet.svMeasSetHeader.gpsSystemTime.systemClkTimeUncMs); + if ((svMeasSetHeader.flags & GNSS_SV_MEAS_HEADER_HAS_REF_COUNT_TICKS) && + (svMeasSetHeader.flags & GNSS_SV_MEAS_HEADER_HAS_REF_COUNT_TICKS_UNC)) { + mTimePairMeasReport.gpsTime.gpsWeek = svMeasSetHeader.gpsSystemTime.systemWeek; + mTimePairMeasReport.gpsTime.gpsTimeOfWeekMs = svMeasSetHeader.gpsSystemTime.systemMsec; + mTimePairMeasReport.qtimerTick = svMeasurementSet.svMeasSetHeader.refCountTicks; + mTimePairMeasReport.timeUncMsec = svMeasurementSet.svMeasSetHeader.refCountTicksUnc; + } + + LOC_LOGv("gps time (%d, %d), qtimer tick %" PRIi64 ", unc %f", + mTimePairMeasReport.gpsTime.gpsWeek, mTimePairMeasReport.gpsTime.gpsTimeOfWeekMs, + mTimePairMeasReport.qtimerTick, mTimePairMeasReport.timeUncMsec); + } +} + +#define MSEC_IN_ONE_WEEK 604800000LL +bool ElapsedRealtimeEstimator::getElapsedRealtimeForGpsTime( + const GPSTimeStruct& gpsTimeAtOrigin, int64_t &bootTimeNsAtOrigin, float & bootTimeUnc) { + struct timespec curBootTime = {}; + int64_t curBootTimeNs = 0; + int64_t curQTimerNSec = 0; + int64_t qtimerNsecAtOrigin = 0; + int64_t gpsTimeDiffMsec = 0; + GpsTimeQtimerTickPair timePair; + + // We have valid association + if (mTimePairMeasReport.gpsTime.gpsWeek != 0) { + timePair = mTimePairMeasReport; + LOC_LOGv("use meas time association"); + } else if (mTimePairPVTReport.gpsTime.gpsWeek != 0) { + LOC_LOGv("use PVT time association"); + timePair = mTimePairPVTReport; + } else { + return false; + } + + int64_t originMsec = (int64_t)gpsTimeAtOrigin.gpsWeek * (int64_t)MSEC_IN_ONE_WEEK + + (int64_t)gpsTimeAtOrigin.gpsTimeOfWeekMs; + int64_t timePairMsec = (int64_t)timePair.gpsTime.gpsWeek * (int64_t)MSEC_IN_ONE_WEEK + + (int64_t)timePair.gpsTime.gpsTimeOfWeekMs; + gpsTimeDiffMsec = originMsec - timePairMsec; + + qtimerNsecAtOrigin = timePair.qtimerTick * 10000/192 + gpsTimeDiffMsec * 1000000; + + clock_gettime(CLOCK_BOOTTIME, &curBootTime); + curBootTimeNs = ((int64_t)curBootTime.tv_sec) * 1000000000 + (int64_t)curBootTime.tv_nsec; + // qtimer freq: 19200000, so + // so 1 tick equals 1000,000,000/19,200,000 ns = 10000/192 + curQTimerNSec = getQTimerTickCount() * 10000/192; + bootTimeNsAtOrigin = curBootTimeNs - (curQTimerNSec - qtimerNsecAtOrigin); + + bootTimeUnc = timePair.timeUncMsec; + LOC_LOGv("gpsTimeAtOrigin (%d, %d), timepair: gps (%d, %d), " + "qtimer nsec =%" PRIi64 ", curQTimerNSec=%" PRIi64 " qtimerNsecAtOrigin=%" PRIi64 "" + " curBoottimeNSec=%" PRIi64 " bootimeNsecAtOrigin=%" PRIi64 ", boottime unc =%f", + gpsTimeAtOrigin.gpsWeek, gpsTimeAtOrigin.gpsTimeOfWeekMs, + timePair.gpsTime.gpsWeek, timePair.gpsTime.gpsTimeOfWeekMs, + timePair.qtimerTick * 100000 / 192, + curQTimerNSec, qtimerNsecAtOrigin, curBootTimeNs, bootTimeNsAtOrigin, bootTimeUnc); + + return true; +} + + bool ElapsedRealtimeEstimator::getCurrentTime( struct timespec& currentTime, int64_t& sinceBootTimeNanos) { diff --git a/core/LocApiBase.h b/core/LocApiBase.h index 8fad4a5..e26c00a 100644 --- a/core/LocApiBase.h +++ b/core/LocApiBase.h @@ -356,6 +356,12 @@ public: }; class ElapsedRealtimeEstimator { + typedef struct { + GPSTimeStruct gpsTime; + int64_t qtimerTick; + float timeUncMsec; // in milli-seconds + } GpsTimeQtimerTickPair; + private: int64_t mCurrentClockDiff; int64_t mPrevUtcTimeNanos; @@ -363,16 +369,26 @@ private: int64_t mFixTimeStablizationThreshold; int64_t mInitialTravelTime; int64_t mPrevDataTimeNanos; -public: + // association between gps time and qtimer value + // the two variable saves a pair of gps time and qtimer time + // read at the same point + GpsTimeQtimerTickPair mTimePairPVTReport; + GpsTimeQtimerTickPair mTimePairMeasReport; - ElapsedRealtimeEstimator(int64_t travelTimeNanosEstimate): - mInitialTravelTime(travelTimeNanosEstimate) {reset();} +public: + inline ElapsedRealtimeEstimator(int64_t travelTimeNanosEstimate) : + mInitialTravelTime(travelTimeNanosEstimate) { + reset(); + } int64_t getElapsedRealtimeEstimateNanos(int64_t curDataTimeNanos, - bool isCurDataTimeTrustable, int64_t tbf); + bool isCurDataTimeTrustable, int64_t tbfNanos); inline int64_t getElapsedRealtimeUncNanos() { return 5000000;} void reset(); - static int64_t getElapsedRealtimeQtimer(int64_t qtimerTicksAtOrigin); + bool getElapsedRealtimeForGpsTime(const GPSTimeStruct& gpsTimeAtOrigin, + int64_t &elapsedTime, float & elpasedTimeUnc); + void saveGpsTimeAndQtimerPairInPvtReport(const GpsLocationExtended& locationExtended); + void saveGpsTimeAndQtimerPairInMeasReport(const GnssSvMeasurementSet& svMeasurementSet); static bool getCurrentTime(struct timespec& currentTime, int64_t& sinceBootTimeNanos); }; diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp index 8fcc147..d07f5d9 100644 --- a/gnss/GnssAdapter.cpp +++ b/gnss/GnssAdapter.cpp @@ -165,7 +165,8 @@ GnssAdapter::GnssAdapter() : mGnssPowerStatisticsInit(false), mBootReferenceEnergy(0), mPowerElapsedRealTimeCal(30000000), - mAddressRequestCb(nullptr) + mAddressRequestCb(nullptr), + mPositionElapsedRealTimeCal(30000000) { LOC_LOGD("%s]: Constructor %p", __func__, this); mLocPositionMode.mode = LOC_POSITION_MODE_INVALID; @@ -352,14 +353,9 @@ GnssAdapter::convertLocation(Location& out, const UlpLocation& ulpLocation, } if (LOC_GPS_LOCATION_HAS_SPOOF_MASK & ulpLocation.gpsLocation.flags) { - out.flags |= LOCATION_HAS_SPOOF_MASK; + out.flags |= LOCATION_HAS_SPOOF_MASK_BIT; out.spoofMask = ulpLocation.gpsLocation.spoof_mask; } - if (LOC_GPS_LOCATION_HAS_ELAPSED_REAL_TIME & ulpLocation.gpsLocation.flags) { - out.flags |= LOCATION_HAS_ELAPSED_REAL_TIME; - out.elapsedRealTime = ulpLocation.gpsLocation.elapsedRealTime; - out.elapsedRealTimeUnc = ulpLocation.gpsLocation.elapsedRealTimeUnc; - } out.qualityType = LOCATION_STANDALONE_QUALITY_TYPE; if (GPS_LOCATION_EXTENDED_HAS_NAV_SOLUTION_MASK & locationExtended.flags) { out.flags |= LOCATION_HAS_QUALITY_TYPE_BIT; @@ -381,6 +377,31 @@ GnssAdapter::convertLocation(Location& out, const UlpLocation& ulpLocation, } } +void GnssAdapter::fillElapsedRealTime(const GpsLocationExtended& locationExtended, + Location& out) { + if (locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_GPS_TIME) { + int64_t elapsedTimeNs = 0; + float elapsedTimeUncMsec = 0.0; + if (mPositionElapsedRealTimeCal.getElapsedRealtimeForGpsTime( + locationExtended.gpsTime, elapsedTimeNs, elapsedTimeUncMsec)) { + out.flags |= LOCATION_HAS_ELAPSED_REAL_TIME_BIT; + out.elapsedRealTime = elapsedTimeNs; + out.elapsedRealTimeUnc = (int64_t) (elapsedTimeUncMsec * 1000000); + } +#ifndef FEATURE_AUTOMOTIVE + else if (out.timestamp > 0) { + int64_t locationTimeNanos = (int64_t)out.timestamp * 1000000; + bool isCurDataTimeTrustable = (out.timestamp % mLocPositionMode.min_interval == 0); + out.flags |= LOCATION_HAS_ELAPSED_REAL_TIME_BIT; + out.elapsedRealTime = mPositionElapsedRealTimeCal.getElapsedRealtimeEstimateNanos( + locationTimeNanos, isCurDataTimeTrustable, + (int64_t)mLocPositionMode.min_interval * 1000000); + out.elapsedRealTimeUnc = mPositionElapsedRealTimeCal.getElapsedRealtimeUncNanos(); + } +#endif //FEATURE_AUTOMOTIVE + } +} + /* This is utility routine that computes number of SV used in the fix from the svUsedIdsMask. */ @@ -2806,6 +2827,7 @@ GnssAdapter::suspendSessions() mDgnssState &= ~DGNSS_STATE_NO_NMEA_PENDING; } stopDgnssNtrip(); + mPositionElapsedRealTimeCal.reset(); mSPEAlreadyRunningAtHighestInterval = false; } } @@ -3587,6 +3609,7 @@ GnssAdapter::stopTracking(LocationAPI* client, uint32_t id) mDgnssState &= ~DGNSS_STATE_NO_NMEA_PENDING; } stopDgnssNtrip(); + mPositionElapsedRealTimeCal.reset(); mSPEAlreadyRunningAtHighestInterval = false; } @@ -3911,6 +3934,10 @@ GnssAdapter::reportPositionEvent(const UlpLocation& ulpLocation, mAdapter.reportData(mDataNotify); } + // save the association of GPS timestamp and qtimer tick cnt in PVT report + mAdapter.mPositionElapsedRealTimeCal + .saveGpsTimeAndQtimerPairInPvtReport(mLocationExtended); + if (true == mAdapter.initEngHubProxy()){ // send the SPE fix to engine hub mAdapter.mEngHubProxy->gnssReportPosition(mUlpLocation, mLocationExtended, mStatus); @@ -4131,7 +4158,9 @@ GnssAdapter::reportPosition(const UlpLocation& ulpLocation, GnssLocationInfoNotification locationInfo = {}; convertLocationInfo(locationInfo, locationExtended, status); convertLocation(locationInfo.location, ulpLocation, locationExtended); + fillElapsedRealTime(locationExtended, locationInfo.location); logLatencyInfo(); + for (auto it=mClientData.begin(); it != mClientData.end(); ++it) { if (reportToAllClients || needReportForClient(it->first, status)) { if (nullptr != it->second.gnssLocationInfoCb) { @@ -4263,6 +4292,8 @@ GnssAdapter::reportEnginePositions(unsigned int count, convertLocation(locationInfo[i].location, engLocation->location, engLocation->locationExtended); + fillElapsedRealTime(engLocation->locationExtended, + locationInfo[i].location); } } @@ -4892,19 +4923,21 @@ GnssAdapter::reportGnssMeasurementsEvent(const GnssMeasurements& gnssMeasurement struct MsgReportGnssMeasurementData : public LocMsg { GnssAdapter& mAdapter; GnssMeasurements mGnssMeasurements; - GnssMeasurementsNotification mMeasurementsNotify; inline MsgReportGnssMeasurementData(GnssAdapter& adapter, const GnssMeasurements& gnssMeasurements, int msInWeek) : LocMsg(), mAdapter(adapter), - mMeasurementsNotify(gnssMeasurements.gnssMeasNotification) { + mGnssMeasurements(gnssMeasurements) { if (-1 != msInWeek) { - mAdapter.getAgcInformation(mMeasurementsNotify, msInWeek); + mAdapter.getAgcInformation(mGnssMeasurements.gnssMeasNotification, msInWeek); } } + inline virtual void proc() const { - mAdapter.reportGnssMeasurementData(mMeasurementsNotify); + mAdapter.mPositionElapsedRealTimeCal.saveGpsTimeAndQtimerPairInMeasReport( + mGnssMeasurements.gnssSvMeasurementSet); + mAdapter.reportGnssMeasurementData(mGnssMeasurements.gnssMeasNotification); } }; diff --git a/gnss/GnssAdapter.h b/gnss/GnssAdapter.h index f7c1739..9c47d08 100644 --- a/gnss/GnssAdapter.h +++ b/gnss/GnssAdapter.h @@ -288,6 +288,7 @@ class GnssAdapter : public LocAdapterBase { std::queue<GnssLatencyInfo> mGnssLatencyInfoQueue; GnssReportLoggerUtil mLogger; bool mDreIntEnabled; + ElapsedRealtimeEstimator mPositionElapsedRealTimeCal; /* === NativeAgpsHandler ======================================================== */ NativeAgpsHandler mNativeAgpsHandler; @@ -314,6 +315,8 @@ class GnssAdapter : public LocAdapterBase { inline void injectLocationAndAddr(const Location& location, const GnssCivicAddress& addr) { mLocApi->injectPositionAndCivicAddress(location, addr);} static bool isFlpClient(LocationCallbacks& locationCallbacks); + void fillElapsedRealTime(const GpsLocationExtended& locationExtended, + Location& out); /*==== DGnss Ntrip Source ==========================================================*/ StartDgnssNtripParams mStartDgnssNtripParams; diff --git a/location/LocationDataTypes.h b/location/LocationDataTypes.h index 347393d..06dcb85 100644 --- a/location/LocationDataTypes.h +++ b/location/LocationDataTypes.h @@ -76,8 +76,8 @@ typedef enum { LOCATION_HAS_VERTICAL_ACCURACY_BIT = (1<<5), // location has valid vertical accuracy LOCATION_HAS_SPEED_ACCURACY_BIT = (1<<6), // location has valid speed accuracy LOCATION_HAS_BEARING_ACCURACY_BIT = (1<<7), // location has valid bearing accuracy - LOCATION_HAS_SPOOF_MASK = (1<<8), // location has valid spoof mask - LOCATION_HAS_ELAPSED_REAL_TIME = (1<<9), // location has valid elapsed real time + LOCATION_HAS_SPOOF_MASK_BIT = (1<<8), // location has valid spoof mask + LOCATION_HAS_ELAPSED_REAL_TIME_BIT = (1<<9), // location has valid elapsed real time LOCATION_HAS_CONFORMITY_INDEX_BIT = (1<<10), // location has valid conformity index LOCATION_HAS_QUALITY_TYPE_BIT = (1<<11), // location has valid quality type LOCATION_HAS_TECH_MASK_BIT = (1<<12), // location has valid tech mask diff --git a/utils/gps_extended_c.h b/utils/gps_extended_c.h index d84b894..5400720 100644 --- a/utils/gps_extended_c.h +++ b/utils/gps_extended_c.h @@ -429,6 +429,9 @@ typedef uint64_t GpsLocationExtendedFlags; #define GPS_LOCATION_EXTENDED_HAS_DR_SOLUTION_STATUS_MASK 0x800000000000 /** GpsLocationExtended has altitudeAssumed. */ #define GPS_LOCATION_EXTENDED_HAS_ALTITUDE_ASSUMED 0x1000000000000 +#define GPS_LOCATION_EXTENDED_HAS_SYSTEM_TICK 0x2000000000000 +/** GpsLocationExtended has system tick unc. */ +#define GPS_LOCATION_EXTENDED_HAS_SYSTEM_TICK_UNC 0x4000000000000 typedef uint32_t LocNavSolutionMask; /* Bitmask to specify whether SBAS ionospheric correction is used */ @@ -875,6 +878,10 @@ typedef struct { * true: Altitude is assumed; there may not be enough * satellites to determine the precise altitude. */ bool altitudeAssumed; + /** System Tick at GPS Time */ + uint64_t systemTick; + /** Uncertainty for System Tick at GPS Time in milliseconds */ + float systemTickUnc; } GpsLocationExtended; // struct that contains complete position info from engine @@ -1518,6 +1525,7 @@ typedef uint64_t GpsSvMeasHeaderFlags; #define GNSS_SV_MEAS_HEADER_HAS_GLOG1G2_TIME_BIAS 0x200000000 #define GNSS_SV_MEAS_HEADER_HAS_BDSB1IB1C_TIME_BIAS 0x400000000 #define GNSS_SV_MEAS_HEADER_HAS_GALE1E5B_TIME_BIAS 0x800000000 +#define GNSS_SV_MEAS_HEADER_HAS_REF_COUNT_TICKS_UNC 0x1000000000 typedef struct { @@ -1571,6 +1579,7 @@ typedef struct /** Receiver tick at frame count */ uint64_t refCountTicks; + float refCountTicksUnc; /** DGNSS corrections source type RTCM, 3GPP etc, if DGNSS was * used for these measurements. */ diff --git a/utils/loc_gps.h b/utils/loc_gps.h index faa897b..0c122fb 100644 --- a/utils/loc_gps.h +++ b/utils/loc_gps.h @@ -106,10 +106,8 @@ typedef uint16_t LocGpsLocationFlags; #define LOC_GPS_LOCATION_HAS_BEARING_ACCURACY 0x0080 /** LocGpsLocation has valid spoof mask */ #define LOC_GPS_LOCATION_HAS_SPOOF_MASK 0x0100 -/** LocGpsLocation has valid Real Time and Real Time Uncertainty */ -#define LOC_GPS_LOCATION_HAS_ELAPSED_REAL_TIME 0x0200 /** Location has valid source information. */ -#define LOC_GPS_LOCATION_HAS_SOURCE_INFO 0x0400 +#define LOC_GPS_LOCATION_HAS_SOURCE_INFO 0x0200 /** Spoof mask in LocGpsLocation */ typedef uint32_t LocGpsSpoofMask; |