GNSS O Features according to go/o-gps-hal
Added "Tow Known" as a possible gnss measurement state. As well added Automatic Gain Control (AGC)
to allow jammer detection. Also added the GNSS carrier frequeny to SV status. Also adedd vertical
GPS position uncertainty, speed uncertainty and bearing uncertainty. Also propagate locaton new
fields to geofence engine.
Test: Existing unit tests still pass.
Change-Id: I26784a17e82c044002395e1929f8862cc9de63cb
diff --git a/gnss/1.0/default/GnssMeasurement.cpp b/gnss/1.0/default/GnssMeasurement.cpp
index 0d11636..67f6d8d 100644
--- a/gnss/1.0/default/GnssMeasurement.cpp
+++ b/gnss/1.0/default/GnssMeasurement.cpp
@@ -51,12 +51,19 @@
for (size_t i = 0; i < gnssData.measurementCount; i++) {
auto entry = legacyGnssData->measurements[i];
+ auto state = static_cast<GnssMeasurementState>(entry.state);
+ if (state & IGnssMeasurementCallback::GnssMeasurementState::STATE_TOW_DECODED) {
+ state |= IGnssMeasurementCallback::GnssMeasurementState::STATE_TOW_KNOWN;
+ }
+ if (state & IGnssMeasurementCallback::GnssMeasurementState::STATE_GLO_TOD_DECODED) {
+ state |= IGnssMeasurementCallback::GnssMeasurementState::STATE_GLO_TOD_KNOWN;
+ }
gnssData.measurements[i] = {
.flags = entry.flags,
.svid = entry.svid,
.constellation = static_cast<GnssConstellationType>(entry.constellation),
.timeOffsetNs = entry.time_offset_ns,
- .state = entry.state,
+ .state = state,
.receivedSvTimeInNs = entry.received_sv_time_in_ns,
.receivedSvTimeUncertaintyInNs = entry.received_sv_time_uncertainty_in_ns,
.cN0DbHz = entry.c_n0_dbhz,