AIS报文定义整理

AIS消息具体定义参考标准 IEC61162 IEC91993-2

语句最长82字符(也有84字符),包括一个起始字符和两个结束字符 <CR><LF>
$/!<address field>[","<data field>]"*"<checksum field> <CR><LF>

$  conform to the conventional [parametric] and delimited field composition rules as described in 7.3.3
$aaccc,[","<data field>]"*"<checksum field> <CR><LF>

!  conform to the special-purpose [encapsulation and non-delimited] field composition rules as described in 7.3.3
!aaccc,x1,x2,x3,x5[","<data field>]x4"*"<checksum field> <CR><LF>

x1: total number of sentences field
x2: sentence number field
x3: sequential message identifier field
x4: fill bits field
x5: AIS channel A 或 B

aa:  talker(见下表)
ccc: mnemonic code 语句格式标识(见下表)

MT-1 ATS Main口共有8条输出语句
!AIVDM: AIS VHF data-link message 该句型含有船舶动态信息和静态信息、航行信息
!AIVDO: AIS VHF data-link Own-vessel report 该句型含有本船报告信息
!AIABM: AIS addressed binary and safety related message  支持寻址二进制电文
$AIABK
$AIACA
$AITXT
$AIALR
$AISSD

【talker】
AI:船载A或B类
AB:独立的AIS基站
BS:AIS基站(早期)
更多见标准

【mnemonic code】
$--AAM: waypoint arrival alarm
$--ABK: AIS addressed and binary broadcast acknowledgement
!--ABM: AIS addressed binary and safety related message 支持寻址二进制电文
$--ACA: AIS channel assignment message
$--ACK: Acknowledge alarm
$--ACN: Alert command
$--ACS:AIS channel management information source
$--AIR: AIS interrogation request
$--AKD: AIS Acknowledge detail alarm condition
$--ALA: Report detailed alarm condition
$--ALC: Cyclic alert list
$--ALF: Alert sentence
$--ALR: Set alarm state
$--APB: Heading/track controller(autopilot)sentence B
$--ARC: Alert command refused
!--BBM:AIS broadcast binary message 广播二进制电文
$--BEC: Bearing and distance to waypoint - Dead reckoning
$--BOD: Bearing origin to destination
$--BWC: Bearing and distance to waypoint - Great circle
$--BWR: Bearing and distance to waypoint - Rhumb line
$--BWW: Bearing waypoint to waypoint
$--CUR: Water current layer - Multi-layer water current data
$--DBT: Depth below transducer
$--DDC: Desplay dimming control
$--DOR: Door status detecion
$--DPT: Depth
$--DSC: Digital selective calling information
$--DSE: Expanded digital selective calling
$--DTM: Datum reference
$--EPV: Command or report equipment property value
$--ETL: Engine telegraph operation status
$--EVE: General event message
$--FIR: Fire detecion
$--FSI: Frequency set information
$--GBS: GNSS satellite fault detection
$--GEN: Generic binary information
$--GFA: GNSS fix accuracy and integrity
$--GGA: Global positioning system (GPS) fix data
$--GLL: Geographic position - Latitude/longitude
$--GNS: GNSS fix data
$--GRS: GNSS range residuals
$--GSA: GNSS DOP and active satellites
$--GST: GNSS pseudorange nois statistics
$--GSV: GNSS satellites in view
$--HBT: Heartbeat supervision sentence
$--HDG: Heading deviation and variation
$--HDT: Heading ture
$--HMR: Heading monitor receive
$--HMS: Heading monitor set
$--HSC: Heading steering command
$--HSS: Hull stress surveillance systems
$--HTC/HTD: Heading/track control command
$--HTD: Heading/track control data
$--LR1: AIS long-range reply sentence 1
$--LR2: AIS long-range reply sentence 2
$--LR3: AIS long-range reply sentence 3
$--LRF: AIS long-range funcion
$--LRI: AIS long-range interrogation
$--MEB: Message input for broadcast command
$--MSK: MSK receiver interface
$--MSS: MSK receiver signal status
$--MTW: Water temperature
$--MWD: Wind direction and speed
$--MWV: Wind speed and angle
$--NAK: Negative acknowledgement
$--NRM: NAVTEX receiver mask
$--NRX: NAVTEX receiver message
$--OSD: Own ship data
$--POS: Device position and ship dimensions report or configuration command
$--PRC: Propuision remote control status
$--RMA: Recommended minimum specific LORAN-C data
$--RMB: Recommended minimum navigation information
$--RMC: Recommended minimum specific GNSS data
$--ROR: Rudder order status
$--ROT: Rate of trun
$--RPM: Revolutions
$--RSA: Rudder sensor angle
$--RSD: Radar system data
$--RTE: Routes
$--SFI: Scanning frequency information
$--SSD: AIS ship static data(this sentence isused to enter parameters into a shipboard AIS unit.
        The parameters in this sentence support a number of the ITU-R M.1371 Messages)
$--STN: Multiple data ID
$--THS: True heading and status
$--TLB: Target label
$--TLL: Target latitude and longitude
$--TRC: Thruster control data
$--TRD: Thruster response data
$--TTD: Tracked target data
$--TTM: Tracked target message
$--TUT: Transmission of multi-language text
$--TXT: Text transmission
$--UID: User indentification code transmission
$--VBW: Dual ground/water speed
!--VDM: AIS VHF data-link message 该句型含有船舶动态信息和静态信息、航行信息
!--VDO: AIS VHF data-link Own-vessel report 该句型含有本船报告信息
$--VDR: Set and drift
$--VER: Version
$--VHW: Water speed and heading
$--VLW: Dual ground/water distance
$--VPW: Speed measured parallel to wind
$--VSD: AIS voyage static data
$--VTG: Gourse over ground and ground speed
$--WAT: Water level detection
$--WCV: Waypoint closure velocity
$--WNC: Distance waypoint to waypoint
$--WPL: Waypoint location
$--XDR: Transducer measurements
$--XTE: Cross-track error, measured
$--XTR: Cross-track error, dead reckoning
$--ZDA: Time and date
$--ZDL: Time and distance to variable point
$--ZFO: UTC and time from origin waypoint
$--ZTG: UTC and time to destination waypoint

【AIS消息类型】
1、2、3 船位动态
4 基站报         
5 静态报
6 二进制编址        
7 对消息6的二进制确认   
8 广播二进制        
9 SAR飞机位置        
10 UTC时间询问
11 UTC时间回应
12 编址安全信息
13 对消息12的安全确认
14 安全广播
15 询问            
16 分配模式指令        
17 卫星广播二进制    
18 B类船位
19 扩展B类船位
20 数据链管理信息    
21 助航设备报告        
22 信道管理
23 群组指配
24 B类静态,分A和B两类
25 单时隙二进制
26 多时隙二进制
27 远距离位置报
28-63 未定义

解析 AIS (Automatic Identification System) 报文可以使用 Java 编程语言实现。AIS 是一种海上船舶自动识别系统,用于提供船舶的位置、速度、航向等信息,以确保船舶安全。 在 Java 中解析 AIS 报文,首先需要了解 AIS 报文的结构和数据格式。AIS 报文由一系列特定的字段组成,每个字段包含不同的信息。可以通过定义类或使用现有的库来表示这些字段,在 Java 中进行解析和处理。 解析 AIS 报文的主要步骤如下: 1. 从数据源(例如文件、网络请求或数据库)读取 AIS 报文数据。 2. 将读取的数据按照特定的格式进行解析,提取出每个字段的值。可以使用 Java 中提供的字符串处理函数来分割数据,或使用正则表达式匹配字段的位置和长度。 3. 根据 AIS 报文的规范,将每个字段的值映射到相应的数据类型。例如,将数字字段解析为整数或浮点数,将日期字段解析为日期对象。 4. 将解析后的字段值存储在 Java 对象中,以便后续处理和分析。 5. 进行额外的处理,例如验证字段的有效性、计算衍生字段(如船舶的目的地)、过滤无效或重复的报文等。 6. 根据需求将解析后的数据输出,可以是保存到数据库、导出为其他格式的文件(如 CSV 或 JSON)或直接用于应用程序的其他模块。 在实现解析 AIS 报文的过程中,可以借助一些开源的 Java 库,如 Apache Commons CSV、Jackson、Gson 等来简化处理过程。这些库提供了现成的函数和类,可以用于处理 CSV、JSON 等常见数据格式,将 AIS 报文转换为 Java 对象。 总之,使用 Java 编程语言解析 AIS 报文需要对 AIS 报文的结构和数据格式有一定的了解,并使用合适的方法和工具来解析和处理报文数据,从而实现对船舶信息的提取和分析。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值