4.6 positioning -- Simplified interface to the position information

Availability: S60.

The positioning module provides basic access to the S60 position information 4.8. The module can be e.g. used to access position information provided by external Bluetooth GPS-devices and by built-in GPS-receivers4.9 from S60 devices.

The module offers a large amount of information (cost of service, device power consumption etc.) about accessible positioning devices (like GPS-modules), position, course, accuracy and satellite information (depending on the position device used) and much more. This module can also be used to obtain device/vendor specific extended information.

Note: The module position requires Location capability.

The following data items are available in positioning:

POSITION_INTERVAL
The time interval (in microseconds) between the position function callback invocation. The default value set is 1000000 microseconds (= 1 second)

The positioning module has the following functions (for examples of the values returned, see Section 4.6.1):

modules( )
Get information about available positioning modules.

default_module( )
Get default module id.

module_info( module_id)
Get detailed information about the specified module.

select_module( module_id)
Select a module.

set_requestors( requestors)
Set the requestors of the service (at least one must be set).

position( course=0,satellites=0,callback=None, interval=positioning.POSITION_INTERVAL, partial=0)

By default, returns the position information in a dictionary. With course and/or satellites set to 1, information about course and satellites is also returned (if available).

With no callback provided, this call blocks until the position information is available.

The call returns immediately if a valid callback function is given. This callback function is then invoked with the specified time interval (in microseconds) in between the invocations. The callback function is called with the the current position information as parameter.

If partial update is set to 1, the function might return e.g. information about satellites before the final location fix has been calculated.

For an example of the dictionary returned and the detailed keys, see Section 4.6.1.

stop_position( )
Stops an ongoing position request.

last_position( )
Get last position information. This method returns the cached position information if it is available.



Footnotes

... information4.8
For details, please see the Location Acquisition API in the S60 API documentation. The Location Acquisition API gathers different positioning technologies together to be used through a consistent interface.
... GPS-receivers4.9
For more information on GPS, please see http://en.wikipedia.org/wiki/Global_Positioning_System.



Subsections
See About this document... for information on suggesting changes.