From 2dab397e35c074a5ada5feba06ced80e574f8e2c Mon Sep 17 00:00:00 2001 From: Wei Chen Date: Mon, 22 Apr 2019 12:00:53 -0700 Subject: Gnss adapter: retrieve pdop, hdop and vdop from extended struct For none-SPE engine, pdop, hdop and vdop are set in the extDop struct. Update code to retrieve it from there. Change-Id: I698e960cd90f3d72210cfd0a885080f1546c0c7d Crs-fixed: 2439750 --- gnss/GnssAdapter.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'gnss') diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp index 1c80443..2958d9e 100644 --- a/gnss/GnssAdapter.cpp +++ b/gnss/GnssAdapter.cpp @@ -238,17 +238,19 @@ GnssAdapter::convertLocationInfo(GnssLocationInfoNotification& out, out.flags |= GNSS_LOCATION_INFO_ALTITUDE_MEAN_SEA_LEVEL_BIT; out.altitudeMeanSeaLevel = locationExtended.altitudeMeanSeaLevel; } - if (GPS_LOCATION_EXTENDED_HAS_DOP & locationExtended.flags) { + if (GPS_LOCATION_EXTENDED_HAS_EXT_DOP & locationExtended.flags) { + out.flags |= (GNSS_LOCATION_INFO_DOP_BIT|GNSS_LOCATION_INFO_EXT_DOP_BIT); + out.pdop = locationExtended.extDOP.PDOP; + out.hdop = locationExtended.extDOP.HDOP; + out.vdop = locationExtended.extDOP.VDOP; + out.gdop = locationExtended.extDOP.GDOP; + out.tdop = locationExtended.extDOP.TDOP; + } else if (GPS_LOCATION_EXTENDED_HAS_DOP & locationExtended.flags) { out.flags |= GNSS_LOCATION_INFO_DOP_BIT; out.pdop = locationExtended.pdop; out.hdop = locationExtended.hdop; out.vdop = locationExtended.vdop; } - if (GPS_LOCATION_EXTENDED_HAS_EXT_DOP & locationExtended.flags) { - out.flags |= GNSS_LOCATION_INFO_EXT_DOP_BIT; - out.gdop = locationExtended.extDOP.GDOP; - out.tdop = locationExtended.extDOP.TDOP; - } if (GPS_LOCATION_EXTENDED_HAS_MAG_DEV & locationExtended.flags) { out.flags |= GNSS_LOCATION_INFO_MAGNETIC_DEVIATION_BIT; out.magneticDeviation = locationExtended.magneticDeviation; -- cgit v1.2.3