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

nl.esi.metis.aisparser.UtilsLatitude17 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 (17-bit signed integer) latitude 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 UtilsLatitude17 {
	/** The number of integer units in a minute (as a measure of angle). 
	 * The fact that this value is 10 means that the integer latitude values we are dealing with express an angle in units of 1/10 minute.	 */
	private static final long UnitsPerMinute = 10;
	
	/** The number of minutes in a degree (as a measure of angle). */
	private static final long MinutesPerDegree = 60;
	
	/** The multiplication factor to convert latitude values to degrees. */
	private static final double MultiplicationFactorToDegrees = 1.0 / (MinutesPerDegree * UnitsPerMinute);

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy