|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dinopolis.gpstool.gpsinput.GPSGeneralDataProcessor
org.dinopolis.gpstool.gpsinput.nmea.GPSNmeaDataProcessor
This class is interpreting NMEA data from a GPSDevice (serial gps-receivier, file containing gps data, ...) and provides this information (heading and location, etc.).
Field Summary | |
static int |
MAX_NMEA_MESSAGE_LENGTH
|
Fields inherited from interface org.dinopolis.gpstool.gpsinput.GPSDataProcessor |
ALTITUDE, DATE, DEPTH, END_OF_FILE, FIX_DIMENSIONS, FIX_QUALITY, HDOP, HEADING, IDS_SATELLITES, KM2NAUTIC, LOCATION, NUMBER_SATELLITES, PDOP, SATELLITE_INFO, SPEED, TIME, VDOP |
Constructor Summary | |
GPSNmeaDataProcessor()
Default constructor. |
|
GPSNmeaDataProcessor(int delay_time)
Default constructor. |
Method Summary | |
void |
close()
Stopps the data processing. |
java.lang.String[] |
getGPSInfo()
Returns information about the gps connected (name of device, type of connection, etc.) |
GPSPosition |
getGPSPosition()
Returns the last received position from the GPSDevice or null if no position was retrieved until now. |
float |
getHeading()
Returns the last received heading (direction) from the GPSDevice or -1.0 if no heading was retrieved until now. |
boolean |
isIgnoreInvalidChecksum()
Returns true if invalid NMEA checksums should be ignored. |
void |
open()
Starts the data processing. |
void |
run()
|
void |
setDelayTime(int delay_time)
Sets the deley time between reading two NMEA messages. |
void |
setIgnoreInvalidChecksum(boolean ignore_invalid_checksum)
Set if invalid nmea checksums should be ignored. |
long |
startSendPositionPeriodically(long period)
Requests the gps device to send the current position/heading/etc. periodically. |
void |
stopSendPositionPeriodically()
Requests the gps device to stop to send the current position/heading/etc. periodically. |
Methods inherited from class org.dinopolis.gpstool.gpsinput.GPSGeneralDataProcessor |
addGPSDataChangeListener, addGPSDataChangeListener, addGPSRawDataListener, addProgressListener, getGPSData, getGPSData, getGPSDevice, removeGPSDataChangeListener, removeGPSDataChangeListener, removeGPSRawDataListener, removeProgressListener, setGPSDevice |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MAX_NMEA_MESSAGE_LENGTH
Constructor Detail |
public GPSNmeaDataProcessor()
public GPSNmeaDataProcessor(int delay_time)
delay_time
- the time between two NMEA messages are read (may
be used for reading NMEA files slower) in milliseconds.Method Detail |
public void setDelayTime(int delay_time)
delay_time
- the time between two NMEA messages are read (may
be used for reading NMEA files slower) in milliseconds.public boolean isIgnoreInvalidChecksum()
public void setIgnoreInvalidChecksum(boolean ignore_invalid_checksum)
ignore_invalid_checksum
- public void open() throws GPSException
open
in interface GPSDataProcessor
open
in class GPSGeneralDataProcessor
if
- an error occured on connecting.
GPSException
public void close() throws GPSException
close
in interface GPSDataProcessor
close
in class GPSGeneralDataProcessor
if
- an error occured on disconnecting.
GPSException
public java.lang.String[] getGPSInfo()
getGPSInfo
in interface GPSDataProcessor
public void run()
run
in interface java.lang.Runnable
public long startSendPositionPeriodically(long period) throws GPSException
startSendPositionPeriodically
in interface GPSDataProcessor
period
- time in milliseconds between periodically sending
position/heading/etc. This value may be changed by the gps device,
so do not rely on the value given!
GPSException
- if the operation threw an exception
(e.g. communication problem).public void stopSendPositionPeriodically() throws GPSException
stopSendPositionPeriodically
in interface GPSDataProcessor
GPSException
- if the operation threw an exception
(e.g. communication problem).public GPSPosition getGPSPosition()
null
if no position was retrieved until now.
getGPSPosition
in interface GPSDataProcessor
getGPSPosition
in class GPSGeneralDataProcessor
public float getHeading()
-1.0
if no heading was retrieved until now.
getHeading
in interface GPSDataProcessor
getHeading
in class GPSGeneralDataProcessor
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |