From 5969d0b2da4d0168286c359ac6a8a6b4c6495333 Mon Sep 17 00:00:00 2001 From: Harikrishnan Hariharan Date: Fri, 5 May 2017 17:29:09 +0530 Subject: [PATCH] Provide correct SV used_in_fix flag for QZSS Mark QZSS SV used_in_fix based on the most recent position report Change-Id: I166087fb62de45e1013ab29c01df3abfba7af12b CRs-Fixed: 2043300 --- core/LocApiBase.cpp | 5 +++-- gnss/GnssAdapter.cpp | 3 +++ utils/gps_extended_c.h | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/core/LocApiBase.cpp b/core/LocApiBase.cpp index 0036d887..2dcd4cd1 100644 --- a/core/LocApiBase.cpp +++ b/core/LocApiBase.cpp @@ -237,7 +237,7 @@ void LocApiBase::reportPosition(UlpLocation& location, "altitude: %f\n speed: %f\n bearing: %f\n accuracy: %f\n " "timestamp: %lld\n rawDataSize: %d\n rawData: %p\n " "Session status: %d\n Technology mask: %u\n " - "SV used in fix (gps/glo/bds/gal) : (%x/%x/%x/%x)", + "SV used in fix (gps/glo/bds/gal/qzss) : (%x/%x/%x/%x/%x)", location.gpsLocation.flags, location.position_source, location.gpsLocation.latitude, location.gpsLocation.longitude, location.gpsLocation.altitude, location.gpsLocation.speed, @@ -247,7 +247,8 @@ void LocApiBase::reportPosition(UlpLocation& location, locationExtended.gnss_sv_used_ids.gps_sv_used_ids_mask, locationExtended.gnss_sv_used_ids.glo_sv_used_ids_mask, locationExtended.gnss_sv_used_ids.bds_sv_used_ids_mask, - locationExtended.gnss_sv_used_ids.gal_sv_used_ids_mask); + locationExtended.gnss_sv_used_ids.gal_sv_used_ids_mask, + locationExtended.gnss_sv_used_ids.qzss_sv_used_ids_mask); // loop through adapters, and deliver to all adapters. TO_ALL_LOCADAPTERS( mLocAdapters[i]->reportPositionEvent(location, locationExtended, diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp index 00b56b9d..2117c733 100644 --- a/gnss/GnssAdapter.cpp +++ b/gnss/GnssAdapter.cpp @@ -1951,6 +1951,9 @@ GnssAdapter::reportSv(GnssSvNotification& svNotify) case GNSS_SV_TYPE_GALILEO: svUsedIdMask = mGnssSvIdUsedInPosition.gal_sv_used_ids_mask; break; + case GNSS_SV_TYPE_QZSS: + svUsedIdMask = mGnssSvIdUsedInPosition.qzss_sv_used_ids_mask; + break; default: svUsedIdMask = 0; break; diff --git a/utils/gps_extended_c.h b/utils/gps_extended_c.h index b4d14b88..97292e40 100644 --- a/utils/gps_extended_c.h +++ b/utils/gps_extended_c.h @@ -306,6 +306,8 @@ typedef uint32_t LocNavSolutionMask; #define GPS_SV_PRN_MAX 32 #define GLO_SV_PRN_MIN 65 #define GLO_SV_PRN_MAX 96 +#define QZSS_SV_PRN_MIN 193 +#define QZSS_SV_PRN_MAX 197 #define BDS_SV_PRN_MIN 201 #define BDS_SV_PRN_MAX 235 #define GAL_SV_PRN_MIN 301 @@ -342,6 +344,7 @@ typedef struct { uint64_t glo_sv_used_ids_mask; uint64_t gal_sv_used_ids_mask; uint64_t bds_sv_used_ids_mask; + uint64_t qzss_sv_used_ids_mask; } GnssSvUsedInPosition; /** Represents gps location extended. */