TCoordinate Class Reference
TCoordinate is used to hold the basic coordinates of a location (latitude, longitude and altitude).
Constructor & Destructor Documentation
TCoordinate()
Default constructor for TCoordinate. Sets the member data to default values (NaN).
TCoordinate(const TReal64 &, const TReal64 &)
IMPORT_C | TCoordinate | ( | const TReal64 & | aLatitude, |
| const TReal64 & | aLongitude |
| ) | |
Constructor for TCoordinate. Allows the client to set just latitude and longitude, and sets the altitude to its default value (NaN).
Parameters
const TReal64 & aLatitude | specifies an initial value for latitude. |
const TReal64 & aLongitude | specifies an initial value for longitude. |
TCoordinate(const TReal64 &, const TReal64 &, TReal32)
Constructor for TCoordinate. Allows the client to set the latitude, longitude and altitude.
Parameters
const TReal64 & aLatitude | specifies an initial value for latitude. |
const TReal64 & aLongitude | specifies an initial value for longitude. |
TReal32 aAltitude | specifies an initial value for altitude. |
Member Functions Documentation
Altitude()
Accessor for altitude. The altitude is represented in meters.
BearingTo(const TCoordinate &, TReal32 &)
This method calculates the bearing from this coordinate to the supplied coordinate.
Parameters
const TCoordinate & aTargetCoordinate | is the supplied target coordinate. |
TReal32 & aBearing | upon successful completion, this is set to the bearing from this coordinate to aTargetCoordinate, in degrees counting clockwise relative to true north. |
Distance(const TCoordinate &, TReal32 &)
This method calculates the distance between this coordinate and the supplied coordinate.
Parameters
const TCoordinate & aCoordinate | is another point to use in the calculation. |
TReal32 & aDistance | upon successful completion, this is set to the distance between this coordinate and aCoordinate, in metres. |
Latitude()
Accessor for latitude. The latitude is represented in degrees.
Longitude()
Accessor for longitude. The longitude is represented in degrees.
Move(TReal32, TReal32)
This method moves this coordinate aDistance in the direction specified by aBearing
Parameters
TReal32 aBearing | is the direction to move this coordinate, in degrees counting clockwise relative to true north. |
TReal32 aDistance | is the distance to move this coordinate, in metres. |
NormalizeCoordinate()
void | NormalizeCoordinate | ( | ) | [private] |
This method ensures the coordinates are within coordinate boundaries. It will ensure latitude is between -90 and 90 degrees, and longitude is between -180 (not inclusive) and 180 degrees.
If latitude wraps around to the other side of the globe, longitude is shifted by 180 degrees.
SetCoordinate(const TReal64 &, const TReal64 &)
IMPORT_C void | SetCoordinate | ( | const TReal64 & | aLatitude, |
| const TReal64 & | aLongitude |
| ) | |
This method assigns a new latitude and longitude to the object. The altitude is set to its default value.
Parameters
const TReal64 & aLatitude | specifies a new latitude. The latitude is represented in degrees. |
const TReal64 & aLongitude | specifies a new longitude. The longitude is represented in degrees. |
SetCoordinate(const TReal64 &, const TReal64 &, TReal32)
This method assigns a new latitude, longitude and altitude to the object.
Parameters
const TReal64 & aLatitude | specifies a new latitude. The latitude is represented in degrees. |
const TReal64 & aLongitude | specifies a new longitude. The longitude is represented in degrees. |
TReal32 aAltitude | specifies a new altitude. The altitude is represented in meters. |
SetDatum(TPositionDatumId)
This method assigns a new datum to the object.
Member Data Documentation
TReal32
iAltitude
Altitude, defaults to WGS-84 format. Represented in meters.
TPositionDatumId
iDatum
The ID of the datum the coordinate is in, defaults to WGS-84 format.
TReal64
iLatitude
Latitude, defaults to WGS-84 format. Represented in degree.
TReal64
iLongitude
Longitude, defaults to WGS-84 format. Represented in degree.
TUint8
iReserved
Unused variable for future expansion.
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.