Package arez.dom
Class Position
java.lang.Object
arez.dom.Position
An immutable variant of
GeolocationCoordinates
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
double
Return the accuracy of the latitude and longitude properties, expressed in meters.Return the position's altitude in meters, relative to sea level.Return the direction in which the device is traveling.double
Return the position's latitude in decimal degrees.double
Return the position's longitude in decimal degrees.getSpeed()
Return the velocity of the device in meters per second.int
hashCode()
-
Constructor Details
-
Position
public Position(double accuracy, @Nullable Double altitude, @Nullable Double heading, double latitude, double longitude, @Nullable Double speed) Create the position object.- Parameters:
accuracy
- the accuracy.altitude
- the altitude.heading
- the heading.latitude
- the latitude.longitude
- the longitude.speed
- the speed.
-
-
Method Details
-
getAccuracy
Return the accuracy of the latitude and longitude properties, expressed in meters.- Returns:
- the accuracy.
-
getAltitude
Return the position's altitude in meters, relative to sea level. This value can be null if the implementation cannot provide the data.- Returns:
- the altitude.
-
getHeading
Return the direction in which the device is traveling. This value, specified in degrees, indicates how far off from heading true north the device is. 0 degrees represents true north, and the direction is determined clockwise (which means that east is 90 degrees and west is 270 degrees). If speed is 0, heading is NaN. If the device is unable to provide heading information, this value is null.- Returns:
- the heading.
-
getLatitude
Return the position's latitude in decimal degrees.- Returns:
- the latitude.
-
getLongitude
Return the position's longitude in decimal degrees.- Returns:
- the longitude.
-
getSpeed
Return the velocity of the device in meters per second.- Returns:
- the speed.
-
equals
-
hashCode
-