接口 RMCSentence
- 所有超级接口:
DateSentence,PositionSentence,Sentence,TimeSentence
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
- 作者:
- Kimmo Tuukkanen
-
字段概要
从接口继承的字段 net.sf.marineapi.nmea.sentence.Sentence
ALTERNATIVE_BEGIN_CHAR, BEGIN_CHAR, CHECKSUM_DELIMITER, FIELD_DELIMITER, MAX_LENGTH, TERMINATOR -
方法概要
修饰符和类型方法说明doubleGet the corrected course over ground.doubleGet true course over ground (COG).Get the direction of magnetic variation; east or west.getMode()Get the FAA operating mode for GPS.Get the Navigation Status.doublegetSpeed()Get current speed over ground (SOG).Gets the data status, valid or invalid.doubleGet the magnetic variation.voidsetCourse(double cog) Set true course over ground (COG).voidSet the direction of magnetic variation, east or west.voidSet the FAA operation mode of GPS.voidsetNavStatus(NavStatus navStatus) Set the Navigation Status.voidsetSpeed(double sog) Set current speed over ground (SOG).voidsetStatus(DataStatus status) Set the data status, valid or invalid.voidsetVariation(double var) Set the magnetic variation.从接口继承的方法 net.sf.marineapi.nmea.sentence.DateSentence
getDate, setDate从接口继承的方法 net.sf.marineapi.nmea.sentence.PositionSentence
getPosition, setPosition从接口继承的方法 net.sf.marineapi.nmea.sentence.Sentence
getBeginChar, getFieldCount, getSentenceId, getTalkerId, isAISSentence, isProprietary, isValid, reset, setBeginChar, setTalkerId, toSentence, toSentence, toString从接口继承的方法 net.sf.marineapi.nmea.sentence.TimeSentence
getTime, setTime
-
方法详细资料
-
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).- 返回:
- Corrected true course
- 抛出:
DataNotAvailableException- If course or variation data is not available.ParseException- If course or variation field contains unexpected or illegal value.- 另请参阅:
-
getCourse
double getCourse()Get true course over ground (COG).- 返回:
- True course in degrees
- 抛出:
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.- 返回:
- Direction.EAST or Direction.WEST
- 抛出:
DataNotAvailableException- If the data is not available.ParseException- If the field contains unexpected or illegal value.
-
getMode
FaaMode getMode()Get the FAA operating mode for GPS.- 返回:
- FaaMode enum
- 抛出:
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).- 返回:
- Speed in knots (nautical miles per hour).
- 抛出:
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.- 返回:
DataStatus.ACTIVEorDataStatus.VOID- 抛出:
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.- 返回:
- Magnetic variation in degrees
- 抛出:
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).- 参数:
cog- True course in degrees
-
setDirectionOfVariation
Set the direction of magnetic variation, east or west.- 参数:
dir-CompassPoint.EASTorCompassPoint.WEST- 抛出:
IllegalArgumentException- If specified Direction is other than defined as valid for paramdir.
-
setMode
Set the FAA operation mode of GPS.- 参数:
mode- FaaMode enum to set
-
setSpeed
void setSpeed(double sog) Set current speed over ground (SOG).- 参数:
sog- Speed in knots (nautical miles per hour).
-
setStatus
Set the data status, valid or invalid.- 参数:
status-DataStatus.ACTIVEorDataStatus.VOID
-
setVariation
void setVariation(double var) Set the magnetic variation.- 参数:
var- Magnetic variation in degrees
-