Module dk.tbsalling.ais.messages
Class ShipAndVoyageData
java.lang.Object
dk.tbsalling.aismessages.ais.messages.AISMessage
dk.tbsalling.aismessages.ais.messages.ShipAndVoyageData
- All Implemented Interfaces:
CachedDecodedValues,DataReport,StaticDataReport,Serializable
public class ShipAndVoyageData extends AISMessage implements StaticDataReport
Message has a total of 424 bits, occupying two AIVDM sentences. In practice,
the information in these fields (especially ETA and destination) is not
reliable, as it has to be hand-updated by humans rather than gathered
automatically from sensors.
- Author:
- tbsalling
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description ShipAndVoyageData(dk.tbsalling.aismessages.nmea.messages.NMEAMessage[] nmeaMessages)protectedShipAndVoyageData(dk.tbsalling.aismessages.nmea.messages.NMEAMessage[] nmeaMessages, String bitString) -
Method Summary
Modifier and Type Method Description protected voidcheckAISMessage()This method performs a rudimentary sanity check of the AIS data payload contained in the NMEA sentence(s).StringgetCallsign()BooleangetDataTerminalReady()StringgetDestination()FloatgetDraught()StringgetEta()Deprecated.IntegergetEtaDay()IntegergetEtaHour()IntegergetEtaMinute()IntegergetEtaMonth()Optional<ZonedDateTime>getEtaAfterReceived()IMOgetImo()AISMessageTypegetMessageType()PositionFixingDevicegetPositionFixingDevice()IntegergetRawDraught()StringgetShipName()ShipTypegetShipType()IntegergetToBow()IntegergetToPort()IntegergetToStarboard()IntegergetToStern()TransponderClassgetTransponderClass()StringtoString()Methods inherited from class dk.tbsalling.aismessages.ais.messages.AISMessage
create, create, dataFields, decodePayloadToBitString, digest, equals, getBits, getBitString, getMetadata, getNmeaMessages, getNmeaTagBlock, getNumberOfBits, getRepeatIndicator, getSourceMmsi, getZeroBitStuffedString, hashCode, isValid, setMetadata, setTagBlock, tagBlockToStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dk.tbsalling.aismessages.ais.messages.CachedDecodedValues
getDecodedValue, getDecodedValueByWeakReference
-
Constructor Details
-
ShipAndVoyageData
public ShipAndVoyageData(dk.tbsalling.aismessages.nmea.messages.NMEAMessage[] nmeaMessages) -
ShipAndVoyageData
protected ShipAndVoyageData(dk.tbsalling.aismessages.nmea.messages.NMEAMessage[] nmeaMessages, String bitString)
-
-
Method Details
-
checkAISMessage
protected void checkAISMessage()Description copied from class:AISMessageThis method performs a rudimentary sanity check of the AIS data payload contained in the NMEA sentence(s). These tests are mainly based on bitwise message length, even though other types of tests may occur.- Overrides:
checkAISMessagein classAISMessage
-
getMessageType
- Specified by:
getMessageTypein classAISMessage
-
getTransponderClass
- Specified by:
getTransponderClassin interfaceDataReport
-
getImo
-
getCallsign
- Specified by:
getCallsignin interfaceStaticDataReport
-
getShipName
- Specified by:
getShipNamein interfaceStaticDataReport
-
getShipType
- Specified by:
getShipTypein interfaceStaticDataReport
-
getToBow
- Specified by:
getToBowin interfaceStaticDataReport
-
getToStern
- Specified by:
getToSternin interfaceStaticDataReport
-
getToStarboard
- Specified by:
getToStarboardin interfaceStaticDataReport
-
getToPort
- Specified by:
getToPortin interfaceStaticDataReport
-
getPositionFixingDevice
-
getEtaMonth
- Returns:
- The UTC ETA Month (1-12) 0 = not available.
-
getEtaDay
- Returns:
- The UTC ETA Day (1-31) 0 = not available.
-
getEtaHour
- Returns:
- The UTC ETA Hour (0-23) 24 = not available.
-
getEtaMinute
- Returns:
- The UTC ETA Minute (0-59) 60 = not available.
-
getEta
Deprecated. -
getEtaAfterReceived
- Returns:
- The vessel AIS ETA, with the year filled in based on the metadata received time. If the AIS Month and day are the received date or later, the first calendar date after the received is used for the year. Unavailable hour (24) or minute (60) will be treated as 0 Examples: Received on 2018-06-01 and ETA AIS is 06-03, this will return 2018-06-03 Received on 2018-12-31 and ETA AIS is 01-02, this will return 2019-01-02 Received on 2018-06-01 and ETA AIS is 05-31, this will return 2019-05-31 Received on 2018-06-01 and ETA AIS is 06-03 24:00, this will return 2018-06-01 00:00 Received on 2018-06-01 and ETA AIS is 06-03 12:60, this will return 2018-06-03 12:00
-
getDraught
-
getRawDraught
-
getDestination
-
getDataTerminalReady
-
toString
- Overrides:
toStringin classAISMessage
-