public interface VTGSentence extends Sentence
Example:
$GPVTG,46.96,T,,,16.89,N,31.28,K,A*43
Modifier and Type | Field and Description |
---|---|
static char |
KMPH
Units indicator for kilometers per hour
|
static char |
KNOT
Units indicator for knots (nautical miles per hour)
|
static char |
MAGNETIC
Char indicator for "magnetic"
|
static char |
MODE_AUTOMATIC
Operating in automatic mode (2D/3D).
|
static char |
MODE_MANUAL
Operating in manual mode (forced 2D or 3D).
|
static char |
TRUE
Char indicator for "true"
|
ALTERNATIVE_BEGIN_CHAR, BEGIN_CHAR, CHECKSUM_DELIMITER, FIELD_DELIMITER, MAX_LENGTH, TERMINATOR
Modifier and Type | Method and Description |
---|---|
double |
getMagneticCourse()
Get the magnetic course over ground.
|
FaaMode |
getMode()
Get the FAA operating mode of GPS receiver.
|
double |
getSpeedKmh()
Get current speed over ground, in kilometers per hour.
|
double |
getSpeedKnots()
Get speed over ground in knots.
|
double |
getTrueCourse()
Get the true course over ground.
|
void |
setMagneticCourse(double mcog)
Set the magnetic course over ground.
|
void |
setMode(FaaMode mode)
Set the FAA operating mode of GPS receiver.
|
void |
setSpeedKmh(double kmh)
Set the current speed over ground.
|
void |
setSpeedKnots(double knots)
Set the speed over ground, in knots.
|
void |
setTrueCourse(double tcog)
Set the true course over ground.
|
getBeginChar, getFieldCount, getSentenceId, getTalkerId, isAISSentence, isProprietary, isValid, reset, setBeginChar, setTalkerId, toSentence, toSentence, toString
static final char TRUE
static final char MAGNETIC
static final char KMPH
static final char KNOT
static final char MODE_MANUAL
static final char MODE_AUTOMATIC
double getMagneticCourse()
DataNotAvailableException
- If the data is
not available.ParseException
- If the field contains
unexpected or illegal value.FaaMode getMode()
FaaMode
enumDataNotAvailableException
- If the data is
not available.ParseException
- If the field contains
unexpected or illegal value.double getSpeedKmh()
DataNotAvailableException
- If the data is
not available.ParseException
- If the field contains
unexpected or illegal value.double getSpeedKnots()
DataNotAvailableException
- If the data is
not available.ParseException
- If the field contains
unexpected or illegal value.double getTrueCourse()
DataNotAvailableException
- If the data is
not available.ParseException
- If the field contains
unexpected or illegal value.void setMagneticCourse(double mcog)
mcog
- Course in degrees.void setMode(FaaMode mode)
mode
- Mode to setvoid setSpeedKmh(double kmh)
kmh
- Speed in kilometers per hour (km/h).void setSpeedKnots(double knots)
knots
- Speed in knots (nautical miles per hour)void setTrueCourse(double tcog)
tcog
- True course, in degreesIllegalArgumentException
- If specified course is out of bounds
0..360 degrees.Copyright (C) 2010-2017 Java Marine API authors. All Rights Reserved.