net.sf.marineapi.nmea.sentence
Interface BODSentence

All Superinterfaces:
Sentence

public interface BODSentence
extends Sentence

True and magnetic bearing from origin to destination in degrees. This sentence is transmitted by a GPS in the GOTO mode (with or without active route).

Example:
$GPBOD,234.9,T,228.8,M,RUSKI,*1D

Version:
$Revision: 43 $
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
 String getDestinationWaypointId()
          Get the ID of destination waypoint.
 double getMagneticBearing()
          Get the magnetic bearing from origin to destination.
 String getOriginWaypointId()
          Get the ID of origin waypoint.
 double getTrueBearing()
          Get the true bearing from origin to destination.
 void setDestinationWaypointId(String id)
          Sets the destination waypoint ID.
 void setMagneticBearing(double bearing)
          Sets the true bearing from origin to destination, in degrees.
 void setOriginWaypointId(String id)
          Sets the ID of origin waypoint.
 void setTrueBearing(double bearing)
          Sets the true bearing from origin to destination, in degrees.
 
Methods inherited from interface net.sf.marineapi.nmea.sentence.Sentence
getFieldCount, getSentenceId, getTalkerId, isProprietary, isValid, setTalkerId, toSentence, toString
 

Method Detail

getDestinationWaypointId

String getDestinationWaypointId()
Get the ID of destination waypoint. This field should be always available in GOTO mode.

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

getMagneticBearing

double getMagneticBearing()
Get the magnetic bearing from origin to destination.

Notice: The bearing is calculated from the origin when GOTO is activated and it is not updated dynamically.

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

getOriginWaypointId

String getOriginWaypointId()
Get the ID of origin waypoint. This field is available only when route is active.

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

getTrueBearing

double getTrueBearing()
Get the true bearing from origin to destination.

Notice: Typically the bearing is calculated when GOTO mode is activated and it is not updated dynamically.

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

setDestinationWaypointId

void setDestinationWaypointId(String id)
Sets the destination waypoint ID.

Parameters:
id - ID to set

setMagneticBearing

void setMagneticBearing(double bearing)
Sets the true bearing from origin to destination, in degrees.

Parameters:
bearing - Bearing value
Throws:
IllegalArgumentException - If bearing value out range 0..360 degrees.

setOriginWaypointId

void setOriginWaypointId(String id)
Sets the ID of origin waypoint.

Parameters:
id - ID to set.

setTrueBearing

void setTrueBearing(double bearing)
Sets the true bearing from origin to destination, in degrees.

Parameters:
bearing - Bearing value
Throws:
IllegalArgumentException - If bearing value out range 0..360 degrees.


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