net.sf.marineapi.nmea.sentence
Interface RMBSentence

All Superinterfaces:
Sentence

public interface RMBSentence
extends Sentence

Recommended minimum navigation information. This sentence is transmitted by a GPS receiver when a destination waypoint is active (GOTO mode).

Example:
$GPRMB,A,0.00,R,,RUSKI,5536.200,N,01436.500,E,432.3,234.9,,V*58

Version:
$Revision: 72 $
Author:
Kimmo Tuukkanen

Field Summary
 
Fields inherited from interface net.sf.marineapi.nmea.sentence.Sentence
ADDRESS_FIELD, BEGIN_CHAR, CHECKSUM_DELIMITER, FIELD_DELIMITER, MAX_LENGTH, TERMINATOR
 
Method Summary
 DataStatus getArrivalStatus()
          Get the arrival to waypoint status.
 double getBearing()
          Get true bearing to destination.
 double getCrossTrackError()
          Get cross track error (XTE).
 Waypoint getDestination()
          Get the destination waypoint.
 String getOriginId()
          Get the ID of origin waypoint.
 double getRange()
          Get range to destination waypoint.
 DataStatus getStatus()
          Get the sentence data status, valid or invalid.
 Direction getSteerTo()
          Get the direction to steer to correct error (left/right).
 double getVelocity()
          Get velocity towards destination.
 boolean hasArrived()
          Tells if the destination waypoint has been reached or not.
 void setArrivalStatus(DataStatus status)
          Set the arrival to waypoint status.
 void setBearing(double bearing)
          Set true bearing to destination, in degrees.
 void setCrossTrackError(double xte)
          Set cross track error (XTE), in nautical miles.
 void setDestination(Waypoint dest)
          Set the destination waypoint.
 void setOriginId(String id)
          Set the ID of origin waypoint.
 void setRange(double range)
          Set range to destination waypoint.
 void setStatus(DataStatus status)
          Set status of sentence data, valid or invalid.
 void setSteerTo(Direction steerTo)
          Set the direction to steer to correct error (left/right).
 void setVelocity(double velocity)
          Set velocity towards destination.
 
Methods inherited from interface net.sf.marineapi.nmea.sentence.Sentence
getFieldCount, getSentenceId, getTalkerId, isProprietary, isValid, setTalkerId, toSentence, toString
 

Method Detail

getArrivalStatus

DataStatus getArrivalStatus()
Get the arrival to waypoint status. Status is DataStatus.VOID (false) while not arrived at destination, otherwise DataStatus.ACTIVE (true).

Returns:
DataStatus.ACTIVE or DataStatus.VOID
Throws:
DataNotAvailableException - If the data is not available.
ParseException - If the field contains unexpected or illegal value.
See Also:
hasArrived()

getBearing

double getBearing()
Get true bearing to destination.

Returns:
True bearing in degrees.
Throws:
DataNotAvailableException - If the data is not available.
ParseException - If the field contains unexpected or illegal value.

getCrossTrackError

double getCrossTrackError()
Get cross track error (XTE).

Returns:
Cross track error, in nautical miles.
Throws:
DataNotAvailableException - If the data is not available.
ParseException - If the field contains unexpected or illegal value.

getDestination

Waypoint getDestination()
Get the destination waypoint.

Returns:
Waypoint
Throws:
DataNotAvailableException - If the data is not available.
ParseException - If the field contains unexpected or illegal value.

getOriginId

String getOriginId()
Get the ID of origin waypoint.

Returns:
Id String.
Throws:
DataNotAvailableException - If the data is not available.
ParseException - If the field contains unexpected or illegal value.

getRange

double getRange()
Get range to destination waypoint.

Returns:
Range to destination, in nautical miles.
Throws:
DataNotAvailableException - If the data is not available.
ParseException - If the field contains unexpected or illegal value.

getStatus

DataStatus getStatus()
Get the sentence data status, valid or invalid.

Returns:
DataStatus.ACTIVE or DataStatus.VOID
Throws:
DataNotAvailableException - If the data is not available.
ParseException - If the field contains unexpected or illegal value.

getSteerTo

Direction getSteerTo()
Get the direction to steer to correct error (left/right).

Returns:
Direction.LEFT or Direction.RIGHT
Throws:
DataNotAvailableException - If the data is not available.
ParseException - If the field contains unexpected or illegal value.

getVelocity

double getVelocity()
Get velocity towards destination. Notice that returned value may also be negative if vehicle is moving away from destination.

Returns:
Velocity value, in knots (nautical miles per hour).
Throws:
DataNotAvailableException - If the data is not available.
ParseException - If the field contains unexpected or illegal value.

hasArrived

boolean hasArrived()
Tells if the destination waypoint has been reached or not.

Returns:
True if has arrived to waypoint, otherwise false.
Throws:
DataNotAvailableException - If arrival status is not available.
ParseException - If the field contains unexpected or illegal value.

setArrivalStatus

void setArrivalStatus(DataStatus status)
Set the arrival to waypoint status. Set DataStatus.VOID if not arrived at destination, otherwise DataStatus.ACTIVE.

Parameters:
status - DataStatus.VOID or DataStatus.ACTIVE.
Throws:
IllegalArgumentException - If status is null.

setBearing

void setBearing(double bearing)
Set true bearing to destination, in degrees.

Parameters:
bearing - Bearing value, will be rounded to one decimal.
Throws:
IllegalArgumentException - If bearing value is out of bounds 0..360 degrees.

setCrossTrackError

void setCrossTrackError(double xte)
Set cross track error (XTE), in nautical miles. Negative values are translated to positive, set Steer-To to indicate the direction of error.

Parameters:
xte - Cross track error value, will be rounded to one decimal.
See Also:
setSteerTo(Direction)

setDestination

void setDestination(Waypoint dest)
Set the destination waypoint.

Parameters:
dest - Waypoint to set

setOriginId

void setOriginId(String id)
Set the ID of origin waypoint.

Parameters:
id - ID to set

setRange

void setRange(double range)
Set range to destination waypoint.

Parameters:
range - Range value, in nautical miles.

setStatus

void setStatus(DataStatus status)
Set status of sentence data, valid or invalid.

Parameters:
status - DataStatus.ACTIVE or DataStatus.VOID

setSteerTo

void setSteerTo(Direction steerTo)
Set the direction to steer to correct error (left/right).

Parameters:
steerTo - Direction.LEFT or Direction.RIGHT
Throws:
IllegalArgumentException - If specified direction is any other than defined valid for param steer.

setVelocity

void setVelocity(double velocity)
Set velocity towards destination. Notice that value may also be negative if vehicle is moving away from the destination.

Parameters:
velocity - Velocity, in knots (nautical miles per hour).


Copyright (C) 2010-2011 Java Marine API author(s). All Rights Reserved.