GNSS HAL: update probabilityOfGoodFix to confomityIndex
Update variable name for robust location feature
Change-Id: Ia063a5eb0ef5c04bd11ba1e5857594efd5dc5349
CRs-fixed: 2622570
diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp
index f75eef8..46d418b 100644
--- a/gnss/GnssAdapter.cpp
+++ b/gnss/GnssAdapter.cpp
@@ -524,9 +524,9 @@
out.locOutputEngMask = locationExtended.locOutputEngMask;
}
- if (GPS_LOCATION_EXTENDED_HAS_PROBABILITY_OF_GOOD_FIX & locationExtended.flags) {
- out.flags |= GNSS_LOCATION_INFO_PROBABILITY_OF_GOOD_FIX_BIT;
- out.probabilityOfGoodFix = locationExtended.probabilityOfGoodFix;
+ if (GPS_LOCATION_EXTENDED_HAS_CONFORMITY_INDEX & locationExtended.flags) {
+ out.flags |= GNSS_LOCATION_INFO_CONFORMITY_INDEX_BIT;
+ out.conformityIndex = locationExtended.conformityIndex;
}
}
@@ -5301,7 +5301,9 @@
if ((mLocConfigInfo.robustLocationConfigInfo.isValid == true) &&
(mLocConfigInfo.robustLocationConfigInfo.enable == enable) &&
- (mLocConfigInfo.robustLocationConfigInfo.enableFor911 == enableForE911)) {
+ ((mLocConfigInfo.robustLocationConfigInfo.enable == false) ||
+ (mLocConfigInfo.robustLocationConfigInfo.enable == true &&
+ mLocConfigInfo.robustLocationConfigInfo.enableFor911 == enableForE911))) {
// no change in configuration, inform client of response and simply return
reportResponse(LOCATION_ERROR_SUCCESS, sessionId);
return;
diff --git a/location/LocationDataTypes.h b/location/LocationDataTypes.h
index 8586dbd..6a7147d 100644
--- a/location/LocationDataTypes.h
+++ b/location/LocationDataTypes.h
@@ -175,7 +175,7 @@
GNSS_LOCATION_INFO_CALIBRATION_STATUS_BIT = (1<<26), // valid sensor cal status
GNSS_LOCATION_INFO_OUTPUT_ENG_TYPE_BIT = (1<<27), // valid output engine type
GNSS_LOCATION_INFO_OUTPUT_ENG_MASK_BIT = (1<<28), // valid output engine mask
- GNSS_LOCATION_INFO_PROBABILITY_OF_GOOD_FIX_BIT = (1<<29), // valid probability of good fix
+ GNSS_LOCATION_INFO_CONFORMITY_INDEX_BIT = (1<<29), // valid conformity index
} GnssLocationInfoFlagBits;
typedef enum {
@@ -1015,9 +1015,10 @@
// indicates the set of engines contribute to the fix.
PositioningEngineMask locOutputEngMask;
/* When robust location is enabled, this field
- * will indicate proability of good fix if valid.
- * The range is of [0.0, 1.0] */
- float probabilityOfGoodFix;
+ * will how well the various input data considered for
+ * navigation solution conform to expectations.
+ * Range: 0 (least conforming) to 1 (most conforming) */
+ float conformityIndex;
} GnssLocationInfoNotification;
typedef struct {
diff --git a/utils/gps_extended_c.h b/utils/gps_extended_c.h
index 3cc1083..4c174d5 100644
--- a/utils/gps_extended_c.h
+++ b/utils/gps_extended_c.h
@@ -396,9 +396,9 @@
#define GPS_LOCATION_EXTENDED_HAS_DGNSS_REF_STATION_ID 0x40000000000
/** GpsLocationExtended has dgnss data age */
#define GPS_LOCATION_EXTENDED_HAS_DGNSS_DATA_AGE 0x80000000000
- /** GpsLocationExtended has the probabilityOfGoodFix computed
- * from robust location feature. */
-#define GPS_LOCATION_EXTENDED_HAS_PROBABILITY_OF_GOOD_FIX 0x100000000000
+ /** GpsLocationExtended has the conformityIndex computed from
+ * robust location feature. */
+#define GPS_LOCATION_EXTENDED_HAS_CONFORMITY_INDEX 0x100000000000
typedef uint32_t LocNavSolutionMask;
/* Bitmask to specify whether SBAS ionospheric correction is used */
@@ -802,9 +802,10 @@
uint32_t dgnssDataAgeMsec;
/* When robust location is enabled, this field
- * will indicate proability of good fix if valid.
- * The range is of [0.0, 1.0] */
- float probabilityOfGoodFix;
+ * will how well the various input data considered for
+ * navigation solution conform to expectations.
+ * Range: 0 (least conforming) to 1 (most conforming) */
+ float conformityIndex;
} GpsLocationExtended;
enum loc_sess_status {