|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.marineapi.provider.TPVProvider
public class TPVProvider
Provides a time/position/velocity report from GPS. Data is captured from RMC
and GGA or GLL sentences. RMC is used for date/time, speed and course. GGA is
used as primary source for position as it contains also the altitude. When
GGA is not available, position may be taken from GLL or RMC. If this is the
case, there is no altitude included in the Position. GPS data
statuses are also captured and events are dispatched only when sentences
report DataStatus.ACTIVE
.
When constructing the TPVEvent
, captured sentences must be from
within the last 1000 milliseconds (i.e. standard NMEA update rate, 1/s).
TPVListener
,
TPVEvent
,
SentenceReader
Constructor Summary | |
---|---|
TPVProvider(SentenceReader reader)
Creates a new instance of GPSProvider. |
Method Summary | |
---|---|
void |
addListener(TPVListener listener)
Inserts a listener to provider. |
void |
readingPaused()
Called when NMEA data flow has paused for some reason, e.g. when reached the end of file or device has stopped providing data, but the reader is still running and waiting for more data. |
void |
readingStarted()
Called when NMEA data is found in stream and reader starts dispatching SentenceEvents. |
void |
readingStopped()
Invoked after SentenceReader has stopped reading the input
stream, either due to error or explicit request by calling
SentenceReader.stop() . |
void |
removeListener(TPVListener listener)
Removes the specified listener from provider. |
void |
sentenceRead(SentenceEvent event)
Invoked when valid NMEA 0183 data has been read by SentenceReader. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TPVProvider(SentenceReader reader)
reader
- SentenceReader to be used as the data source.Method Detail |
---|
public void addListener(TPVListener listener)
listener
- Listener to addpublic void readingPaused()
SentenceListener
readingPaused
in interface SentenceListener
public void readingStarted()
SentenceListener
readingPaused()
has occurred.
readingStarted
in interface SentenceListener
public void readingStopped()
SentenceListener
SentenceReader
has stopped reading the input
stream, either due to error or explicit request by calling
SentenceReader.stop()
.
readingStopped
in interface SentenceListener
public void removeListener(TPVListener listener)
listener
- Listener to removepublic void sentenceRead(SentenceEvent event)
SentenceListener
sentenceRead
in interface SentenceListener
event
- SentenceEvent containing the data.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |