--- /dev/null
+version: 1.2.2.1
+Author: Nandan S R (nandan.sr@samsung.com)
+Change: 1) In region Monitoring, use the core accuracy value, instead of LocationAccuracy enum. 2) During WPS positioning, when accuracy is not met by WPS and GPS is not available, the timer value changed to 10 sec if the requested accuracy is FINEST or TEN_METERS.
if (__locMgrStatus.locMgrSubState != LM_SS_WPS_ONLY_SENSING)
{
SysLog(NID_LOC, "The number of GPS failures is (%d)", __locMgrStatus.gpsFailCount);
- double timerVal = Math::Pow(2, (__locMgrStatus.gpsFailCount - 1)) * 10;
- if (timerVal > MAX_TIMER_VALUE_DURING_WPS_POSITIONING)
+ const int SUB_STATE_TIMER_VALUE = 10;
+ double timerVal = SUB_STATE_TIMER_VALUE;
+ if (__minRequestedAccuracy > LOC_ACCURACY_TEN_METERS)
{
- timerVal = MAX_TIMER_VALUE_DURING_WPS_POSITIONING;
+ timerVal = Math::Pow(2, (__locMgrStatus.gpsFailCount - 1)) * 10;
+ if (timerVal > MAX_TIMER_VALUE_DURING_WPS_POSITIONING)
+ {
+ timerVal = MAX_TIMER_VALUE_DURING_WPS_POSITIONING;
+ }
}
- const int SUB_STATE_TIMER_VALUE = (int) timerVal;
- result r = RestartSubStateTimer(SUB_STATE_TIMER_VALUE);
+ result r = RestartSubStateTimer((int)timerVal);
if (!IsFailed(r))
{
- SysLog(NID_LOC, "Started the sub state timer for (%d) seconds in LOC_MGR_STATE_WPS_ONLY mode when last GPS session has failed.");
+ SysLog(NID_LOC, "Started the sub state timer for (%d) seconds in LOC_MGR_STATE_WPS_ONLY mode when last GPS session has failed.", timerVal);
__locMgrStatus.locMgrSubState = LM_SS_WPS_ONLY_SENSING;
}
}
bool isNew = false;
bool isPrivilegeDenied = false;
LocationAccuracy currentAccuracy = LOC_ACCURACY_INVALID;
- LocationAccuracy lastLocAccuracy = __lastLocationAccuracy;
long long lastLocationTime = 0;
Location* pLocation = &location;
__regionMonitor.speed = location.GetSpeed() * 0.2777778;
- if (currentAccuracy <= lastLocAccuracy || timeDifference > DEFAULT_THRESHOLD_LOC_VALIDITY_TIME_OUT) // Copy the location only if it is new and accuracy is better than before.
+ double currentHorAcc = pLocation->GetHorizontalAccuracy();
+ double previousHorAcc = __regionMonitor.pLocation->GetHorizontalAccuracy();
+
+
+ if (Double::IsNaN(previousHorAcc) || (!Double::IsNaN(currentHorAcc) && currentHorAcc <= previousHorAcc) || timeDifference > DEFAULT_THRESHOLD_LOC_VALIDITY_TIME_OUT) // Copy the location only if it is new and accuracy is better than before.
{
*__regionMonitor.pLocation = location;
}