Location:
LbsPosition.h
Link against: lbsselflocate.lib
class TPosition : public TLocality;
This class is the standard data structure for retrieving location information. It adds a time dimension to the inherited TLocality
information. This enables the speed to be calculated from two TPosition instances.
The time reflects the system time (that is, the mobile terminal) of when the location fix was obtained. It does not indicate the time as obtained from the position technology (for example network or satellite time).
The time is contained in a TTime
data structure that provides microsecond resolution. However, it should be noted that system clocks only provide a resolution
of milliseconds or indeed hundredths of a second.
TCoordinate
- TCoordinate is used to hold the basic coordinates of a location (latitude, longitude and altitude)
TLocality
- Adds an error estimate for the horizontal and vertical accuracy of the point to
TPosition
- This class is the standard data structure for retrieving location information
Defined in TPosition
:
SetCurrentTime()
, SetTime()
, Speed()
, Speed()
, TPosition()
, TPosition()
, Time()
, iTime
Inherited from TCoordinate
:
Altitude()
,
Datum()
,
Latitude()
,
Longitude()
,
Move()
,
SetCoordinate()
,
SetDatum()
,
iAltitude
,
iDatum
,
iLatitude
,
iLongitude
,
iReserved
Inherited from TLocality
:
BearingTo()
,
Distance()
,
HorizontalAccuracy()
,
SetAccuracy()
,
SetHorizontalAccuracy()
,
SetVerticalAccuracy()
,
VerticalAccuracy()
,
iHorizontalAccuracy
,
iVerticalAccuracy
IMPORT_C TPosition();
Default constructor for TCoordinate
. Sets the member data to default values (NaN for coordinates, 0 for time).
IMPORT_C TPosition(const TLocality &aLocality, TTime aTime);
Constructor for TPosition. Allows the client to set a locality and an associated time.
|
IMPORT_C void SetTime(TTime aTime);
Sets the time of this position data.
|
IMPORT_C void SetCurrentTime();
Sets the time of this position data to the current universal time as indicated by the systems clock.
IMPORT_C TTime Time() const;
Retrieves the time of this position data.
|
IMPORT_C TInt Speed(const TPosition &aPosition, TReal32 &aSpeed) const;
This method calculates the horizontal speed between the current position and the supplied instance aPosition. The speed is calculated based on the coordinates and time associated with each instance.
|
|
IMPORT_C TInt Speed(const TPosition &aPosition, TReal32 &aSpeed, TReal32 &aDelta) const;
This method calculates the horizontal speed between the current position and the supplied instance aPosition. The speed is calculated based on the coordinates and time associated with each instance. An estimate of the accuracy of the result is also provided.
|
|
protected: TTime iTime;
This is the system time when the position related member data was obtained.