类 SpeedOverGround
java.lang.Object
net.sf.marineapi.ais.util.SpeedOverGround
Checks a speed-over-ground value for validity.
- 作者:
- Jyrki Jakobsson
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static booleanisAvailable(int value) Checks if the speed over ground value is available, i.e. within valid range.static booleanisCorrect(int value) Checks if the speed over ground value is valid, i.e. within range and not the default value ("no value").static doubletoKnots(int value) Converts the specified speed over ground in knots.static StringtoString(int value) Stringify the given SOG value.
-
构造器详细资料
-
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- 返回:
trueif correct, otherwisefalse.
-
toKnots
public static double toKnots(int value) Converts the specified speed over ground in knots.- 参数:
value- SOG value- 返回:
- SOG value in knots
-
toString
Stringify the given SOG value.- 参数:
value- Value to convert- 返回:
- Formatted value, "no SOG" or ">=102.2"
-