From 82d0efd99ae4aa5643d6fa844f44c850fa008cc5 Mon Sep 17 00:00:00 2001 From: Yingjie Wang Date: Thu, 15 Mar 2018 11:42:15 +0530 Subject: [PATCH] Map additional fields in GpsLocationExtended Map velocity and system time fields from GpsLocationExtended to GnssLocationInfoNotification Change-Id: If53575213de575ad71b68018beb8c3f5fd587bcf CRs-fixed: 2184592 --- gnss/GnssAdapter.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp index f996ebee..dca3d0f9 100644 --- a/gnss/GnssAdapter.cpp +++ b/gnss/GnssAdapter.cpp @@ -367,6 +367,35 @@ GnssAdapter::convertLocationInfo(GnssLocationInfoNotification& out, out.bodyFrameData.yawRate = locationExtended.bodyFrameData.yawRate; out.bodyFrameData.pitch = locationExtended.bodyFrameData.pitch; } + if (GPS_LOCATION_EXTENDED_HAS_GPS_TIME & locationExtended.flags) { + out.flags |= GPS_LOCATION_EXTENDED_HAS_GPS_TIME; + out.gnssSystemTime.gnssSystemTimeSrc = locationExtended.gnssSystemTime.gnssSystemTimeSrc; + out.gnssSystemTime.u = locationExtended.gnssSystemTime.u; + } + if (GPS_LOCATION_EXTENDED_HAS_NORTH_VEL & locationExtended.flags) { + out.flags |= GPS_LOCATION_EXTENDED_HAS_NORTH_VEL; + out.northVelocity = locationExtended.northVelocity; + } + if (GPS_LOCATION_EXTENDED_HAS_EAST_VEL & locationExtended.flags) { + out.flags |= GPS_LOCATION_EXTENDED_HAS_EAST_VEL; + out.eastVelocity = locationExtended.eastVelocity; + } + if (GPS_LOCATION_EXTENDED_HAS_UP_VEL & locationExtended.flags) { + out.flags |= GPS_LOCATION_EXTENDED_HAS_UP_VEL; + out.upVelocity = locationExtended.upVelocity; + } + if (GPS_LOCATION_EXTENDED_HAS_NORTH_VEL_UNC & locationExtended.flags) { + out.flags |= GPS_LOCATION_EXTENDED_HAS_NORTH_VEL_UNC; + out.northVelocityStdDeviation = locationExtended.northVelocityStdDeviation; + } + if (GPS_LOCATION_EXTENDED_HAS_EAST_VEL_UNC & locationExtended.flags) { + out.flags |= GPS_LOCATION_EXTENDED_HAS_EAST_VEL_UNC; + out.eastVelocityStdDeviation = locationExtended.eastVelocityStdDeviation; + } + if (GPS_LOCATION_EXTENDED_HAS_UP_VEL_UNC & locationExtended.flags) { + out.flags |= GPS_LOCATION_EXTENDED_HAS_UP_VEL_UNC; + out.upVelocityStdDeviation = locationExtended.upVelocityStdDeviation; + } } inline uint32_t