nl.esi.metis.aisparser.impl.HandleSensorDataImpl 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.impl;
import nl.esi.metis.aisparser.HandleInvalidSensorData;
import nl.esi.metis.aisparser.HandleSensorData;
import nl.esi.metis.aisparser.HandleVDMLine;
import nl.esi.metis.aisparser.VDMLine;
import nl.esi.metis.aisparser.provenance.Provenance;
public class HandleSensorDataImpl implements HandleSensorData {
private HandleVDMLine handler;
private HandleInvalidSensorData errorHandler;
public HandleSensorDataImpl(HandleVDMLine handler, HandleInvalidSensorData errorHandler)
{
this.handler = handler;
this.errorHandler = errorHandler;
}
public void handleSensorData(Provenance source, String sensorData) {
if (VDMLine.isValid(sensorData))
{
handler.handleVDMLine( new VDMLine(source,sensorData) );
}
else
{
/* report invalid sensor data:
* not only to enable logging
* but also to enable health assessments: is my sensor suddenly generating more invalid lines than normal?
*/
errorHandler.handleInvalidSensorData(source, sensorData);
}
}
public void finished() {
handler.finished();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy