Updating the GPS/A-GPS Central Repository Initialisation File

This shows how to modify the settings of the GPS/A-GPS PSY and the A-GPS Integration Module so that they do not conflict with each other.

As described in GPS/A-GPS PSY Overview, the GPS/A-GPS PSY does not integrate directly with positioning hardware. It uses the A-GPS Location Manager with an A-GPS Integration Module to connect the Location Server (eposserver.exe) to positioning hardware.

The same A-GPS Integration Module can be used by both the GPS PSY and the A-GPS PSY, potentially at the same time. There are two places that information about the properties of the GPS/A-GPS PSY and A-GPS Integration Module are stored:

  • The GPS/A-GPS PSY registers itself as a PSY with the LBS subsystem using a Central Repository initialisation file with keys defined by the Positioning Plug-in Information API. The GPS PSY and the A-GPS PSY have separate initialisation files.

  • The A-GPS Location Manager uses a .ini file that specifies the properties of the A-GPS Integration Module.

The description of the properties of the PSY and the Integration Module must be the same in both files.

The following procedure assumes you have created an A-GPS Integration Module for your device's positioning hardware and have created a module .ini file that correctly describes the properties of the positioning hardware. The format of the .ini file is described in A-GPS Location Data Source API. An example file containing some typical values is shown below. Your A-GPS Integration Module may have different parameters:

# example_datasource.ini
[1]
Version= 0.2.1		#
ModuleId= 271064388	# dec
ModuleName= "Example_AGPS_Moduleā€
TechnologyType= 0101	# binary
DeviceLocation= 1	# binary
Capabilities= 11111	# binary
ClassesSupported= 111111	# binary
TimeToFirstFix= 90000	# ms
TimeToNextFix= 1000	# ms
HorizontalAccuracy= 5.4 # real
VerticalAccuracy= 5.4 # real
CostIndicator= 2	# dec
PowerConsumption= 2	# dec
DataSourceId= 271065673	# dec
ExecutableName= "lbsgpslocmanager.exe"
DeviceGpsModeCaps=1011	# binary - Exclusive TA OR TB (+ Autonomous)
  1. If you want to use the A-GPS PSY with your Integration Module, modify the Central Repository initialisation file(s) for the PSY so that the values are the same as those in your Integration Module .ini file. The Central Repository initialisation file for the A-GPS PSY implementation supplied with the Symbian platform is in datasourcemodules\lbsposfwadaptation\lbsgpsagpspsy\lbsagpspsy\cenrep\10285abc.txt. The version supplied with the Symbian platform contains the following:
    
    cenrep
    version 1
    [owner]
    0x101f97b2
    [defaultmeta]
     0
    [platsec]
     cap_rd=ReadDeviceData cap_wr=WriteDeviceData
    [Main]
    0x1 int 1 0 cap_rd=alwayspass cap_wr=alwaysfail
    0x2 int 0 0 cap_rd=alwayspass cap_wr=alwaysfail
    0x3 int 1 0 cap_rd=alwayspass cap_wr=alwaysfail
    0x4 int 90000000 0 cap_rd=alwayspass cap_wr=alwaysfail
    0x5 int 1000000 0 cap_rd=alwayspass cap_wr=alwaysfail
    0x6 real 5.4 0 cap_rd=alwayspass cap_wr=alwaysfail
    0x7 real 5.4 0 cap_rd=alwayspass cap_wr=alwaysfail
    0x8 int 2 0 cap_rd=alwayspass cap_wr=alwaysfail
    0x9 int 2 0 cap_rd=alwayspass cap_wr=alwaysfail
    0xa int 5 0 cap_rd=alwayspass cap_wr=alwaysfail
    0xb int 1 0 cap_rd=alwayspass cap_wr=alwaysfail
    0xc int 31 0 cap_rd=alwayspass cap_wr=alwaysfail
    0xd int 31 0 cap_rd=alwayspass cap_wr=alwaysfail
    0xe int 1 0 cap_rd=alwayspass cap_wr=alwaysfail
    0xf string "\\resource\\lbsagpspsy_name.rsc" 0 cap_rd=alwayspass cap_wr=alwaysfail
    0x10000000 int 2000000 0 cap_rd=alwayspass cap_wr=alwaysfail
    
    For a full description of the meanings of these keys, see Positioning Plug-in Information API. The important keys for this task are as shown in the following table:
    Key name Key value Meaning Description

    KPSYTimeToFirstFix

    0x4

    Time to First Fix

    This must be the same time as the TimeToFirstFix value in your Integration Module .ini file.

    Important note: In the PSY file the time is specified in microseconds. In the Integration Module .ini file the time is specified in milliseconds.

    KPSYTimeToNextFix

    0x5

    Time to Next Fix

    This must be the same time as the TimeToNextFix value in your Integration Module .ini file.

    Important note: In the PSY file the time is specified in microseconds. In the Integration Module .ini file the time is specified in milliseconds.

    KPSYHorizontalAccuracy

    0x6

    Horizontal Accuracy

    This must be the same as the HorizontalAccuracy value in your Integration Module .ini file. The value is specified in metres.

    KPSYVerticalAccuracy

    0x7

    Vertical Accuracy

    This must be the same as the VerticalAccuracy value in your Integration Module .ini file. The value is specified in metres.

    KPSYCostIndicator

    0x8

    Cost Indicator

    This must be the same as the CostIndicator value in your Integration Module .ini file. The value is an integer taken from the TPositionQuality::TCostIndicator enum.

    KPSYPowerConsumption

    0x9

    Power Consumption

    This must be the same as the PowerConsumption value in your Integration Module .ini file. The value is an integer taken from the TPositionQuality::TPowerConsumption enum.

    KPSYTechnologyType

    0xa

    Technology Type

    This must be the same as the TechnologyType value in your Integration Module .ini file. The value is taken from the TPositionModuleInfo::_TTechnologyType enum.

    Important note: In the PSY file the value is specified as decimal integer. In the Integration Module .ini file the value is specified in binary.

    In the files shown above, the value of 5 for this key specifies that the PSY/Integration Module supports a technology type of ETechnologyTerminal + ETechnologyAssisted = 1 + 4 = 0101 in binary.

    KPSYCapabilities

    0xc

    Device Capabilities

    This must be the same as the Capabilities value in your Integration Module .ini file. The value is taken from the TPositionModuleInfo::_Capabilities enum.

    Important note: In the PSY file the value is specified as a decimal integer. In the Integration Module .ini file the value is specified in binary.

    In the files shown above the value of 31 for this key specifies that the PSY/Integration Module supports the capabilities: ECapabilityHorizontal + ECapabilityVertical + ECapabilitySpeed + ECapabilityDirection + ECapabilitySatellite = 31 decimal or 11111 in binary.

    KPSYClassesSupported

    0xd

    Supported Positioning classes

    This must be the same as the ClassesSupported value in your Integration Module .ini file. The value is taken from the _TPositionInfoClassType enum.

    Important note: In the PSY file the value is specified as decimal integer. In the Integration Module .ini file the value is specified in binary.

    In the files shown above the value of 31 for this key specifies that the PSY/Integration Module supports the positioning classes: EPositionGpsMeasurementInfoClass + EPositionCourseInfoClass + EPositionGenericInfoClass + EPositionInfoClass = 31 decimal or 11111 in binary.

  2. If you want to use the GPS PSY with your Integration Module, modify the Central Repository initialisation file(s) for the PSY so that the values are the same as those in your Integration Module .ini file. The Central Repository initialisation file for the GPS PSY implementation with the Symbian platform is datasourcemodules\lbsposfwadaptation\lbsgpsagpspsy\lbsagpspsy\cenrep\102869C7.txt. It contains the following:
    
    cenrep
    version 1
    [owner]
    0x101f97b2
    [defaultmeta]
     0
    [platsec]
     cap_rd=ReadDeviceData cap_wr=WriteDeviceData
    [Main]
    0x1 int 1 0 cap_rd=alwayspass cap_wr=alwaysfail
    0x2 int 0 0 cap_rd=alwayspass cap_wr=alwaysfail
    0x3 int 1 0 cap_rd=alwayspass cap_wr=alwaysfail
    0x4 int 90000000 0 cap_rd=alwayspass cap_wr=alwaysfail
    0x5 int 1000000 0 cap_rd=alwayspass cap_wr=alwaysfail
    0x6 real 5.4 0 cap_rd=alwayspass cap_wr=alwaysfail
    0x7 real 5.4 0 cap_rd=alwayspass cap_wr=alwaysfail
    0x8 int 2 0 cap_rd=alwayspass cap_wr=alwaysfail
    0x9 int 2 0 cap_rd=alwayspass cap_wr=alwaysfail
    0xa int 1 0 cap_rd=alwayspass cap_wr=alwaysfail
    0xb int 1 0 cap_rd=alwayspass cap_wr=alwaysfail
    0xc int 31 0 cap_rd=alwayspass cap_wr=alwaysfail
    0xd int 31 0 cap_rd=alwayspass cap_wr=alwaysfail
    0xe int 1 0 cap_rd=alwayspass cap_wr=alwaysfail
    0xf string "\\resource\\lbsgpspsy_name.rsc" 0 cap_rd=alwayspass cap_wr=alwaysfail
    0x10000000 int 2000000 0 cap_rd=alwayspass cap_wr=alwaysfail
    
    This is the same as the repository file for the A-GPS implementation [1], except the value for key 0xa (Technology Type) is ETechnologyTerminal = 1, to indicate that the PSY uses autonomous GPS. See step 1 above for details about which values you may need to change so that this file accurately describes the properties of your A-GPS Integration Module.
  3. Make a binary version of the Central Repository initialisation file(s) and install them on the device. The LBS build process makes a binary version of the PSY Central Repository initialisation files and copies them to epoc32\winscw\c\private\10202BE9. To rebuild the A-GPS PSY Central Repository initialisation file you can use the makefile createlbsagpspsyrep.mk in datasourcemodules\lbsposfwadaptation\lbsgpsagpspsy\lbsagpspsy\group. To rebuild the GPS PSY Central Repository initialisation file you can use the makefile createlbsgpspsyrep.mk in datasourcemodules\lbsposfwadaptation\lbsgpsagpspsy\lbsgpspsy\group. Use the ROM macros to copy the GPS/A-GPS PSY DLL and the repository files into a device ROM.