Class AISDataUnit
- All Implemented Interfaces:
 Serializable,Cloneable,Comparable
- See Also:
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringWhen provided, the AIS channel is indicated as either "1" or "2." This channel indication is relative to the operating conditions of the transponder when the packet is received.protected StringContents of the M.1371 radio message using the six-bit field typeprotected StringAIVDM, etc.protected intNumber of "fill-bits" added to complete the last six-bit characterprotected booleanFlag used when a limit is placed on range.protected intPulled out from the start of the AIVDM string.intprotected booleanprotected intMessage sentence numberprotected intThe "message sequential identifier" is a number from 0 to 9 that is sequentially assigned as needed.protected StationTypeprotected intTotal number of sentences needed to transfer the messageFields inherited from class PamguardMVC.PamDataUnit
absBlockIndex, localisation - 
Constructor Summary
ConstructorsConstructorDescriptionAISDataUnit(long timeMilliseconds) Constructor used in data collection - doesn't do muchAISDataUnit(long timeMillis, String charData, int fillBits) Constructor used when reading back from binary files. - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddPositionReport(AISPositionReport positionReport) protected AISDataUnitclone()booleanDecode the binary data which are currently in a character stringfindPositionReport(long timeMillis) booleanvoidsetStaticData(AISStaticData staticData) voidupdate(AISDataUnit newAISUnit) Update an existing AIS data unit with new data.Methods inherited from class PamguardMVC.PamDataUnit
addDataAnnotation, addSuperDetection, amplifyMeasuredAmplitudeByDB, amplifyMeasuredAmplitudeByLinear, calcSnapshotGeometry, clearOandAngles, clearUpdateCount, compareTo, findDataAnnotation, findDataAnnotation, freeData, getAbsBlockIndex, getAmplitudeDB, getAnnotationsSummaryString, getBasicData, getCalculatedAmlitudeDB, getChannelBitmap, getColourIndex, getDataAnnotation, getDatabaseIndex, getDatabaseUpdateOf, getDataUnitFileInformation, getDataUnitPopupMenu, getDurationInMilliseconds, getEndTimeInMilliseconds, getFrequency, getFrequencyOverlap, getGpsPosition, getHydrophoneBitmap, getHydrophoneHeading, getLastChangeTime, getLastSample, getLastUpdateTime, getLocalisation, getMeasuredAmplitude, getMeasuredAmplitudeType, getNoiseBackground, getNumDataAnnotations, getOriginLatLong, getParentDataBlock, getSampleDuration, getSampleDurationAsInt, getSeconds, getSequenceBitmap, getSequenceBitmapObject, getSignalExcess, getSignalSPL, getSnapshotGeometry, getStartSample, getSummaryString, getSuperDetection, getSuperDetection, getSuperDetection, getSuperDetection, getSuperDetection, getSuperDetectionsCount, getSuperDetectionSyncronisation, getSuperId, getTimeDelaysSeconds, getTimeMilliseconds, getTimeNanoseconds, getTimeOverlap, getUID, getUpdateCount, isEmbryonic, isForceAmpRecalc, linAmplitudeToDB, removeDataAnnotation, removeDataAnnotation, removeSuperDetection, setAbsBlockIndex, setCalculatedAmlitudeDB, setChannelBitmap, setDatabaseIndex, setDatabaseUpdateOf, setDataUnitFileInformation, setDurationInMilliseconds, setEmbryonic, setForceAmpRecalc, setFrequency, setInfo, setLastUpdateTime, setLocalisation, setMeasuredAmpAndType, setMeasuredAmplitude, setMeasuredAmplitudeType, setNoiseBackground, setParentDataBlock, setSampleDuration, setSequenceBitmap, setSignalExcess, setSignalSPL, setSnapshotGeometry, setStartSample, setTimeDelaysSeconds, setTimeMilliseconds, setUID, setUniqueSuperDetection, sortOutputMaps, updateDataUnit 
- 
Field Details
- 
isInRange
protected boolean isInRangeFlag used when a limit is placed on range. If it's clearly out of range, then this flag is set and no more updates are made from static data.the flag can be set false again if new position data come within range.
 - 
newUnit
protected boolean newUnit - 
dataType
AIVDM, etc. - 
stationType
 - 
messageId
protected int messageIdPulled out from the start of the AIVDM string. - 
totalSentences
protected int totalSentencesTotal number of sentences needed to transfer the message - 
sentenceNumber
protected int sentenceNumberMessage sentence number - 
sequentialIdentifier
protected int sequentialIdentifierThe "message sequential identifier" is a number from 0 to 9 that is sequentially assigned as needed. This identifier is incremented for each new multi-sentence message. The count resets to 0, after 9 is used. For radio broadcast messages requiring multiple sentences, each sentence of the message contains the same sequential identification number. The purpose of this number is to link the separate sentences containing portions of the same radio message. This allows for the possibility that other sentences might be interleaved with the message sentences that contain the complete message contents. This number also links an ABK-sentence acknowledgement to the appropriate BBM-sentence. - 
aisChannel
When provided, the AIS channel is indicated as either "1" or "2." This channel indication is relative to the operating conditions of the transponder when the packet is received. This field shall be null when the channel identification is not provided. - 
charData
Contents of the M.1371 radio message using the six-bit field typeThe maximum string length of encapsulation is limited such that the total number of sentence characters does not exceed 82. This field supports a maximum of 62 valid characters for messages transferred using multiple sentences, and 63 valid characters for messages using a single sentence.
 - 
fillBits
protected int fillBitsNumber of "fill-bits" added to complete the last six-bit characterEach character in the preceding six-bit coded character string represents six binary bits. This parameter indicates the number of bits that were added to the end of the binary packet as a result of creating the last character of the string. When the coding of the last six-bit character of the message packet does not create additional "fill-bits," this value shall be set to zero. The value "0" indicates that no "fill-bits" were added. This field may not be null.
 - 
mmsiNumber
public int mmsiNumber 
 - 
 - 
Constructor Details
- 
AISDataUnit
public AISDataUnit(long timeMilliseconds) Constructor used in data collection - doesn't do much - 
AISDataUnit
Constructor used when reading back from binary files.- Parameters:
 timeMillis- time millischarData- 6 bit character data stringfillBits- fill bits to ignore at end of string
 
 - 
 - 
Method Details
- 
getStationtypeString
 - 
decodeMessage
public boolean decodeMessage()Decode the binary data which are currently in a character string- Returns:
 - true if the message was decoded successfully
 
 - 
isComplete
public boolean isComplete() - 
update
Update an existing AIS data unit with new data.- Parameters:
 newAISUnit-
 - 
clone
 - 
getPositionReport
 - 
findPositionReport
 - 
getStaticData
 - 
getPositionReports
 - 
addPositionReport
 - 
setStaticData
 
 -