use of net.sf.marineapi.nmea.util.DataStatus in project marine-api by ktuukkan.
the class PositionProvider method isValid.
/*
* (non-Javadoc)
* @see net.sf.marineapi.provider.AbstractProvider#isValid()
*/
@Override
protected boolean isValid() {
for (Sentence s : getSentences()) {
if (s instanceof RMCSentence) {
RMCSentence rmc = (RMCSentence) s;
DataStatus ds = rmc.getStatus();
if (DataStatus.VOID.equals(ds) || (rmc.getFieldCount() > 11 && FaaMode.NONE.equals(rmc.getMode()))) {
return false;
}
} else if (s instanceof GGASentence) {
GpsFixQuality fq = ((GGASentence) s).getFixQuality();
if (GpsFixQuality.INVALID.equals(fq)) {
return false;
}
} else if (s instanceof GLLSentence) {
DataStatus ds = ((GLLSentence) s).getStatus();
if (DataStatus.VOID.equals(ds)) {
return false;
}
}
}
return true;
}
use of net.sf.marineapi.nmea.util.DataStatus in project marine-api by ktuukkan.
the class APBParser method setPerpendicularPassed.
/*
* (non-Javadoc)
*
* @see
* net.sf.marineapi.nmea.sentence.APBSentence#setPerpendicularPassed(boolean
* )
*/
@Override
public void setPerpendicularPassed(boolean isPassed) {
DataStatus s = isPassed ? DataStatus.ACTIVE : DataStatus.VOID;
setCharValue(PERPENDICULAR_STATUS, s.toChar());
}
use of net.sf.marineapi.nmea.util.DataStatus in project marine-api by ktuukkan.
the class APBParser method setArrivalCircleEntered.
/*
* (non-Javadoc)
*
* @see
* net.sf.marineapi.nmea.sentence.APBSentence#setArrivalCircleEntered(boolean
* )
*/
@Override
public void setArrivalCircleEntered(boolean isEntered) {
DataStatus s = isEntered ? DataStatus.ACTIVE : DataStatus.VOID;
setCharValue(CIRCLE_STATUS, s.toChar());
}
Aggregations