All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nl.esi.metis.aisparser.UtilsLongitude18 Maven / Gradle / Ivy

Go to download

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 (18-bit signed integer) longitude value that is encoded in 
 * {@link AISMessage17}, {@link AISMessage27}, and 
 * {@link DestinationArea} of {@link AISMessage22}, {@link AISMessage23}.
 * @author Pierre van de Laar
 * @author Pierre America
 * @author Brian C. Lane
 */
public class UtilsLongitude18 {
	/** The number of integer units in a minute (as a measure of angle). 
	 * The fact that this value is 10 means that the integer longitude values we are dealing with express an angle in units of 1/10 minute.	 */
	private static final long UnitsPerMinute = 10; //10 units/minute

	/** The number of minutes in a degree (as a measure of angle). */
	private static final long MinutesPerDegree = 60; //60 minutes/degree
	
	/** The multiplication factor to convert longitude values to degrees. */
	private static final double MultiplicationFactorToDegrees = 1.0 / (MinutesPerDegree * UnitsPerMinute);

	/** Converts the longitude value (in 1/10 minutes) to degrees.
	 * @param value the longitude value that is encoded in 
	 * {@link AISMessage17}, {@link AISMessage27}, and 
 	 * {@link DestinationArea} of {@link AISMessage22}, {@link AISMessage23}.
	 * @return the longitude value in degrees
	 */
	public static double toDegrees ( long value )
	{
		return value * UtilsLongitude18.MultiplicationFactorToDegrees; 
	}
	
	/** This constructor is made private to indicate that clients should not construct instances of this class. */
	private UtilsLongitude18 () {
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy