org.placelab.spotter
Class PlacelabStumblerLogSpotter
java.lang.Object
org.placelab.spotter.AbstractSpotter
org.placelab.spotter.SyncSpotter
org.placelab.spotter.LogSpotter
org.placelab.spotter.PlacelabStumblerLogSpotter
- All Implemented Interfaces:
- Spotter
- public class PlacelabStumblerLogSpotter
- extends LogSpotter
| Methods inherited from class org.placelab.spotter.AbstractSpotter |
addListener, notifyEndOfScan, notifyEndOfScan, notifyGotException, notifyGotException, notifyGotMeasurement, notifyGotMeasurement, removeListener, scanOnce, scanOnce, waitForThread |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GPS_INTERPOLATE
public static int GPS_INTERPOLATE
GPS_THRESHOLD
public static int GPS_THRESHOLD
GPS_NONE
public static int GPS_NONE
GPS_DEFAULT_THRESHOLD
public static int GPS_DEFAULT_THRESHOLD
PlacelabStumblerLogSpotter
public PlacelabStumblerLogSpotter(java.lang.String file)
PlacelabStumblerLogSpotter
public PlacelabStumblerLogSpotter(java.io.InputStream in)
getCurrentLineNumber
public int getCurrentLineNumber()
open
public void open()
throws SpotterException
- Description copied from interface:
Spotter
- Load resources used by the spotter. Applications should be able to
invoke this methods multiple times in sequence and have the "right" things happen.
All Spotters should be opened before being used.
- Throws:
SpotterException - if the necessary hardware or software for this spotter
is not present
close
public void close()
throws SpotterException
- Description copied from interface:
Spotter
- Unloads resources used by the spotter. Multiple calls to close are ok.
- Throws:
SpotterException
setGPSMethod
public void setGPSMethod(int method,
int thresholdMillis)
getGPSMethod
public int getGPSMethod()
getGPSThreshold
public int getGPSThreshold()
isOutputStumblerMeasurements
public boolean isOutputStumblerMeasurements()
- Returns:
- Returns true if we are outputting StumblerMeasurements instead of raw
GPS and Beacon Measurements.
setOutputStumblerMeasurements
public void setOutputStumblerMeasurements(boolean outputStumblerMeasurements)
- Parameters:
outputStumblerMeasurements - Set whether to output StumblerMeasurements
instead of raw GPS and Beacon Measurements.
getMeasurementFromLog
public Measurement getMeasurementFromLog()
throws SpotterException
- Description copied from class:
LogSpotter
- Returns a single Measurement from the log, or null if there are no Measurements
remaining. This method is only of interest to implementers of LogSpotters, users
should instead call
Spotter.getMeasurement()
- Specified by:
getMeasurementFromLog in class LogSpotter
- Throws:
SpotterException - if an error is encountered in the log
getOtherMeasurementType
protected Measurement getOtherMeasurementType(long time,
java.lang.String type,
java.util.Hashtable allFields)
isValidFile
public static boolean isValidFile(java.lang.String file)
main
public static void main(java.lang.String[] args)
jingoLat
public static java.lang.String jingoLat(double d)
jingoLon
public static java.lang.String jingoLon(double d)
blah
public static java.lang.String blah(int i)
testmain
public static void testmain(java.lang.String[] args)
throws SpotterException
- Throws:
SpotterException