Set SV in use mask based on final fixes
Do not set SV in use mask based on intermediate position update from modem since it might contain stale information Change-Id: I4300854ead3f85758bfb37d4c47ace10f63541a0 CRs-fixed: 2307493
This commit is contained in:
parent
033a0fa1c6
commit
c30e7c5e63
3 changed files with 35 additions and 18 deletions
|
@ -188,6 +188,35 @@ bool LocApiBase::isInSession()
|
||||||
return inSession;
|
return inSession;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool LocApiBase::needReport(const UlpLocation& ulpLocation,
|
||||||
|
enum loc_sess_status status,
|
||||||
|
LocPosTechMask techMask)
|
||||||
|
{
|
||||||
|
bool reported = false;
|
||||||
|
|
||||||
|
if (LOC_SESS_SUCCESS == status) {
|
||||||
|
// this is a final fix
|
||||||
|
LocPosTechMask mask =
|
||||||
|
LOC_POS_TECH_MASK_SATELLITE | LOC_POS_TECH_MASK_SENSORS | LOC_POS_TECH_MASK_HYBRID;
|
||||||
|
// it is a Satellite fix or a sensor fix
|
||||||
|
reported = (mask & techMask);
|
||||||
|
}
|
||||||
|
else if (LOC_SESS_INTERMEDIATE == status &&
|
||||||
|
LOC_SESS_INTERMEDIATE == ContextBase::mGps_conf.INTERMEDIATE_POS) {
|
||||||
|
// this is a intermediate fix and we accept intermediate
|
||||||
|
|
||||||
|
// it is NOT the case that
|
||||||
|
// there is inaccuracy; and
|
||||||
|
// we care about inaccuracy; and
|
||||||
|
// the inaccuracy exceeds our tolerance
|
||||||
|
reported = !((ulpLocation.gpsLocation.flags & LOC_GPS_LOCATION_HAS_ACCURACY) &&
|
||||||
|
(ContextBase::mGps_conf.ACCURACY_THRES != 0) &&
|
||||||
|
(ulpLocation.gpsLocation.accuracy > ContextBase::mGps_conf.ACCURACY_THRES));
|
||||||
|
}
|
||||||
|
|
||||||
|
return reported;
|
||||||
|
}
|
||||||
|
|
||||||
void LocApiBase::addAdapter(LocAdapterBase* adapter)
|
void LocApiBase::addAdapter(LocAdapterBase* adapter)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < MAX_ADAPTERS && mLocAdapters[i] != adapter; i++) {
|
for (int i = 0; i < MAX_ADAPTERS && mLocAdapters[i] != adapter; i++) {
|
||||||
|
|
|
@ -145,6 +145,10 @@ public:
|
||||||
sendMsg(new LocKillMsg(this));
|
sendMsg(new LocKillMsg(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool needReport(const UlpLocation& ulpLocation,
|
||||||
|
enum loc_sess_status status,
|
||||||
|
LocPosTechMask techMask);
|
||||||
|
|
||||||
void addAdapter(LocAdapterBase* adapter);
|
void addAdapter(LocAdapterBase* adapter);
|
||||||
void removeAdapter(LocAdapterBase* adapter);
|
void removeAdapter(LocAdapterBase* adapter);
|
||||||
|
|
||||||
|
|
|
@ -2904,25 +2904,9 @@ GnssAdapter::needReport(const UlpLocation& ulpLocation,
|
||||||
// then always output position reported by engine hub to requesting client
|
// then always output position reported by engine hub to requesting client
|
||||||
if (true == initEngHubProxy()) {
|
if (true == initEngHubProxy()) {
|
||||||
reported = true;
|
reported = true;
|
||||||
} else if (LOC_SESS_SUCCESS == status) {
|
} else {
|
||||||
// this is a final fix
|
reported = LocApiBase::needReport(ulpLocation, status, techMask);
|
||||||
LocPosTechMask mask =
|
|
||||||
LOC_POS_TECH_MASK_SATELLITE | LOC_POS_TECH_MASK_SENSORS | LOC_POS_TECH_MASK_HYBRID;
|
|
||||||
// it is a Satellite fix or a sensor fix
|
|
||||||
reported = (mask & techMask);
|
|
||||||
} else if (LOC_SESS_INTERMEDIATE == status &&
|
|
||||||
LOC_SESS_INTERMEDIATE == ContextBase::mGps_conf.INTERMEDIATE_POS) {
|
|
||||||
// this is a intermediate fix and we accepte intermediate
|
|
||||||
|
|
||||||
// it is NOT the case that
|
|
||||||
// there is inaccuracy; and
|
|
||||||
// we care about inaccuracy; and
|
|
||||||
// the inaccuracy exceeds our tolerance
|
|
||||||
reported = !((ulpLocation.gpsLocation.flags & LOC_GPS_LOCATION_HAS_ACCURACY) &&
|
|
||||||
(ContextBase::mGps_conf.ACCURACY_THRES != 0) &&
|
|
||||||
(ulpLocation.gpsLocation.accuracy > ContextBase::mGps_conf.ACCURACY_THRES));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return reported;
|
return reported;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue