From a0075bdb8ecdc860ba55f69d226273234570aabe Mon Sep 17 00:00:00 2001 From: Harikrishnan Hariharan Date: Thu, 15 Jun 2017 19:43:52 +0530 Subject: [PATCH] Remove fix made to set session status as failure in LocApi. Instead of sending session status as failure in LocApiV02 in case of both latitude/longitude 0 and horizontal reliability not set, for sending Blank NMEA sentences, the condition check for the same is done in before requesting to send nmea sentence. Change-Id: I359d136a8da9d9fe233e599eb2cba71e4509b270 CRs-Fixed: 2058269 --- gnss/GnssAdapter.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp index 5ddbda93..75584e4a 100644 --- a/gnss/GnssAdapter.cpp +++ b/gnss/GnssAdapter.cpp @@ -1922,7 +1922,12 @@ GnssAdapter::reportPosition(const UlpLocation& ulpLocation, } if (NMEA_PROVIDER_AP == ContextBase::mGps_conf.NMEA_PROVIDER && !mTrackingSessions.empty()) { - uint8_t generate_nmea = (reported && status != LOC_SESS_FAILURE); + /*Only BlankNMEA sentence needs to be processed and sent, if both lat, long is 0 & + horReliability is not set. */ + bool blank_fix = ((0 == ulpLocation.gpsLocation.latitude) && + (0 == ulpLocation.gpsLocation.longitude) && + (LOC_RELIABILITY_NOT_SET == locationExtended.horizontal_reliability)); + uint8_t generate_nmea = (reported && status != LOC_SESS_FAILURE && !blank_fix); std::vector nmeaArraystr; loc_nmea_generate_pos(ulpLocation, locationExtended, generate_nmea, nmeaArraystr); for (auto sentence : nmeaArraystr) {