net.sf.marineapi.nmea.sentence
Interface HDGSentence

All Superinterfaces:
HeadingSentence, Sentence

public interface HDGSentence
extends HeadingSentence

Vessel heading with magnetic deviation and variation.

Example:
$HCHDG,205.2,,,2.7,W

Author:
Kimmo Tuukkanen

Field Summary
 
Fields inherited from interface net.sf.marineapi.nmea.sentence.Sentence
ALTERNATIVE_BEGIN_CHAR, BEGIN_CHAR, CHECKSUM_DELIMITER, FIELD_DELIMITER, MAX_LENGTH, TERMINATOR
 
Method Summary
 double getDeviation()
          Get magnetic deviation.
 double getVariation()
          Get magnetic variation.
 void setDeviation(double deviation)
          Set magnetic deviation.
 void setVariation(double variation)
          Set magnetic variation.
 
Methods inherited from interface net.sf.marineapi.nmea.sentence.HeadingSentence
getHeading, isTrue, setHeading
 
Methods inherited from interface net.sf.marineapi.nmea.sentence.Sentence
getBeginChar, getFieldCount, getSentenceId, getTalkerId, isProprietary, isValid, reset, setBeginChar, setTalkerId, toSentence, toSentence, toString
 

Method Detail

getDeviation

double getDeviation()
Get magnetic deviation.

Returns:
Deviation, in degrees.

getVariation

double getVariation()
Get magnetic variation. Returns negative values for easterly variation and positive for westerly.

Returns:
Variation, in degrees.

setDeviation

void setDeviation(double deviation)
Set magnetic deviation. Provide negative values to set easterly deviation and positive to set westerly. Sets also the correct direction indicator according to value (East/West).

Parameters:
deviation - Deviation, in degrees.
Throws:
IllegalArgumentException - If value is out of range [-180..180].

setVariation

void setVariation(double variation)
Set magnetic variation. Provide negative values to set easterly variation and positive to set westerly. Sets also the correct direction indicator according to value (East/West).

Parameters:
variation - Variation, in degrees.
Throws:
IllegalArgumentException - If value is out of range [-180..180].


Copyright (C) 2010-2014 Java Marine API authors. All Rights Reserved.