summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqctecmdr <qctecmdr@localhost>2020-10-14 23:26:50 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2020-10-14 23:26:50 -0700
commit8838a5166dcf86058726a002afb6b3f15e4bc150 (patch)
treea9ed9cfa4fa54257930211ce125d962a90c09a05
parent28da8ac64853c2e3fc089e123bf051334c6965a6 (diff)
parentfdfdf624e63e0e166a4ffa4631936633b50119a8 (diff)
Merge "SPE PVT report: include altitude assumed info"
-rw-r--r--gnss/GnssAdapter.cpp5
-rw-r--r--location/LocationDataTypes.h5
-rw-r--r--utils/gps_extended_c.h10
3 files changed, 19 insertions, 1 deletions
diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp
index 2d63fc1..85567fb 100644
--- a/gnss/GnssAdapter.cpp
+++ b/gnss/GnssAdapter.cpp
@@ -624,6 +624,11 @@ GnssAdapter::convertLocationInfo(GnssLocationInfoNotification& out,
out.flags |= GNSS_LOCATION_INFO_DR_SOLUTION_STATUS_MASK_BIT;
out.drSolutionStatusMask = locationExtended.drSolutionStatusMask;
}
+
+ if (GPS_LOCATION_EXTENDED_HAS_ALTITUDE_ASSUMED & locationExtended.flags) {
+ out.flags |= GNSS_LOCATION_INFO_ALTITUDE_ASSUMED_BIT;
+ out.altitudeAssumed = locationExtended.altitudeAssumed;
+ }
}
inline uint32_t
diff --git a/location/LocationDataTypes.h b/location/LocationDataTypes.h
index c1fda47..a98c8db 100644
--- a/location/LocationDataTypes.h
+++ b/location/LocationDataTypes.h
@@ -203,7 +203,8 @@ typedef enum {
GNSS_LOCATION_INFO_CONFORMITY_INDEX_BIT = (1<<28), // conformity index
GNSS_LOCATION_INFO_LLA_VRP_BASED_BIT = (1<<29), // VRP-based lat/long/alt
GNSS_LOCATION_INFO_ENU_VELOCITY_VRP_BASED_BIT = (1<<30), // VRP-based east/north/up vel
- GNSS_LOCATION_INFO_DR_SOLUTION_STATUS_MASK_BIT = (1ULL<<31), // DR solution status
+ GNSS_LOCATION_INFO_DR_SOLUTION_STATUS_MASK_BIT = (1ULL<<31), // Valid DR solution status
+ GNSS_LOCATION_INFO_ALTITUDE_ASSUMED_BIT = (1ULL<<32), // Valid altitude assumed
} GnssLocationInfoFlagBits;
typedef enum {
@@ -1100,6 +1101,8 @@ typedef struct {
// VRR-based east, north, and up velocity
float enuVelocityVRPBased[3];
DrSolutionStatusMask drSolutionStatusMask;
+ // true: altitude is assumed, false: altitude is calculated
+ bool altitudeAssumed;
} GnssLocationInfoNotification;
typedef struct {
diff --git a/utils/gps_extended_c.h b/utils/gps_extended_c.h
index febbd7b..b6b1213 100644
--- a/utils/gps_extended_c.h
+++ b/utils/gps_extended_c.h
@@ -411,8 +411,12 @@ typedef uint64_t GpsLocationExtendedFlags;
#define GPS_LOCATION_EXTENDED_HAS_LLA_VRP_BASED 0x200000000000
/** GpsLocationExtended has the velocityVRPased. */
#define GPS_LOCATION_EXTENDED_HAS_ENU_VELOCITY_LLA_VRP_BASED 0x400000000000
+/** GpsLocationExtended has upperTriangleFullCovMatrix. */
#define GPS_LOCATION_EXTENDED_HAS_UPPER_TRIANGLE_FULL_COV_MATRIX 0x800000000000
+/** GpsLocationExtended has drSolutionStatusMask. */
#define GPS_LOCATION_EXTENDED_HAS_DR_SOLUTION_STATUS_MASK 0x1000000000000
+/** GpsLocationExtended has altitudeAssumed. */
+#define GPS_LOCATION_EXTENDED_HAS_ALTITUDE_ASSUMED 0x2000000000000
typedef uint32_t LocNavSolutionMask;
/* Bitmask to specify whether SBAS ionospheric correction is used */
@@ -856,6 +860,12 @@ typedef struct {
*/
float upperTriangleFullCovMatrix[COV_MATRIX_SIZE];
DrSolutionStatusMask drSolutionStatusMask;
+ /** When this field is valid, it will indicates whether altitude
+ * is assumed or calculated.
+ * false: Altitude is calculated.
+ * true: Altitude is assumed; there may not be enough
+ * satellites to determine the precise altitude. */
+ bool altitudeAssumed;
} GpsLocationExtended;
enum loc_sess_status {