|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.placelab.client.tracker.Tracker
org.placelab.client.tracker.BeaconTracker
This is the base class for all Beacon-based trackers.
It includes methods to look up Beacon
objects in a Mapper given a unique
identifier for the Beacon.
Because a Beacon's unique identifier may not be truly unique, there is a need to choose a Beacon from a set of Beacons that match the unique identifier given a current location and/or the surrounding neighborhood of Beacons. Utility methods are provided to meet this need.
| Field Summary | |
static long |
WIFI_MAX_DISTANCE
|
| Constructor Summary | |
BeaconTracker(Mapper m)
|
|
| Method Summary | |
boolean |
acceptableMeasurement(Measurement m)
Returns true if the tracker can make use of this reading to meaningfully update the estimate. |
Beacon |
findBeacon(java.lang.String uniqueId,
BeaconMeasurement meas,
Coordinate currentPosition)
Like findBeacon(String, BeaconMeasurement, Coordinate, long) but uses
the default maxDistance of 500 meters which corresponds to WiFi beacons. |
Beacon |
findBeacon(java.lang.String uniqueId,
BeaconMeasurement meas,
Coordinate currentPosition,
long maxDistance)
Given the unique id for a Beacon find the most likely
Beacon in this BeaconTracker's mapper given the
neighborhood of surrounding Beacons in a {org.placelab.core.BeaconMeasurement} and
the current position. |
Mapper |
getMapper()
Gets the Mapper used by this BeaconTracker
to map Beacon ids to Beacon objects. |
static Beacon |
pickBeacon(java.util.Vector beacons,
BeaconMeasurement meas,
Coordinate currentPosition)
Like pickBeacon(Vector, BeaconMeasurement, Coordinate, long) but uses
the default maxDistance of 500 meters which corresponds to WiFi beacons. |
static Beacon |
pickBeacon(java.util.Vector beacons,
BeaconMeasurement meas,
Coordinate currentPosition,
long maxDistance)
A convenience method for choosing the most likely beacon from a Vector of beacons returned from a Mapper. |
| Methods inherited from class org.placelab.client.tracker.Tracker |
addEstimateListener, fireEstimateUpdate, getEstimate, getLastUpdatedTime, gotMeasurement, numberOfMeasurements, removeEstimateListener, reset, resetImpl, spotterExceptionThrown, updateEstimate, updateEstimateImpl, updateWithoutMeasurement |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final long WIFI_MAX_DISTANCE
| Constructor Detail |
public BeaconTracker(Mapper m)
| Method Detail |
public Mapper getMapper()
Mapper used by this BeaconTracker
to map Beacon ids to Beacon objects.
public boolean acceptableMeasurement(Measurement m)
Tracker
acceptableMeasurement in class Trackerm - return true if this is a BeaconMeasurement
public Beacon findBeacon(java.lang.String uniqueId,
BeaconMeasurement meas,
Coordinate currentPosition)
findBeacon(String, BeaconMeasurement, Coordinate, long) but uses
the default maxDistance of 500 meters which corresponds to WiFi beacons.
findBeacon(String, BeaconMeasurement, Coordinate, long)
public Beacon findBeacon(java.lang.String uniqueId,
BeaconMeasurement meas,
Coordinate currentPosition,
long maxDistance)
Beacon find the most likely
Beacon in this BeaconTracker's mapper given the
neighborhood of surrounding Beacons in a {org.placelab.core.BeaconMeasurement} and
the current position. It is necessary to specify these things since MAC address
spoofing and manufacturing errors can make the unique ids less than perfectly unique.
uniqueId - the unique identifier for the Beacon you
wish you look up.meas - of which the beacon you are trying to look up is a part.currentPosition - your best guess as to the current locationmaxDistance - the furthest distance that Beacons of this type can expect to be heard
for instance, for WiFi, 500 meters is a good approximation.
public static Beacon pickBeacon(java.util.Vector beacons,
BeaconMeasurement meas,
Coordinate currentPosition)
pickBeacon(Vector, BeaconMeasurement, Coordinate, long) but uses
the default maxDistance of 500 meters which corresponds to WiFi beacons.
public static Beacon pickBeacon(java.util.Vector beacons,
BeaconMeasurement meas,
Coordinate currentPosition,
long maxDistance)
Mapper. Generally, you will just
use the instance method findBeacon, rather than going here.
beacons - the Vector of beaconsmeas - the measurement of which the beacon is a part (the neighborhood)currentPosition - your best guess for the current positionmaxDistance - the furthest distance that Beacons of this type can expect to be heard
for instance, for WiFi, 500 meters is a good approximation.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||