#include <LbsPosition.h>
Link against:
lbs.lib
Link against:
lbsselflocate.lib
class TLocality : public TCoordinate;
Description
Adds an error estimate for the horizontal and vertical accuracy of the point to TCoordinate
. Accuracy information is held in a TReal32 and is measure in metres. The class also provides its own methods for determining
the distance and bearing to a target point. These methods also provide an error estimate.
Derivation
TCoordinate
- TCoordinate is used to hold the basic coordinates of a location (latitude, longi...
TLocality
- Adds an error estimate for the horizontal and vertical accuracy of the point to ...
Members
Defined in TLocality
:
BearingTo(const TCoordinate &,TReal32 &)const
This method calculates the bearing from this coordinate to the supplied coordina...
BearingTo(const TLocality &,TReal32 &,TReal32 &)const
This method calculates the bearing from this locality to the supplied locality.
Distance(const TCoordinate &,TReal32 &)const
This method calculates the distance between this coordinate and the supplied coo...
Distance(const TLocality &,TReal32 &,TReal32 &)const
This method calculates the distance between this locality and the supplied local...
HorizontalAccuracy()const
Retrieves the horizontal accuracy of this coordinate.
SetAccuracy(TReal32,TReal32)
Sets both the horizontal and vertical accuracy of this coordinate.
SetHorizontalAccuracy(TReal32)
Sets the horizontal accuracy of this coordinate.
SetVerticalAccuracy(TReal32)
Sets the vertical accuracy of this coordinate.
TLocality()
Default constructor for TLocality. Sets the member data to default values (NaN).
TLocality(const TCoordinate &,TReal32)
Constructor for TLocality. Allows the client to set a coordinate and a 'surface'...
TLocality(const TCoordinate &,TReal32,TReal32)
Constructor for TLocality. Allows the client to set a coordinate and both a hori...
VerticalAccuracy()const
Retrieves the vertical accuracy of this coordinate.
iHorizontalAccuracy
Horizontal (earths-surface) accuracy, in metres.
iVerticalAccuracy
Altitudinal accuracy, in metres.
Inherited from TCoordinate
:
Altitude()const
Accessor for altitude.
Datum()const
Accessor for the datum.
Latitude()const
Accessor for latitude.
Longitude()const
Accessor for longitude.
Move(TReal32,TReal32)
This method moves this coordinate aDistance in the direction specified by aBeari...
SetCoordinate(const TReal64 &,const TReal64 &)
This method assigns a new latitude and longitude to the object. The altitude is ...
SetCoordinate(const TReal64 &,const TReal64 &,TReal32)
This method assigns a new latitude, longitude and altitude to the object.
SetDatum(TPositionDatumId)
This method assigns a new datum to the object.
TCoordinate(const TReal64 &,const TReal64 &)
Constructor for TCoordinate. Allows the client to set just latitude and longitud...
TCoordinate(const TReal64 &,const TReal64 &,TReal32)
Constructor for TCoordinate. Allows the client to set the latitude, longitude an...
iAltitude
Altitude, defaults to WGS-84 format.
iDatum
The ID of the datum the coordinate is in, defaults to WGS-84 format.
iLatitude
Latitude, defaults to WGS-84 format.
iLongitude
Longitude, defaults to WGS-84 format.
iReserved
Unused variable for future expansion.
Construction and destruction
IMPORT_C TLocality();
Description
Default constructor for TLocality. Sets the member data to default values (NaN).
TLocality(const TCoordinate &,TReal32)
IMPORT_C TLocality(const TCoordinate &aCoordinate, TReal32 aHorizontalAccuracy);
Description
Constructor for TLocality. Allows the client to set a coordinate and a 'surface' accuracy.
Parameters
const TCoordinate &aCoordinate |
specifies an initial value for the coordinate.
|
TReal32 aHorizontalAccuracy |
specifies an initial value for the horizontal accuracy.
|
|
Panic codes
aHorizontalAccuracy |
is negative and not set to NaN.
|
|
TLocality(const TCoordinate &,TReal32,TReal32)
IMPORT_C TLocality(const TCoordinate &aCoordinate, TReal32 aHorizontalAccuracy, TReal32 aVerticalAccuracy);
Description
Constructor for TLocality. Allows the client to set a coordinate and both a horizontal and vertical accuracy.
Parameters
const TCoordinate &aCoordinate |
specifies an initial value for the coordinate.
|
TReal32 aHorizontalAccuracy |
specifies an initial value for the horizontal (earth-surface) accuracy.
|
TReal32 aVerticalAccuracy |
specifies an initial value for the vertical (altitudinal) accuracy.
|
|
Panic codes
aHorizontalAccuracy |
or aVerticalAccuracy are negative and not set to NaN.
|
|
SetHorizontalAccuracy(TReal32)
IMPORT_C void SetHorizontalAccuracy(TReal32 aHorizontalAccuracy);
Description
Sets the horizontal accuracy of this coordinate.
Parameters
TReal32 aHorizontalAccuracy |
is the new horizontal accuracy, in metres.
|
|
Panic codes
aHorizontalAccuracy |
is negative and not set to NaN.
|
|
SetVerticalAccuracy(TReal32)
IMPORT_C void SetVerticalAccuracy(TReal32 aVerticalAccuracy);
Description
Sets the vertical accuracy of this coordinate.
Parameters
TReal32 aVerticalAccuracy |
is the new vertical accuracy, in metres.
|
|
Panic codes
aVerticalAccuracy |
is negative and not set to NaN.
|
|
SetAccuracy(TReal32,TReal32)
IMPORT_C void SetAccuracy(TReal32 aHorizontalAccuracy, TReal32 aVerticalAccuracy);
Description
Sets both the horizontal and vertical accuracy of this coordinate.
Parameters
TReal32 aHorizontalAccuracy |
is the new horizontal accuracy, in metres.
|
TReal32 aVerticalAccuracy |
is the new vertical accuracy, in metres.
|
|
Panic codes
aHorizontalAccuracy |
or aVerticalAccuracy are negative and not set to NaN.
|
|
HorizontalAccuracy()const
IMPORT_C TReal32 HorizontalAccuracy() const;
Description
Retrieves the horizontal accuracy of this coordinate.
Return value
TReal32
|
the horizontal accuracy, in metres.
|
|
IMPORT_C TReal32 VerticalAccuracy() const;
Description
Retrieves the vertical accuracy of this coordinate.
Return value
TReal32
|
the vertical accuracy, in metres.
|
|
Distance(const TCoordinate &,TReal32 &)const
IMPORT_C TInt Distance(const TCoordinate &aCoordinate, TReal32 &aDistance) const;
Description
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.
|
|
Return value
TInt
|
a Symbian OS error code. KErrArgument if any of iLatitude, iLongitude, aCoordinate.iLatitude or aCoordinate.iLongitude are
set to NaN.
|
|
Distance(const TLocality &,TReal32 &,TReal32 &)const
IMPORT_C TInt Distance(const TLocality &aLocality, TReal32 &aDistance, TReal32 &aDelta) const;
Description
This method calculates the distance between this locality and the supplied locality. An estimate of the accuracy of the result
is also provided.
Parameters
const TLocality &aLocality |
is another point to use in the calculation.
|
TReal32 &aDistance |
upon successful completion, this is set to the distance between this locality and aLocality, in metres.
|
TReal32 &aDelta |
upon successful completion, this is set to the estimated accuracy of the distance calculation, in metres.
|
|
Return value
TInt
|
a Symbian OS error code. KErrArgument if any of iLatitude, iLongitude, aLocality.iLatitude or aLocality.iLongitude are set
to NaN. KErrArgument if any of iHorizontalAccuracy or aLocality.iHorizontalAccuracy are set to NaN.
|
|
BearingTo(const TCoordinate &,TReal32 &)const
IMPORT_C TInt BearingTo(const TCoordinate &aTargetCoordinate, TReal32 &aBearing) const;
Description
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.
|
|
Return value
TInt
|
a Symbian OS error code. KErrArgument if any of iLatitude, iLongitude, aTargetCoordinate.iLatitude or aTargetCoordinate.iLongitude
are set to NaN. KErrPositionIncalculable if this coordinate is at a pole or if the two coordinates are the same or antipodal.
|
|
BearingTo(const TLocality &,TReal32 &,TReal32 &)const
IMPORT_C TInt BearingTo(const TLocality &aTargetLocality, TReal32 &aBearing, TReal32 &aDelta) const;
Description
This method calculates the bearing from this locality to the supplied locality.
Parameters
const TLocality &aTargetLocality |
is the supplied target locality.
|
TReal32 &aBearing |
upon successful completion, this is set to the bearing from this locality to aTargetLocality, in degrees counting clockwise
relative to true north.
|
TReal32 &aDelta |
upon successful completion, this is set to an estimate of the accuracy of the calculation, in degrees relative to aBearing.
|
|
Return value
TInt
|
a Symbian OS error code. KErrArgument if any of iLatitude, iLongitude, aTargetLocality.iLatitude or aTargetLocality.iLongitude
are set to NaN. KErrArgument if any of iHorizontalAccuracy or aTargetLocality.iHorizontalAccuracy are set to NaN. KErrPositionIncalculable
if the error circle (horizontal accuracy) of this locality includes a pole. KErrPositionIncalculable if the two localities
has overlapping error circles. KErrPositionIncalculable if the error circle of this locality overlaps with the error circle
of aTargetLocality when projected antipodal.
|
|
protected: TReal32 iHorizontalAccuracy;
Description
Horizontal (earths-surface) accuracy, in metres.
protected: TReal32 iVerticalAccuracy;
Description
Altitudinal accuracy, in metres.