TLocality Class Reference
API published in: S60 2nd Ed FP 2
Link against: lbs.lib
Capability Information
Required Capabilities
None
Exceptions
The capability Location is required in:
TInt RPositionServer::GetDefaultModuleId(TPositionModuleId& aModuleId) const;
TInt RPositionServer::GetNumModules(TUint& aNumModules) const;
TInt RPositionServer::GetModuleInfoByIndex(TInt aModuleIndex, TPositionModuleInfoBase& aModuleInfo) const;
TInt RPositionServer::GetModuleInfoById(TPositionModuleId aModuleId, TPositionModuleInfoBase& aModuleInfo) const;
TInt RPositionServer::GetModuleStatus(TPositionModuleStatusBase& aPosModuleStatus, TPositionModuleId aModuleId) const;
void RPositionServer::NotifyModuleStatusEvent(TPositionModuleStatusEventBase& aStatusEvent,TRequestStatus& aStatus,const TPositionModuleId
aModuleId = KPositionNullModuleId) const;
TInt RPositioner::SetRequestor(CRequestor::TRequestorType aType,CRequestor::TRequestorFormat aFormat,const TDesC& aData);
TInt RPositioner::SetRequestor(const RRequestorStack& aRequestorStack);
TInt RPositioner::SetUpdateOptions(const TPositionUpdateOptionsBase& aPosOption);
TInt RPositioner::GetUpdateOptions(TPositionUpdateOptionsBase& aPosOption) const;
void RPositioner::GetLastKnownPosition(TPositionInfoBase& aPosInfo,TRequestStatus& aStatus) const;
void RPositioner::NotifyPositionUpdate(TPositionInfoBase& aPosInfo,TRequestStatus& aStatus) const;
#include <lbsposition.h>
Inherits TCoordinate.
Inherited by TPosition.
Detailed 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.
|
Public Member Functions
|
IMPORT_C |
TLocality ()
|
|
Default constructor for TLocality.
|
IMPORT_C |
TLocality (const TCoordinate &aCoordinate, TReal32 aHorizontalAccuracy)
|
|
Constructor for TLocality.
|
IMPORT_C |
TLocality (const TCoordinate &aCoordinate, TReal32 aHorizontalAccuracy, TReal32 aVerticalAccuracy)
|
|
Constructor for TLocality.
|
IMPORT_C void |
SetHorizontalAccuracy (TReal32 aHorizontalAccuracy)
|
|
Sets the horizontal accuracy of this coordinate.
|
IMPORT_C void |
SetVerticalAccuracy (TReal32 aVerticalAccuracy)
|
|
Sets the vertical accuracy of this coordinate.
|
IMPORT_C void |
SetAccuracy (TReal32 aHorizontalAccuracy, TReal32 aVerticalAccuracy)
|
|
Sets both the horizontal and vertical accuracy of this coordinate.
|
IMPORT_C TReal32 |
HorizontalAccuracy () const
|
|
Retrieves the horizontal accuracy of this coordinate.
|
IMPORT_C TReal32 |
VerticalAccuracy () const
|
|
Retrieves the vertical accuracy of this coordinate.
|
IMPORT_C TInt |
Distance (const TCoordinate &aCoordinate, TReal32 &aDistance) const
|
|
This method calculates the distance between this coordinate and the supplied coordinate.
|
IMPORT_C TInt |
Distance (const TLocality &aLocality, TReal32 &aDistance, TReal32 &aDelta) const
|
|
This method calculates the distance between this locality and the supplied locality.
|
IMPORT_C TInt |
BearingTo (const TCoordinate &aTargetCoordinate, TReal32 &aBearing) const
|
|
This method calculates the bearing from this coordinate to the supplied coordinate.
|
IMPORT_C TInt |
BearingTo (const TLocality &aTargetLocality, TReal32 &aBearing, TReal32 &aDelta) const
|
|
This method calculates the bearing from this locality to the supplied locality.
|
Protected Attributes
|
TReal32 |
iHorizontalAccuracy |
|
Horizontal (earths-surface) accuracy, in metres.
|
TReal32 |
iVerticalAccuracy |
|
Altitudinal accuracy, in metres.
|
Constructor & Destructor Documentation
IMPORT_C TLocality::TLocality |
( |
|
) |
|
|
|
Default constructor for TLocality.
Sets the member data to default values (NaN).
|
IMPORT_C TLocality::TLocality |
( |
const TCoordinate &
|
aCoordinate,
|
|
|
TReal32 |
aHorizontalAccuracy |
|
) |
|
|
|
Constructor for TLocality.
Allows the client to set a coordinate and a 'surface' accuracy.
- Parameters:
-
[in]
|
aCoordinate
|
specifies an initial value for the coordinate. |
|
aHorizontalAccuracy
|
specifies an initial value for the horizontal accuracy. |
- Panic:
- "Lbs Client Fault" 13 if aHorizontalAccuracy is negative and not set to NaN.
|
IMPORT_C TLocality::TLocality |
( |
const TCoordinate &
|
aCoordinate,
|
|
|
TReal32 |
aHorizontalAccuracy,
|
|
|
TReal32 |
aVerticalAccuracy |
|
) |
|
|
|
Constructor for TLocality.
Allows the client to set a coordinate and both a horizontal and vertical accuracy.
- Parameters:
-
[in]
|
aCoordinate
|
specifies an initial value for the coordinate. |
|
aHorizontalAccuracy
|
specifies an initial value for the horizontal (earth-surface) accuracy. |
|
aVerticalAccuracy
|
specifies an initial value for the vertical (altitudinal) accuracy. |
- Panic:
- "Lbs Client Fault" 13 if aHorizontalAccuracy or aVerticalAccuracy is negative and not set to NaN.
|
Member Function Documentation
IMPORT_C TInt TLocality::BearingTo |
( |
const TLocality &
|
aTargetLocality,
|
|
|
TReal32 & |
aBearing,
|
|
|
TReal32 & |
aDelta |
|
) |
const |
|
|
This method calculates the bearing from this locality to the supplied locality.
- Parameters:
-
[in]
|
aTargetLocality
|
is the supplied target locality. |
[out]
|
aBearing
|
upon successful completion, this is set to the bearing from this locality to aTargetLocality, in degrees counting clockwise
relative to true north.
|
[out]
|
aDelta
|
upon successful completion, this is set to an estimate of the accuracy of the calculation, in degrees relative to aBearing.
|
- Returns:
- 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.
|
IMPORT_C TInt TLocality::BearingTo |
( |
const TCoordinate &
|
aTargetCoordinate,
|
|
|
TReal32 & |
aBearing |
|
) |
const |
|
|
This method calculates the bearing from this coordinate to the supplied coordinate.
- Parameters:
-
[in]
|
aTargetCoordinate
|
is the supplied target coordinate. |
[out]
|
aBearing
|
upon successful completion, this is set to the bearing from this coordinate to aTargetCoordinate, in degrees counting clockwise
relative to true north.
|
- Returns:
- 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.
Reimplemented from TCoordinate.
|
IMPORT_C TInt TLocality::Distance |
( |
const TLocality &
|
aLocality,
|
|
|
TReal32 & |
aDistance,
|
|
|
TReal32 & |
aDelta |
|
) |
const |
|
|
This method calculates the distance between this locality and the supplied locality.
An estimate of the accuracy of the result is also provided.
- Parameters:
-
[in]
|
aLocality
|
is another point to use in the calculation. |
[out]
|
aDistance
|
upon successful completion, this is set to the distance between this locality and aLocality, in metres. |
[out]
|
aDelta
|
upon successful completion, this is set to the estimated accuracy of the distance calculation, in metres. |
- Returns:
- 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.
|
IMPORT_C TInt TLocality::Distance |
( |
const TCoordinate &
|
aCoordinate,
|
|
|
TReal32 & |
aDistance |
|
) |
const |
|
|
This method calculates the distance between this coordinate and the supplied coordinate.
- Parameters:
-
[in]
|
aCoordinate
|
is another point to use in the calculation. |
[out]
|
aDistance
|
upon successful completion, this is set to the distance between this coordinate and aCoordinate, in metres. |
- Returns:
- a Symbian OS error code.
KErrArgument if any of iLatitude, iLongitude, aCoordinate.iLatitude or aCoordinate.iLongitude are set to NaN.
Reimplemented from TCoordinate.
|
IMPORT_C TReal32 TLocality::HorizontalAccuracy |
( |
|
) |
const |
|
|
Retrieves the horizontal accuracy of this coordinate.
- Returns:
- the horizontal accuracy, in metres.
|
IMPORT_C void TLocality::SetAccuracy |
( |
TReal32 |
aHorizontalAccuracy,
|
|
|
TReal32 |
aVerticalAccuracy |
|
) |
|
|
|
Sets both the horizontal and vertical accuracy of this coordinate.
- Parameters:
-
|
aHorizontalAccuracy
|
is the new horizontal accuracy, in metres. |
|
aVerticalAccuracy
|
is the new vertical accuracy, in metres. |
- Panic:
- "Lbs Client Fault" 13 if aHorizontalAccuracyor aVerticalAccuracy is negative and not set to NaN.
|
IMPORT_C void TLocality::SetHorizontalAccuracy |
( |
TReal32 |
aHorizontalAccuracy
|
) |
|
|
|
Sets the horizontal accuracy of this coordinate.
- Parameters:
-
|
aHorizontalAccuracy
|
is the new horizontal accuracy, in metres. |
- Panic:
- "Lbs Client Fault" 13 if aHorizontalAccuracy is negative and not set to NaN.
|
IMPORT_C void TLocality::SetVerticalAccuracy |
( |
TReal32 |
aVerticalAccuracy
|
) |
|
|
|
Sets the vertical accuracy of this coordinate.
- Parameters:
-
|
aVerticalAccuracy
|
is the new vertical accuracy, in metres. |
- Panic:
- "Lbs Client Fault" 13 if aVerticalAccuracy is negative and not set to NaN.
|
IMPORT_C TReal32 TLocality::VerticalAccuracy |
( |
|
) |
const |
|
|
Retrieves the vertical accuracy of this coordinate.
- Returns:
- the vertical accuracy, in metres.
|
Field Documentation
|
Horizontal (earths-surface) accuracy, in metres.
|
|
Altitudinal accuracy, in metres.
|
The documentation for this class was generated from the following file: