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.
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.
Parameters:
[in]
aPosition
is another position to use in the calculation.
[out]
aSpeed
upon successful completion, this is set to the speed indicated by being at this position at its recorded time, and at aPosition at its recorded time. Always positive, in metres per second.
[out]
aDelta
upon successful completion, this is set to an estimate of the accuracy of the calculation, in metres per second.
Returns:
a Symbian OS error code.
KErrArgument if any of iLatitude, iLongitude, aPosition.iLatitude or aPosition.iLongitude are set to NaN.
KErrArgument if any of iHorizontalAccuracy or aPosition.iHorizontalAccuracy are set to NaN.
KErrArgument if either of iTime or aPosition.iTime are set to zero.
KErrArgument if iTime and aPosition.iTime are the same.
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.
Parameters:
[in]
aPosition
is another position to use in the calculation.
[out]
aSpeed
upon successful completion, this is set to the speed indicated by being at this position at its recorded time, and at aPosition at its recorded time. Always positive, in metres per second.
Returns:
a Symbian OS error code.
KErrArgument if any of iLatitude, iLongitude, aPosition.iLatitude or aPosition.iLongitude are set to NaN.
KErrArgument if either of iTime or aPosition.iTime are set to zero.
KErrArgument if iTime and aPosition.iTime are the same.
IMPORT_C TTime TPosition::Time
(
)
const
Retrieves the time of this position data.
Returns:
the timing component of this position information.