接口 VTGSentence

所有超级接口:
Sentence

public interface VTGSentence extends 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
  • 字段详细资料

    • TRUE

      static final char TRUE
      Char indicator for "true"
      另请参阅:
    • MAGNETIC

      static final char MAGNETIC
      Char indicator for "magnetic"
      另请参阅:
    • KMPH

      static final char KMPH
      Units indicator for kilometers per hour
      另请参阅:
    • KNOT

      static final char KNOT
      Units indicator for knots (nautical miles per hour)
      另请参阅:
    • MODE_MANUAL

      static final char MODE_MANUAL
      Operating in manual mode (forced 2D or 3D).
      另请参阅:
    • MODE_AUTOMATIC

      static final char MODE_AUTOMATIC
      Operating 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.
      返回:
      FaaMode enum
      抛出:
      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

      void setMode(FaaMode mode)
      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.