This shows how to include the GPS/A-GPS PSY in a device ROM.
To use the GPS/A-GPS PSY in a device it must be installed in the device ROM. This document explains how to include the PSY in ROM using buildrom macros.
The GPS/A-GPS PSY can be used to obtain position fixes using either autonomous GPS or assisted GPS (A-GPS). The GPS/A-GPS PSY ECom plug-in contains two PSY implementations: one that supports only autonomous GPS and one that supports assisted GPS.
The PSY is packaged in a single library lbsgpsagpspsy.dll that includes the PSY as a single ECom plug-in that contains two implementations of the PSY interface.
The ROM build macros described in this document control which versions of the GPS/A-GPS ECom resource .rsc files are copied to the ECom repository and which Central Repository .cre initialisation files that define the PSY properties (as specified by the Positioning Plug-in Information API) are included.
To install and configure the GPS/A-GPS PSY to support both autonomous GPS and assisted GPS
Use both macros SYMBIAN_INCLUDE_LOCATION_GPS_PM and SYMBIAN_INCLUDE_LOCATION_AGPS_PM when you build the LBS ROM.
The example below shows how to configure the GPS/A-GPS PSY for autonomous and assisted GPS. You may need to specify additional macros depending on which other optional LBS components you also want to install.
buildrom lbs.oby -DSYMBIAN_INCLUDE_LOCATION_API_VARIANT2 -DSYMBIAN_INCLUDE_LOCATION_AGPS_PM -DSYMBIAN_INCLUDE_LOCATION_GPS_PM
The file lbs.oby includes the .iby files necessary to build the LBS ROM (see LBS ROM macros for more information about the LBS .iby files). The LBS .iby file lbsgpsagpspsy.iby contains the commands to copy the GPS/A-GPS PSY DLL and all supporting files to the target build location:
#ifndef __LBS_GPS_AGPS_ADAPTATION_PSY_IBY__ #define __LBS_GPS_AGPS_ADAPTATION_PSY_IBY__ #if !defined(SYMBIAN_EXCLUDE_LOCATION) #if defined(SYMBIAN_INCLUDE_LOCATION_API_VARIANT2) #if defined (SYMBIAN_INCLUDE_LOCATION_GPS_PM) && defined(SYMBIAN_INCLUDE_LOCATION_AGPS_PM) ECOM_PLUGIN(lbsgpsagpspsy.dll,lbsgpsagpspsy.rsc) //__ECOM_PLUGIN(ABI_DIR\BUILD_DIR,ECOM_BIN_DIR,DATAZ_,ECOM_RSC_DIR,lbsgpsagpspsy.dll,lbsgpsagpspsy.dll) #endif #if defined(SYMBIAN_INCLUDE_LOCATION_GPS_PM) && !defined(SYMBIAN_INCLUDE_LOCATION_AGPS_PM) __ECOM_PLUGIN(ABI_DIR\BUILD_DIR, ECOM_BIN_DIR, DATAZ_\resource\gps, ECOM_RSC_DIR, lbsgpsagpspsy.dll, lbsgpsagpspsy.dll) #endif #if !defined(SYMBIAN_INCLUDE_LOCATION_GPS_PM) && defined(SYMBIAN_INCLUDE_LOCATION_AGPS_PM) __ECOM_PLUGIN(ABI_DIR\BUILD_DIR, ECOM_BIN_DIR, DATAZ_\resource\agps, ECOM_RSC_DIR, lbsgpsagpspsy.dll, lbsgpsagpspsy.dll) #endif // GPS PSY resource and centrep #if defined(SYMBIAN_INCLUDE_LOCATION_GPS_PM) data=ZRESOURCE\lbsgpspsy_name.rsc resource\lbsgpspsy_name.rsc data=EPOCROOT##epoc32\data\z\private\10202BE9\102869C7.cre private\10202be9\102869C7.cre #endif // SYMBIAN_INCLUDE_LOCATION_GPS_PM // AGPS PSY resource and centrep #if defined(SYMBIAN_INCLUDE_LOCATION_AGPS_PM) data=ZRESOURCE\lbsagpspsy_name.rsc resource\lbsagpspsy_name.rsc data=EPOCROOT##epoc32\data\z\private\10202BE9\10285abc.cre private\10202be9\10285abc.cre #endif // SYMBIAN_INCLUDE_LOCATION_AGPS_PM #endif // SYMBIAN_INCLUDE_LOCATION_API_VARIANT2 #endif // SYMBIAN_EXCLUDE_LOCATION #endif // __LBS_GPS_AGPS_ADAPTATION_PSY_IBY__
The macros are used to copy one of three different ECom resource file to the ECom registry. The file that is copied can specify that the DLL contains two PSY implementations for A-GPS and autonomous GPS, or only one implementation for either A-GPS or autonomous GPS.
The files 102869C7.cre and 10285abc.cre are Central Repository initialisation files that define the values specified by the Positioning Plug-in Information API to register the PSY implementations with the LBS subsystem. File 102869C7.cre contains values for the GPS PSY implementation. File 10285abc.cre contains values for the A-GPS PSY implementation. See Updating the GPS/A-GPS Central Repository Initialisation File for an explanation of values you may have to change in these files.
To install and configure the GPS/A-GPS PSY to support assisted GPS
Use the macro SYMBIAN_INCLUDE_LOCATION_AGPS_PM when you build the ROM.
The example below shows how to configure the GPS/A-GPS PSY for assisted GPS. Note that you may need to specify additional macros depending on which other optional LBS components you also want to install.
To install and configure the GPS/A-GPS PSY to support only autonomous GPS
Use the macro SYMBIAN_INCLUDE_LOCATION_GPS_PM when you build the ROM.
The example below shows how to configure the GPS/A-GPS PSY for autonomous GPS only. Note that you may need to specify additional macros depending on which other optional LBS components you also want to install.
The LBS code build process uses the project file lbsgpsagpspsy.mmp to build the GPS/A-GPS code. This MMP file contains the following commands to copy ECom registration information to the winscw directory:
START RESOURCE ../data/10285abb.rss TARGETPATH /resource/plugins TARGET lbsgpsagpspsy.rsc
These commands compile and copy the ECom registration information from the resource source file 10285abb.rss, which specifies both the A-GPS and GPS implementations in the library. Therefore on an emulator, the GPS/A-GPS PSY can be used for both A-GPS and autonomous GPS position fixes.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.