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

nl.esi.metis.aisparser.impl.AISMessage24Impl 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!
/* ESI AIS Parser
 * 
 * Copyright 2011/2012 by Pierre van de Laar & Pierre America (Embedded Systems Institute)
 * Copyright 2008 by Brian C. Lane 
 * All Rights Reserved
 * 
 */
package nl.esi.metis.aisparser.impl;

import nl.esi.metis.aisparser.Sixbit;
import nl.esi.metis.aisparser.provenance.VDMMessageProvenance;

/** AIS Message 24: Static Data Report
 * 
 * Field Nr     Field Name                              Nr of Bits (from, to )
 * ------------------------------------------------------------------------
 *  1           messageID                                        6 (   1,   6)
 *  2           repeatIndicator                                  2 (   7,   8)
 *  3           userID                                          30 (   9,  38)
 *  4           partNumber                                       2 (  39,  40)
 *	5 ..		part specific fields                           ...  
 *                                                            ---- +
 *                                           number of bits     40
 * 
* @author Pierre van de Laar * @author Pierre America */ class AISMessage24Impl extends AISMessageImpl { /** Checks whether the content could be a valid message of type 24. * @param content possible message type 24 * @return true if this could be a valid message of type 24 */ public static boolean valid(Sixbit content) { return ( content.length() >= PARTNUMBER_TO ); } protected static final int PARTNUMBER_FROM = 39; protected static final int PARTNUMBER_TO = 40; public AISMessage24Impl(Sixbit content, VDMMessageProvenance prov) { super(content, prov); assert(getMessageID() == 24); } /** * Change Part Id to value * @param sb vector to change * @param value new value with PartA == 0 and PartB == 1 * @precondition valid(sb) */ public static void setPart(Sixbit sb, int value) { sb.setIntFromTo(value, PARTNUMBER_FROM,PARTNUMBER_TO); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy