接口 RMBSentence
- 所有超级接口:
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
- 作者:
- Kimmo Tuukkanen
-
字段概要
从接口继承的字段 net.sf.marineapi.nmea.sentence.Sentence
ALTERNATIVE_BEGIN_CHAR, BEGIN_CHAR, CHECKSUM_DELIMITER, FIELD_DELIMITER, MAX_LENGTH, TERMINATOR -
方法概要
修饰符和类型方法说明Get the arrival to waypoint status.doubleGet true bearing to destination.doubleGet cross track error (XTE).Get the destination waypoint.Get the ID of origin waypoint.doublegetRange()Get range to destination waypoint.Get the sentence data status, valid or invalid.Get the direction to steer to correct error (left/right).doubleGet velocity towards destination.booleanTells if the destination waypoint has been reached or not.voidsetArrivalStatus(DataStatus status) Set the arrival to waypoint status.voidsetBearing(double bearing) Set true bearing to destination, in degrees.voidsetCrossTrackError(double xte) Set cross track error (XTE), in nautical miles.voidsetDestination(Waypoint dest) Set the destination waypoint.voidsetOriginId(String id) Set the ID of origin waypoint.voidsetRange(double range) Set range to destination waypoint.voidsetStatus(DataStatus status) Set status of sentence data, valid or invalid.voidsetSteerTo(Direction steerTo) Set the direction to steer to correct error (left/right).voidsetVelocity(double velocity) Set velocity towards destination.从接口继承的方法 net.sf.marineapi.nmea.sentence.Sentence
getBeginChar, getFieldCount, getSentenceId, getTalkerId, isAISSentence, isProprietary, isValid, reset, setBeginChar, setTalkerId, toSentence, toSentence, toString
-
方法详细资料
-
getArrivalStatus
DataStatus getArrivalStatus()Get the arrival to waypoint status. Status isDataStatus.VOID(false) while not arrived at destination, otherwiseDataStatus.ACTIVE(true).- 返回:
DataStatus.ACTIVEorDataStatus.VOID- 抛出:
DataNotAvailableException- If the data is not available.ParseException- If the field contains unexpected or illegal value.- 另请参阅:
-
getBearing
double getBearing()Get true bearing to destination.- 返回:
- True bearing in degrees.
- 抛出:
DataNotAvailableException- If the data is not available.ParseException- If the field contains unexpected or illegal value.
-
getCrossTrackError
double getCrossTrackError()Get cross track error (XTE).- 返回:
- Cross track error, in nautical miles.
- 抛出:
DataNotAvailableException- If the data is not available.ParseException- If the field contains unexpected or illegal value.
-
getDestination
Waypoint getDestination()Get the destination waypoint.- 返回:
- Waypoint
- 抛出:
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.- 返回:
- Id String.
- 抛出:
DataNotAvailableException- If the data is not available.ParseException- If the field contains unexpected or illegal value.
-
getRange
double getRange()Get range to destination waypoint.- 返回:
- Range to destination, in nautical miles.
- 抛出:
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.- 返回:
DataStatus.ACTIVEorDataStatus.VOID- 抛出:
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).- 返回:
- Direction.LEFT or Direction.RIGHT
- 抛出:
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.- 返回:
- Velocity value, in knots (nautical miles per hour).
- 抛出:
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.- 返回:
- True if has arrived to waypoint, otherwise false.
- 抛出:
DataNotAvailableException- If arrival status is not available.ParseException- If the field contains unexpected or illegal value.
-
setArrivalStatus
Set the arrival to waypoint status. SetDataStatus.VOIDif not arrived at destination, otherwiseDataStatus.ACTIVE.- 参数:
status-DataStatus.VOIDorDataStatus.ACTIVE.- 抛出:
IllegalArgumentException- If status isnull.
-
setBearing
void setBearing(double bearing) Set true bearing to destination, in degrees.- 参数:
bearing- Bearing value, will be rounded to one decimal.- 抛出:
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.- 参数:
xte- Cross track error value, will be rounded to one decimal.- 另请参阅:
-
setDestination
Set the destination waypoint.- 参数:
dest- Waypoint to set
-
setOriginId
Set the ID of origin waypoint.- 参数:
id- ID to set
-
setRange
void setRange(double range) Set range to destination waypoint.- 参数:
range- Range value, in nautical miles.
-
setStatus
Set status of sentence data, valid or invalid.- 参数:
status-DataStatus.ACTIVEorDataStatus.VOID
-
setSteerTo
Set the direction to steer to correct error (left/right).- 参数:
steerTo-Direction.LEFTorDirection.RIGHT- 抛出:
IllegalArgumentException- If specified direction is any other than defined valid for paramsteer.
-
setVelocity
void setVelocity(double velocity) Set velocity towards destination. Notice that value may also be negative if vehicle is moving away from the destination.- 参数:
velocity- Velocity, in knots (nautical miles per hour).
-