类 SpeedOverGround

java.lang.Object
net.sf.marineapi.ais.util.SpeedOverGround

public class SpeedOverGround extends Object
Checks a speed-over-ground value for validity.
作者:
Jyrki Jakobsson
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    static boolean
    isAvailable(int value)
    Checks if the speed over ground value is available, i.e. within valid range.
    static boolean
    isCorrect(int value)
    Checks if the speed over ground value is valid, i.e. within range and not the default value ("no value").
    static double
    toKnots(int value)
    Converts the specified speed over ground in knots.
    static String
    toString(int value)
    Stringify the given SOG value.

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • SpeedOverGround

      public SpeedOverGround()
  • 方法详细资料

    • isAvailable

      public static boolean isAvailable(int value)
      Checks if the speed over ground value is available, i.e. within valid range.
      参数:
      value - SOG value to check
      返回:
      true if the time stamp falls within a range
    • isCorrect

      public static boolean isCorrect(int value)
      Checks if the speed over ground value is valid, i.e. within range and not the default value ("no value").
      参数:
      value - SOG value to check
      返回:
      true if correct, otherwise false.
    • toKnots

      public static double toKnots(int value)
      Converts the specified speed over ground in knots.
      参数:
      value - SOG value
      返回:
      SOG value in knots
    • toString

      public static String toString(int value)
      Stringify the given SOG value.
      参数:
      value - Value to convert
      返回:
      Formatted value, "no SOG" or ">=102.2"