Class Location

java.lang.Object
com.here.sdk.core.Location

public final class Location extends Object

Describes a location in the world at a given time.

  • Field Details

    • coordinates

      @NonNull public GeoCoordinates coordinates

      The geographic coordinates of the location.

    • bearingInDegrees

      @Nullable public 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 Double speedInMetersPerSecond

      Current speed of the device. If it cannot be determined, the value is null.

    • time

      @Nullable public Date time

      The time at which the location was determined.

    • horizontalAccuracyInMeters

      @Nullable public Double horizontalAccuracyInMeters

      The estimated horizontal accuracy. The actual location will lie within this radius of uncertainty.

    • verticalAccuracyInMeters

      @Nullable public 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 Double bearingAccuracyInDegrees

      Estimated bearing accuracy for this location, in degrees. If it cannot be determined, the value is null.

    • speedAccuracyInMetersPerSecond

      @Nullable public 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 Double pitchInDegrees

      Pitch of this location, in degrees. If it cannot be determined, the value is null.

  • Constructor Details

    • 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 GMT value. The rest of the fields will be initialized to null.

      Parameters:
      coordinates -

      The geographic coordinates of the location.

  • Method Details