ISSUE-84: The timer behavior in the watchPosition algorithm is incorrectly described.

Watch timer behavior

The timer behavior in the watchPosition algorithm is incorrectly described.

Raised by:
Andrei Popescu
Opened on:
The spec says about the watchPosition (step 5.3) that:

"Else, if the location acquisition operation reports an error before the timeout expires, invoke the errorCallback (if present) with a new PositionError object whose code is set to POSITION_UNAVAILABLE. This step can be subject to callback rate limitation (see below)."

Note that the pending timer is not canceled. This is correct, since a new movement may be detected and a position can still be successfully acquired withing the given timeout period. However, the problem is that, in step 6, the spec says when a new movement is detected, the "acquisition steps" must be rerun from the beginning. But step 1 is:

"Start a timer that will fire after the number of milliseconds denoted by the value of the timeout variable (...)"

So a new timer will be started every time movement is detected, leaving the old timer potentially running (i.e. if the last acquisition operation failed).

The solution is to make it clear in step 1 that a new timer needs to be started only if an existing timer isn't already running.
Related Actions Items:
No related actions
Related emails:
No related emails

Related notes:

Fixed in

Andrei Popescu, 7 Dec 2009, 12:42:53

Display change log ATOM feed

Chair, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <>.
$Id: 84.html,v 1.1 2017/05/30 09:54:32 carine Exp $