接口 VTGSentence
- 所有超级接口:
Sentence
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
- 作者:
- Kimmo Tuukkanen
-
字段概要
字段修饰符和类型字段说明static final charUnits indicator for kilometers per hourstatic final charUnits indicator for knots (nautical miles per hour)static final charChar indicator for "magnetic"static final charOperating in automatic mode (2D/3D).static final charOperating in manual mode (forced 2D or 3D).static final charChar indicator for "true"从接口继承的字段 net.sf.marineapi.nmea.sentence.Sentence
ALTERNATIVE_BEGIN_CHAR, BEGIN_CHAR, CHECKSUM_DELIMITER, FIELD_DELIMITER, MAX_LENGTH, TERMINATOR -
方法概要
修饰符和类型方法说明doubleGet the magnetic course over ground.getMode()Get the FAA operating mode of GPS receiver.doubleGet current speed over ground, in kilometers per hour.doubleGet speed over ground in knots.doubleGet the true course over ground.voidsetMagneticCourse(double mcog) Set the magnetic course over ground.voidSet the FAA operating mode of GPS receiver.voidsetSpeedKmh(double kmh) Set the current speed over ground.voidsetSpeedKnots(double knots) Set the speed over ground, in knots.voidsetTrueCourse(double tcog) Set the true course over ground.从接口继承的方法 net.sf.marineapi.nmea.sentence.Sentence
getBeginChar, getFieldCount, getSentenceId, getTalkerId, isAISSentence, isProprietary, isValid, reset, setBeginChar, setTalkerId, toSentence, toSentence, toString
-
字段详细资料
-
TRUE
static final char TRUEChar indicator for "true"- 另请参阅:
-
MAGNETIC
static final char MAGNETICChar indicator for "magnetic"- 另请参阅:
-
KMPH
static final char KMPHUnits indicator for kilometers per hour- 另请参阅:
-
KNOT
static final char KNOTUnits indicator for knots (nautical miles per hour)- 另请参阅:
-
MODE_MANUAL
static final char MODE_MANUALOperating in manual mode (forced 2D or 3D).- 另请参阅:
-
MODE_AUTOMATIC
static final char MODE_AUTOMATICOperating in automatic mode (2D/3D).- 另请参阅:
-
-
方法详细资料
-
getMagneticCourse
double getMagneticCourse()Get the magnetic course over ground.- 返回:
- Magnetic course
- 抛出:
DataNotAvailableException- If the data is not available.ParseException- If the field contains unexpected or illegal value.
-
getMode
FaaMode getMode()Get the FAA operating mode of GPS receiver. The field may not be available, depending on the NMEA version.- 返回:
FaaModeenum- 抛出:
DataNotAvailableException- If the data is not available.ParseException- If the field contains unexpected or illegal value.- 从以下版本开始:
- NMEA 2.3
-
getSpeedKmh
double getSpeedKmh()Get current speed over ground, in kilometers per hour.- 返回:
- Speed in km/h
- 抛出:
DataNotAvailableException- If the data is not available.ParseException- If the field contains unexpected or illegal value.
-
getSpeedKnots
double getSpeedKnots()Get speed over ground in knots.- 返回:
- Speed in knots (nautical miles per hour)
- 抛出:
DataNotAvailableException- If the data is not available.ParseException- If the field contains unexpected or illegal value.
-
getTrueCourse
double getTrueCourse()Get the true course over ground.- 返回:
- True course, in degrees
- 抛出:
DataNotAvailableException- If the data is not available.ParseException- If the field contains unexpected or illegal value.
-
setMagneticCourse
void setMagneticCourse(double mcog) Set the magnetic course over ground.- 参数:
mcog- Course in degrees.
-
setMode
Set the FAA operating mode of GPS receiver.- 参数:
mode- Mode to set- 从以下版本开始:
- NMEA 2.3
-
setSpeedKmh
void setSpeedKmh(double kmh) Set the current speed over ground.- 参数:
kmh- Speed in kilometers per hour (km/h).
-
setSpeedKnots
void setSpeedKnots(double knots) Set the speed over ground, in knots.- 参数:
knots- Speed in knots (nautical miles per hour)
-
setTrueCourse
void setTrueCourse(double tcog) Set the true course over ground.- 参数:
tcog- True course, in degrees- 抛出:
IllegalArgumentException- If specified course is out of bounds 0..360 degrees.
-