|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface VTGSentence
Course and speed over the ground. True and magnetic COG, speed provided in km/h and knots. Mode (the last "A" in example sentence) was added in NMEA 2.3 and may not always be available.
Example:
$GPVTG,46.96,T,,,16.89,N,31.28,K,A*43
Field Summary | |
---|---|
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" |
Fields inherited from interface net.sf.marineapi.nmea.sentence.Sentence |
---|
ADDRESS_FIELD, BEGIN_CHAR, CHECKSUM_DELIMITER, FIELD_DELIMITER, MAX_LENGTH, TERMINATOR |
Method Summary | |
---|---|
double |
getMagneticCourse()
Get the magnetic course over ground. |
GpsMode |
getMode()
Get the GPS receiver operating mode. |
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(GpsMode mode)
Set the GPS receiver operating mode. |
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. |
Methods inherited from interface net.sf.marineapi.nmea.sentence.Sentence |
---|
getFieldCount, getSentenceId, getTalkerId, isProprietary, isValid, setTalkerId, toSentence, toString |
Field Detail |
---|
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
Method Detail |
---|
double getMagneticCourse()
DataNotAvailableException
- If the data is not available.
ParseException
- If the field contains unexpected or illegal value.GpsMode getMode()
GpsMode
enum
DataNotAvailableException
- 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(GpsMode 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 degrees
IllegalArgumentException
- If specified course is out of bounds
0..360 degrees.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |