Class MeridianLocation

java.lang.Object
com.arubanetworks.meridian.location.MeridianLocation
All Implemented Interfaces:
Serializable

public class MeridianLocation extends Object implements Serializable
A location object returned by the MeridianLocationManager that contains normalized data about a device’s indoor location at a specific point in time.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    A constructor for MeridianLocation, only the timestamp will be initialized.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the shortest distance between this location and location
    double
    Gets the accuracy of this location as the maximum error in meters.
    long
    A utility function to get the current age of this location in milliseconds.
    Returns the Meridian Map Key that is associated with this location.
    android.graphics.PointF
    Gets the point in pixels of this location on its associated map.
    LocationProvider
    Gets the primary provider that generated this location.
    Gets the point in time that this location was generated.
    double
     
    boolean
    Determines a locations validity.
    void
    setAccuracy(double accuracy)
    Sets the accuracy of this location as the maximum error in meters.
    void
    setAgeMillis(long ageInMillis)
    A utility function to set the current age of this location in milliseconds.
    void
    setMap(EditorKey mapKey)
    Sets a known Meridian Map Key for this location.
    void
    setPoint(android.graphics.PointF point)
    Set the point in pixels of this location on its associated map.
    void
    setProvider(LocationProvider provider)
    Sets the primary provider that generated this location.
    void
    setUnitsPerMeter(double unitsPerMeter)
     
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • MeridianLocation

      public MeridianLocation()
      A constructor for MeridianLocation, only the timestamp will be initialized.
    • MeridianLocation

      public MeridianLocation(MeridianLocation average)
  • Method Details

    • getMapKey

      public EditorKey getMapKey()
      Returns the Meridian Map Key that is associated with this location.
    • setMap

      public void setMap(EditorKey mapKey)
      Sets a known Meridian Map Key for this location.
    • getPoint

      public android.graphics.PointF getPoint()
      Gets the point in pixels of this location on its associated map.
    • setPoint

      public void setPoint(android.graphics.PointF point)
      Set the point in pixels of this location on its associated map.
    • getAccuracy

      public double getAccuracy()
      Gets the accuracy of this location as the maximum error in meters.
    • setAccuracy

      public void setAccuracy(double accuracy)
      Sets the accuracy of this location as the maximum error in meters.
    • setUnitsPerMeter

      public void setUnitsPerMeter(double unitsPerMeter)
    • getUnitsPerMeter

      public double getUnitsPerMeter()
    • getTimestamp

      public Date getTimestamp()
      Gets the point in time that this location was generated.
    • setProvider

      public void setProvider(LocationProvider provider)
      Sets the primary provider that generated this location.
    • getProvider

      public LocationProvider getProvider()
      Gets the primary provider that generated this location.
    • getAgeMillis

      public long getAgeMillis()
      A utility function to get the current age of this location in milliseconds.
    • setAgeMillis

      public void setAgeMillis(long ageInMillis)
      A utility function to set the current age of this location in milliseconds.
    • distanceTo

      public double distanceTo(MeridianLocation location)
      Returns the shortest distance between this location and location
      Parameters:
      location - location to get distance to
      Returns:
      shortest distance between the two locations, or -1 if distance couldn’t be calculated (example: it will return -1 if the locations are on different floors / buildings)
    • isInvalid

      public boolean isInvalid()
      Determines a locations validity.

      A location is valid if it has a non null map key and its point’s x and y are real numbers.

    • toString

      @NonNull public String toString()
      Overrides:
      toString in class Object