TLocality Class Reference
class TLocality : public TCoordinate
|
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.
Public Member Functions
|
|
TLocality
()
|
|
TLocality
(const
TCoordinate
&,
TReal32
)
|
|
TLocality
(const
TCoordinate
&,
TReal32
,
TReal32
)
|
IMPORT_C
TInt
|
BearingTo
(const
TCoordinate
&,
TReal32
&)
|
IMPORT_C
TInt
|
BearingTo
(const
TLocality
&,
TReal32
&,
TReal32
&)
|
IMPORT_C
TInt
|
Distance
(const
TCoordinate
&,
TReal32
&)
|
IMPORT_C
TInt
|
Distance
(const
TLocality
&,
TReal32
&,
TReal32
&)
|
IMPORT_C
TReal32
|
HorizontalAccuracy
()
|
IMPORT_C void
|
SetAccuracy
(
TReal32
,
TReal32
)
|
IMPORT_C void
|
SetHorizontalAccuracy
(
TReal32
)
|
IMPORT_C void
|
SetVerticalAccuracy
(
TReal32
)
|
IMPORT_C
TReal32
|
VerticalAccuracy
()
|
Constructor & Destructor Documentation
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' accuracy.
-
panic
-
aHorizontalAccuracy is negative and not set to NaN.
Parameters
const
TCoordinate
& aCoordinate
|
specifies an initial value for the coordinate.
|
TReal32
aHorizontalAccuracy
|
specifies an initial value for the horizontal accuracy.
|
TLocality(const TCoordinate &, TReal32, TReal32)
Constructor for
TLocality
. Allows the client to set a coordinate and both a horizontal and vertical accuracy.
-
panic
-
aHorizontalAccuracy or aVerticalAccuracy are negative and not set to NaN.
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.
|
Member Functions Documentation
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.
|
BearingTo(const TLocality &, TReal32 &, TReal32 &)
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.
|
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.
|
Distance(const TLocality &, TReal32 &, TReal32 &)
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.
|
HorizontalAccuracy()
IMPORT_C
TReal32
|
HorizontalAccuracy
|
(
|
)
|
const
|
Retrieves the horizontal accuracy of this coordinate.
SetAccuracy(TReal32, TReal32)
IMPORT_C void
|
SetAccuracy
|
(
|
TReal32
|
aHorizontalAccuracy,
|
|
TReal32
|
aVerticalAccuracy
|
|
)
|
|
Sets both the horizontal and vertical accuracy of this coordinate.
-
panic
-
aHorizontalAccuracy or aVerticalAccuracy are negative and not set to NaN.
Parameters
TReal32
aHorizontalAccuracy
|
is the new horizontal accuracy, in metres.
|
TReal32
aVerticalAccuracy
|
is the new vertical accuracy, in metres.
|
SetHorizontalAccuracy(TReal32)
IMPORT_C void
|
SetHorizontalAccuracy
|
(
|
TReal32
|
aHorizontalAccuracy
|
)
|
|
Sets the horizontal accuracy of this coordinate.
-
panic
-
aHorizontalAccuracy is negative and not set to NaN.
Parameters
TReal32
aHorizontalAccuracy
|
is the new horizontal accuracy, in metres.
|
SetVerticalAccuracy(TReal32)
IMPORT_C void
|
SetVerticalAccuracy
|
(
|
TReal32
|
aVerticalAccuracy
|
)
|
|
Sets the vertical accuracy of this coordinate.
-
panic
-
aVerticalAccuracy is negative and not set to NaN.
Parameters
TReal32
aVerticalAccuracy
|
is the new vertical accuracy, in metres.
|
VerticalAccuracy()
IMPORT_C
TReal32
|
VerticalAccuracy
|
(
|
)
|
const
|
Retrieves the vertical accuracy of this coordinate.
Member Data Documentation
TReal32
iHorizontalAccuracy
TReal32
|
iHorizontalAccuracy
|
[protected]
|
Horizontal (earths-surface) accuracy, in metres.
TUint8
iReserved
Unused variable for future expansion.
TReal32
iVerticalAccuracy
TReal32
|
iVerticalAccuracy
|
[protected]
|
Altitudinal accuracy, in metres.
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.