net.sf.marineapi.nmea.sentence
Interface RMCSentence

All Superinterfaces:
DateSentence, PositionSentence, Sentence, TimeSentence

public interface RMCSentence
extends PositionSentence, TimeSentence, DateSentence

Recommended minimum navigation information type C. Current time and date, position, speed over ground, true course over ground and magnetic variation.

Example:
$GPRMC,120044,A,6011.552,N,02501.941,E,000.0,360.0,160705,006.1,E*7C

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
 
Fields inherited from interface net.sf.marineapi.nmea.sentence.Sentence
ADDRESS_FIELD, BEGIN_CHAR, CHECKSUM_DELIMITER, FIELD_DELIMITER, MAX_LENGTH, TERMINATOR
 
Fields inherited from interface net.sf.marineapi.nmea.sentence.Sentence
ADDRESS_FIELD, BEGIN_CHAR, CHECKSUM_DELIMITER, FIELD_DELIMITER, MAX_LENGTH, TERMINATOR
 
Method Summary
 double getCorrectedCourse()
          Get the corrected course over ground.
 double getCourse()
          Get true course over ground (COG).
 CompassPoint getDirectionOfVariation()
          Get the direction of magnetic variation; east or west.
 GpsMode getGpsMode()
          Get the GPS operating mode.
 double getSpeed()
          Get current speed over ground (SOG).
 DataStatus getStatus()
          Gets the data status, valid or invalid.
 double getVariation()
          Get the magnetic variation.
 void setCourse(double cog)
          Set true course over ground (COG).
 void setDirectionOfVariation(CompassPoint dir)
          Set the direction of magnetic variation, east or west.
 void setGpsMode(GpsMode mode)
          Set the GPS operation mode.
 void setSpeed(double sog)
          Set current speed over ground (SOG).
 void setStatus(DataStatus status)
          Set the data status, valid or invalid.
 void setVariation(double var)
          Set the magnetic variation.
 
Methods inherited from interface net.sf.marineapi.nmea.sentence.PositionSentence
getPosition, setPosition
 
Methods inherited from interface net.sf.marineapi.nmea.sentence.Sentence
getFieldCount, getSentenceId, getTalkerId, isProprietary, isValid, setTalkerId, toSentence, toString
 
Methods inherited from interface net.sf.marineapi.nmea.sentence.TimeSentence
getTime, setTime
 
Methods inherited from interface net.sf.marineapi.nmea.sentence.Sentence
getFieldCount, getSentenceId, getTalkerId, isProprietary, isValid, setTalkerId, toSentence, toString
 
Methods inherited from interface net.sf.marineapi.nmea.sentence.DateSentence
getDate, setDate
 
Methods inherited from interface net.sf.marineapi.nmea.sentence.Sentence
getFieldCount, getSentenceId, getTalkerId, isProprietary, isValid, setTalkerId, toSentence, toString
 

Method Detail

getCorrectedCourse

double getCorrectedCourse()
Get the corrected course over ground. Correction is done by subtracting or adding the magnetic variation from true course (easterly variation subtracted and westerly added).

Returns:
Corrected true course
Throws:
DataNotAvailableException - If course or variation data is not available.
ParseException - If course or variation field contains unexpected or illegal value.
See Also:
getCourse(), getVariation()

getCourse

double getCourse()
Get true course over ground (COG).

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

getDirectionOfVariation

CompassPoint getDirectionOfVariation()
Get the direction of magnetic variation; east or west.

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

getGpsMode

GpsMode getGpsMode()
Get the GPS operating mode.

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

getSpeed

double getSpeed()
Get current speed over ground (SOG).

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

getStatus

DataStatus getStatus()
Gets the 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.

getVariation

double getVariation()
Get the magnetic variation. Easterly variation subtracts from true course, and is thus returned as negative value. Otherwise, the value is positive.

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

setCourse

void setCourse(double cog)
Set true course over ground (COG).

Parameters:
cog - True course in degrees

setDirectionOfVariation

void setDirectionOfVariation(CompassPoint dir)
Set the direction of magnetic variation, east or west.

Parameters:
dir - CompassPoint.EAST or CompassPoint.WEST
Throws:
IllegalArgumentException - If specified Direction is other than defined as valid for param dir.

setGpsMode

void setGpsMode(GpsMode mode)
Set the GPS operation mode.

Parameters:
mode - Mode to set

setSpeed

void setSpeed(double sog)
Set current speed over ground (SOG).

Parameters:
sog - Speed in knots (nautical miles per hour).

setStatus

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

Parameters:
status - DataStatus.ACTIVE or DataStatus.VOID

setVariation

void setVariation(double var)
Set the magnetic variation.

Parameters:
var - Magnetic variation in degrees


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