|
||
The Location Acquisition API defines a set of position data classes. Some of these classes store the co-ordinates of a location fix and others store information about course and positioning satellites. The API also defines position info classes that wrap the position data classes. These classes are used to pass data across the Location Acquisition API. Figure 1 illustrates the position data and position info classes with some of the most important methods.
TCoordinate
is the base class for all the
position data classes. It holds latitude, longitude and altitude data. All
positioning modules must provide latitude and longitude information, but not
all modules are guaranteed to provide altitude information.
TLocality
adds accuracy information to
co-ordinates.
TPosition
adds the time at which the location
fix was obtained and also allows the average speed between two positions to be
calculated.
There are two additional position data classes that are not part of this position data class inheritance hierarchy.
TCourse
holds bearing and current speed data.
TSatelliteData
holds information on one of the
satellites used to obtain the location fix.
Note that it is a position info object and not a position data object that is passed across the Location Acquisition API. Client applications extract the position data object from the wrapper position info object.
See Position data for a description of how the location data is represented inside the position data classes.
Client applications use three position info classes that wrap the position data classes:
TPositionInfo
wraps a
TPosition
class.
TPositionCourseInfo
wraps a
TCourse
class
TPositionSatelliteInfo
wraps a
TSatelliteData
class
To get location information, a reference to an object of a class
derived from TPositionInfoBase
is passed in a call to
RPositioner::NotifyPositionUpdate()
or
RPositioner::GetLastKnownPosition()
. The position info
class hierarchy allows simple location information
(TPositionInfo
), course information (TCourse
Info) or
satellite information (TSatelliteInfo
) to be obtained via the same
calls to the Location Acquisition API.
Location Acquisition API client applications on the S60 platform can
use an extended heap position info class called
HPositionGenericInfo
that allows extended position data to
be passed between a client and the Location Server.
It is important to note that this class is only supported on systems
where lbs.dll
is present (LBS systems configured for S60).
Applications cannot use this class if they are using the Location Acquisition
API on other platforms (that is, they are linked with
lbsselflocate.lib
).