nl.esi.metis.aisparser.UtilsLatitude27 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of EsiAisParser Show documentation
Show all versions of EsiAisParser Show documentation
This package supports the parsing of AIS messages in Java. AIS, the Automatic Identification System, is a system aiming at improving maritime safety by exchanging messages between ships, other vehicles in particular aircraft involved in search-and-rescue (SAR), and (fixed) base stations. To be precise, this package support the ITU-R M.1371-4 AIS standard.
See our extensive javadoc and in particular the class AISParser for more information on how to use this package.
The parser was used in the Poseidon project, and is improved in the Metis project to better handle uncertain information. Both projects were led by the Embedded Systems Institute. In both projects Thales Nederlands was the carrying industrial partner, and multiple Dutch universities participated.
The newest version!
package nl.esi.metis.aisparser;
/** This class provides functions to analyze the (27-bit signed integer) latitude value that is encoded in
* {@link AISMessagePositionReport}, {@link AISMessageUTCReport}, {@link AISMessage09},
* {@link AISMessage18}, {@link AISMessage19}, or {@link AISMessage21}.
* @author Pierre van de Laar
* @author Pierre America
* @author Brian C. Lane
*/
public class UtilsLatitude27 {
/** The number of integer units in a minute (as a measure of angle).
* The fact that this value is 10000 means that the integer latitude values we are dealing with express an angle in units of 1/10000 minute. */
private static final int UnitsPerMinute = 10000; //10 000 units/minute
/** The number of minutes in a degree (as a measure of angle). */
private static final int MinutesPerDegree = 60; //60 minutes/degree
/** The multiplication factor to convert latitude values to degrees. */
private static final double MultiplicationFactorToDegrees = 1.0 / (MinutesPerDegree * UnitsPerMinute);
/** Converts the latitude value (in 1/10000 minutes) to degrees.
* @param value the latitude value that is is encoded in
* {@link AISMessagePositionReport}, {@link AISMessageUTCReport}, {@link AISMessage09},
* {@link AISMessage18}, {@link AISMessage19}, or {@link AISMessage21}.
* @return the latitude value in degrees
*/
public static double toDegrees ( int value )
{
return value * UtilsLatitude27.MultiplicationFactorToDegrees;
}
/** This constructor is made private to indicate that clients should not construct instances of this class. */
private UtilsLatitude27 () {
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy