public class PositionProvider extends AbstractProvider<PositionEvent>
Provides Time, Position and Velocity reports from GPS. Data is captured from
RMC, GGA and 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. FAA mode transmitted in
RMC is also checked and captured when available, but may be null
depending on used NMEA version.
PositionListener,
PositionEvent,
SentenceReader| Constructor and Description |
|---|
PositionProvider(SentenceReader reader)
Creates a new instance of PositionProvider.
|
| Modifier and Type | Method and Description |
|---|---|
protected PositionEvent |
createProviderEvent()
Creates a
ProviderEvent of type T. |
protected boolean |
isReady()
Tells if provider has captured the required sentences for creating new
ProviderEvent.
|
protected boolean |
isValid()
Tells if the captured sentence events contain valid data to be dispatched
to ProviderListeners.
|
addListener, getSentences, hasAll, hasOne, readingPaused, readingStarted, readingStopped, removeListener, sentenceReadpublic PositionProvider(SentenceReader reader)
reader - SentenceReader that provides the required sentences.protected PositionEvent createProviderEvent()
AbstractProviderProviderEvent of type T.createProviderEvent in class AbstractProvider<PositionEvent>protected boolean isReady()
AbstractProviderisReady in class AbstractProvider<PositionEvent>protected boolean isValid()
AbstractProviderisValid in class AbstractProvider<PositionEvent>Copyright (C) 2010-2017 Java Marine API authors. All Rights Reserved.