Class MeridianLocation
java.lang.Object
com.arubanetworks.meridian.location.MeridianLocation
- All Implemented Interfaces:
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
ConstructorDescriptionA constructor for MeridianLocation, only the timestamp will be initialized.MeridianLocation
(MeridianLocation average) -
Method Summary
Modifier and TypeMethodDescriptiondouble
distanceTo
(MeridianLocation location) Returns the shortest distance between this location and locationdouble
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.getPoint()
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
Sets a known Meridian Map Key for this location.void
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) toString()
-
Constructor Details
-
MeridianLocation
public MeridianLocation()A constructor for MeridianLocation, only the timestamp will be initialized. -
MeridianLocation
-
-
Method Details
-
getMapKey
Returns the Meridian Map Key that is associated with this location. -
setMap
Sets a known Meridian Map Key for this location. -
getPoint
Gets the point in pixels of this location on its associated map. -
setPoint
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
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
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
-