public abstract class AisPositionMessage extends AisMessage implements IVesselPositionMessage
An AIS position message is defined by ITU-R M.1371-4 in annex 8 - AIS messages section 3.1
This is a generalization for message types 1-3 and possibly more in the future.
Type 1: Scheduled position report (Class A shipborne mobile equipment) Type 2: Assigned scheduled position report (Class A shipborne mobile equipment) Type 3: Special position report, response to interrogation;(Class A shipborne mobile equipment)
| Modifier and Type | Field and Description |
|---|---|
protected int |
cog
Course over Ground Course over ground in 1/10 = (0-3599). 3600 (E10h) = not available = default. 3601-4095 should
not be used
|
protected int |
navStatus
Navigational status: 0 = under way using engine 1 = at anchor 2 = not under command 3 = restricted
manoeuvrability 4 = constrained by her draught 5 = moored 6 = aground 7 = engaged in fishing 8 = under way
sailing 9 = reserved for future amendment of navigational status for ships carrying DG, HS, or MP, or IMO hazard
or pollutant category C, high speed craft (HSC), 10 = reserved for future amendment of navigational status for
ships carrying dangerous goods (DG), harmful substances (HS) or marine pollutants (MP), or IMO hazard or
pollutant category A, wing in grand (WIG); 11-13 = reserved for future use 14 = AIS-SART (active) 15 = not
defined = default (also used by AIS-SART under test)
|
protected AisPosition |
pos
Stores the positions in a general manner
|
protected int |
posAcc
AisPosition Accuracy: The position accuracy (PA) flag should be determined in accordance with Table 47 1 = high (
=< 10 m) 0 = low (>10 m) 0 = default
|
protected int |
raim
RAIM-flag: Receiver autonomous integrity monitoring (RAIM) flag of electronic position fixing device; 0 = RAIM
not in use = default; 1 = RAIM in use.
|
protected int |
rot
Rate of Turn (ROT): 0 to +126 = turning right at up to 708 degrees per min or higher 0 to -126 = turning left at
up to 708 degrees per min or higher Values between 0 and 708 degrees per min coded by ROTais = 4.733
SQRT(ROTsensor) degrees per min where ROTsensor is the Rate of Turn as input by an external Rate of Turn
Indicator (TI).
|
protected int |
sog
Speed Over Ground Speed over ground in 1/10 knot steps (0-102.2 knots) 1023 = not available, 1022 = 102.2 knots
or higher
|
protected int |
spare
Not used.
|
protected int |
specialManIndicator
Special manoeuvre indicator: 0 = not available = default 1 = not engaged in special manoeuvre 2 = engaged in
special manoeuvre (i.e.: regional passing arrangement on Inland Waterway)
NOTE: This field is added in ITU-R M1371-4
|
protected int |
syncState
SOTDMA/ITDMA sync state: sync state is part of the defined communication state (19) bits.
|
protected int |
trueHeading
True heading Degrees (0-359) (511 indicates not available = default)
|
protected int |
utcSec
Time stamp: UTC second when the report was generated by the EPFS (0-59 or 60 if time stamp is not available,
which should also be the default value or 61 if positioning system is in manual input mode or 62 if electronic
position fixing system operates in estimated (dead reckoning) mode or 63 if the positioning system is
inoperative) 61, 62, 63 are not used by CS AIS
|
msgId, repeat, userId, VALID_MESSAGE_TYPES, vdm| Constructor and Description |
|---|
AisPositionMessage(int msgId)
Instantiates a new Ais position message.
|
AisPositionMessage(Vdm vdm)
Instantiates a new Ais position message.
|
| Modifier and Type | Method and Description |
|---|---|
protected SixbitEncoder |
encode()
Base encode method to be called by all extending classes
|
int |
getCog()
Course over ground
|
int |
getNavStatus()
Gets nav status.
|
AisPosition |
getPos()
Get position
|
int |
getPosAcc()
Position accuracy
|
int |
getRaim()
Get raim
|
int |
getRot()
Gets rot.
|
Float |
getSensorRot()
Gets sensor rot.
|
int |
getSog()
Speed over ground
|
int |
getSpare()
Gets spare.
|
int |
getSpecialManIndicator()
Gets special man indicator.
|
int |
getSyncState()
Gets sync state.
|
int |
getTrueHeading()
True heading
|
int |
getUtcSec()
UTC sec
|
dk.dma.enav.model.geometry.Position |
getValidPosition()
Returns a valid position if this message has a valid position, otherwise null.
|
boolean |
isCogValid()
Course over ground valid
|
boolean |
isHeadingValid()
Heading valid
|
boolean |
isPositionValid()
Determine if position is valid
|
boolean |
isRotValid()
Is rot valid boolean.
|
boolean |
isSogValid()
Speed over ground valid
|
void |
parse(BinArray binArray)
Base parse method to be called by all extending classes
|
void |
setCog(int cog)
Sets cog.
|
void |
setNavStatus(int navStatus)
Sets nav status.
|
void |
setPos(AisPosition pos)
Sets pos.
|
void |
setPosAcc(int posAcc)
Sets pos acc.
|
void |
setRaim(int raim)
Sets raim.
|
void |
setRot(int rot)
Sets rot.
|
void |
setSog(int sog)
Sets sog.
|
void |
setSpare(int spare)
Sets spare.
|
void |
setSpecialManIndicator(int specialManIndicator)
Sets special man indicator.
|
void |
setSyncState(int syncState)
Sets sync state.
|
void |
setTrueHeading(int trueHeading)
Sets true heading.
|
void |
setUtcSec(int utcSec)
Sets utc sec.
|
String |
toString() |
getEncoded, getInstance, getMsgId, getRepeat, getSourceTag, getTags, getTargetType, getUserId, getVdm, reassemble, setRepeat, setTag, setTags, setUserId, trimTextprotected int navStatus
protected int rot
+127 = turning right at more than 5 degrees per 30 s (No TI available) -127 = turning left at more than 5 degrees per 30 s (No TI available) -128 (80 hex) indicates no turn information available (default).
ROT data should not be derived from COG information.
protected int sog
protected int posAcc
protected AisPosition pos
protected int cog
protected int trueHeading
protected int utcSec
protected int specialManIndicator
NOTE: This field is added in ITU-R M1371-4
protected int spare
NOTE: In ITU-R M1371-4 this field is 3 bits compared to 1 previously
protected int raim
protected int syncState
0 UTC direct (see 3.1.1.1) 1 UTC indirect (see 3.1.1.2) 2 Station is synchronized to a base station (base direct) 3 Station is synchronized to another station based on the highest number of received stations or to another mobile station, which is directly synchronized to a base station
public AisPositionMessage(int msgId)
msgId - the msg idpublic AisPositionMessage(Vdm vdm)
vdm - the vdmpublic void parse(BinArray binArray) throws AisMessageException, SixbitException
AisMessageparse in class AisMessagebinArray - the bin arrayAisMessageException - the ais message exceptionSixbitException - the sixbit exceptionprotected SixbitEncoder encode()
AisMessageencode in class AisMessagepublic String toString()
toString in class AisMessagepublic int getNavStatus()
public void setNavStatus(int navStatus)
navStatus - the nav statuspublic int getRot()
public Float getSensorRot()
public void setRot(int rot)
rot - the rotpublic int getSog()
IVesselPositionMessagegetSog in interface IVesselPositionMessagepublic void setSog(int sog)
sog - the sogpublic int getPosAcc()
IPositionMessagegetPosAcc in interface IPositionMessagepublic void setPosAcc(int posAcc)
posAcc - the pos accpublic final dk.dma.enav.model.geometry.Position getValidPosition()
AisMessagegetValidPosition in interface IVesselPositionMessagegetValidPosition in class AisMessagepublic AisPosition getPos()
IPositionMessagegetPos in interface IPositionMessagepublic void setPos(AisPosition pos)
pos - the pospublic int getCog()
IVesselPositionMessagegetCog in interface IVesselPositionMessagepublic void setCog(int cog)
cog - the cogpublic int getTrueHeading()
IVesselPositionMessagegetTrueHeading in interface IVesselPositionMessagepublic void setTrueHeading(int trueHeading)
trueHeading - the true headingpublic int getUtcSec()
IVesselPositionMessagegetUtcSec in interface IVesselPositionMessagepublic void setUtcSec(int utcSec)
utcSec - the utc secpublic int getSpecialManIndicator()
public void setSpecialManIndicator(int specialManIndicator)
specialManIndicator - the specialManIndicator to setpublic int getSpare()
public void setSpare(int spare)
spare - the sparepublic int getRaim()
IVesselPositionMessagegetRaim in interface IVesselPositionMessagepublic void setRaim(int raim)
raim - the raimpublic int getSyncState()
public void setSyncState(int syncState)
syncState - the sync statepublic boolean isPositionValid()
IVesselPositionMessageisPositionValid in interface IVesselPositionMessagepublic boolean isCogValid()
IVesselPositionMessageisCogValid in interface IVesselPositionMessagepublic boolean isSogValid()
IVesselPositionMessageisSogValid in interface IVesselPositionMessagepublic boolean isHeadingValid()
IVesselPositionMessageisHeadingValid in interface IVesselPositionMessagepublic boolean isRotValid()
Copyright © 2011–2019 Danish Maritime Authority. All rights reserved.