Class Location
Class Location
- java.lang.Object
-
- com.here.sdk.core.Location
-
public final class Location extends java.lang.ObjectDescribes a location in the world at a given time.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.DoublebearingAccuracyInDegreesEstimated bearing accuracy for this location, in degrees.java.lang.DoublebearingInDegreesBearing (also known as course) is the device's horizontal direction of travel.GeoCoordinatescoordinatesThe geographic coordinates of the location.DurationgnssTimeOptional gnss time at which the location was determined.java.lang.DoublehorizontalAccuracyInMetersThe estimated horizontal accuracy.LocationTechnologylocationTechnologyOptional technology or provider of this location.java.lang.DoublepitchInDegreesPitch of this location, in degrees.LocationSourcesourceOptional source of this location.java.lang.DoublespeedAccuracyInMetersPerSecondEstimated speed accuracy of this location, in meters per second.java.lang.DoublespeedInMetersPerSecondCurrent speed of the device.java.util.DatetimeThe time at which the location was determined.DurationtimestampSinceBootThe time at which the location was determined, relative to device boot time.java.lang.DoubleverticalAccuracyInMetersEstimated vertical accuracy.
-
Constructor Summary
Constructors Constructor Description Location(GeoCoordinates coordinates)Creates a new Location instance from the provided GeoCoordinates value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)inthashCode()
-
-
-
Field Detail
-
coordinates
@NonNull public GeoCoordinates coordinates
The geographic coordinates of the location.
-
bearingInDegrees
@Nullable public java.lang.Double bearingInDegrees
Bearing (also known as course) is the device's horizontal direction of travel. Starts at 0 in the geographical north and rotates around the compass in a clockwise direction. This means for going north it is equal to 0, for northeast it is 45, for east it is 90 and so on. Note that this may be different from the orientation of the device. If it cannot be determined, the value is
null. Otherwise, it is guaranteed to be in the range [0, 360).
-
speedInMetersPerSecond
@Nullable public java.lang.Double speedInMetersPerSecond
Current speed of the device. If it cannot be determined, the value is
null.
-
time
@Nullable public java.util.Date time
The time at which the location was determined.
-
horizontalAccuracyInMeters
@Nullable public java.lang.Double horizontalAccuracyInMeters
The estimated horizontal accuracy. The actual location will lie within this radius of uncertainty.
-
verticalAccuracyInMeters
@Nullable public java.lang.Double verticalAccuracyInMeters
Estimated vertical accuracy. Given that the received Location contains the altitude, the real value of the altitude is estimated to lie within the following range: [altitude - vertical accuracy, altitude + vertical accuracy]. For example, when the altitude is equal to 50 and the vertical accuracy is 8, then the actual value is most likely in the range [42, 58].
-
bearingAccuracyInDegrees
@Nullable public java.lang.Double bearingAccuracyInDegrees
Estimated bearing accuracy for this location, in degrees. If it cannot be determined, the value is
null.
-
speedAccuracyInMetersPerSecond
@Nullable public java.lang.Double speedAccuracyInMetersPerSecond
Estimated speed accuracy of this location, in meters per second. If it cannot be determined, the value is
null.
-
timestampSinceBoot
@Nullable public Duration timestampSinceBoot
The time at which the location was determined, relative to device boot time. This time is monotonic and not affected by leap time or other system time adjustments, so this is the recommended basis for general purpose interval timing between location updates. If it cannot be determined, the value is
null.
-
locationTechnology
@Nullable public LocationTechnology locationTechnology
Optional technology or provider of this location. If it cannot be determined, the value is
null.
-
source
@Nullable public LocationSource source
Optional source of this location. If it cannot be determined, the value is
null.
-
gnssTime
@Nullable public Duration gnssTime
Optional gnss time at which the location was determined. It is a time interval from the Unix time epoch in milliseconds. If it cannot be determined, the value is
null.
-
pitchInDegrees
@Nullable public java.lang.Double pitchInDegrees
Pitch of this location, in degrees. If it cannot be determined, the value is
null.
-
-
Constructor Detail
-
Location
public Location(@NonNull GeoCoordinates coordinates)Creates a new Location instance from the provided GeoCoordinates value. timestamp is initialized with
January 1, 1970, 00:00:00 GMTvalue. The rest of the fields will be initialized to null.- Parameters:
coordinates-The geographic coordinates of the location.
-
-