diff options
author | qctecmdr <qctecmdr@localhost> | 2019-05-09 02:42:42 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-05-09 02:42:42 -0700 |
commit | f5634ec21a033ae177a17192757fb18d2e81df11 (patch) | |
tree | 96b917f9589f14e7026435d5a854652bd95cf33d /gnss | |
parent | 9391fe52a410e33e51cdd904e9522347d8b9462d (diff) | |
parent | 2dab397e35c074a5ada5feba06ced80e574f8e2c (diff) | |
download | gps-f5634ec21a033ae177a17192757fb18d2e81df11.tar.gz |
Merge "Gnss adapter: retrieve pdop, hdop and vdop from extended struct"
Diffstat (limited to 'gnss')
-rw-r--r-- | gnss/GnssAdapter.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp index de85353..ea757a8 100644 --- a/gnss/GnssAdapter.cpp +++ b/gnss/GnssAdapter.cpp @@ -263,17 +263,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; |