Goby3  3.1.5a
2024.05.23
ais.proto
Go to the documentation of this file.
1 syntax = "proto2";
2 import "dccl/option_extensions.proto";
3 
4 package goby.util.ais.protobuf;
5 
6 enum Status
7 {
8  AIS_STATUS__UNDER_WAY_USING_ENGINE = 0;
9  AIS_STATUS__AT_ANCHOR = 1;
10  AIS_STATUS__NOT_UNDER_COMMAND = 2;
11  AIS_STATUS__RESTRICTED_MANOEUVERABILITY = 3;
12  AIS_STATUS__CONSTRAINED_BY_HER_DRAUGHT = 4;
13  AIS_STATUS__MOORED = 5;
14  AIS_STATUS__AGROUND = 6;
15  AIS_STATUS__ENGAGED_IN_FISHING = 7;
16  AIS_STATUS__UNDER_WAY_SAILING = 8;
17  AIS_STATUS__RESERVED_FOR_HIGH_SPEED_CRAFT = 9;
18  AIS_STATUS__RESERVED_FOR_WING_IN_GROUND = 10;
19  AIS_STATUS__RESERVED_11 = 11;
20  AIS_STATUS__RESERVED_12 = 12;
21  AIS_STATUS__RESERVED_13 = 13;
22  AIS_STATUS__SART_IS_ACTIVE = 14;
23  AIS_STATUS__NOT_DEFINED = 15;
24 }
25 
26 // Used for AIS messages 1,2,3,18,and 19 (Class A and B Position Report)
27 message Position
28 {
29  option (dccl.msg) = {
30  id: 518
31  codec_version: 3
32  max_bytes: 1500
33  unit_system: "si"
34  };
35 
36  optional int32 message_id = 2 [(dccl.field) = {min: 1 max: 27}, default = 0]; // 1,2,3,18,19
37 
38  optional int32 mmsi = 3 [(dccl.field) = {min: 201000000 max: 775999999}];
39  optional Status nav_status = 4 [default = AIS_STATUS__NOT_DEFINED];
40 
41  enum TurnInfo
42  {
43  TURN_INFO__NOT_TURNING = 0;
44  TURN_INFO__TURNING_AT_GIVEN_RATE = 1;
45  TURN_INFO__TURNING_RIGHT_AT_MORE_THAN_5_DEG_PER_30_SEC = 127;
46  TURN_INFO__TURNING_LEFT_AT_MORE_THAN_5_DEG_PER_30_SEC = -127;
47  TURN_INFO__NO_TURN_INFORMATION = 0x80;
48  }
49 
50  optional TurnInfo turn_info = 5 [default = TURN_INFO__NO_TURN_INFORMATION];
51  optional float turn_rate = 6 [(dccl.field) = {
52  min: -0.21
53  max: 0.21
54  precision: 3
55  units {derived_dimensions: "angular_velocity"}
56  }];
57  optional float speed_over_ground = 7 [(dccl.field) = {
58  min: 0
59  max: 52.6
60  precision: 1
61  units {derived_dimensions: "velocity"}
62  }];
63  enum PositionAccuracy
64  {
65  ACCURACY__LOW__ABOVE_10_METERS = 0;
66  ACCURACY__HIGH__BELOW_10_METERS = 1;
67  }
68  optional PositionAccuracy position_accuracy = 8
69  [default = ACCURACY__LOW__ABOVE_10_METERS];
70 
71  optional double lat = 9 [(dccl.field) = {
72  min: -90
73  max: 90
74  precision: 6
75  units {derived_dimensions: "plane_angle" system: "angle::degree"}
76  }];
77  optional double lon = 10 [(dccl.field) = {
78  min: -180
79  max: 180
80  precision: 6
81  units {derived_dimensions: "plane_angle" system: "angle::degree"}
82  }];
83 
84  optional float course_over_ground = 11 [(dccl.field) = {
85  min: 0
86  max: 360
87  precision: 0
88  units {derived_dimensions: "plane_angle" system: "angle::degree"}
89  }];
90  optional float true_heading = 12 [(dccl.field) = {
91  min: 0
92  max: 360
93  units {derived_dimensions: "plane_angle" system: "angle::degree"}
94  }];
95  optional int32 report_second = 13
96  [(dccl.field) = {omit: true units {derived_dimensions: "time"}}];
97 
98  optional bool raim = 14
99  [(dccl.field).omit =
100  true]; // Receiver Autonomous Integrity Monitoring (RAIM)
101 }
102 
103 // Used for AIS message 5 and 24 (Class A and B Static and Voyage Related Data)
104 message Voyage
105 {
106  option (dccl.msg) = {
107  id: 519
108  codec_version: 3
109  max_bytes: 1500
110  unit_system: "si"
111  };
112 
113  optional int32 message_id = 2 [(dccl.field) = {min: 1 max: 27}, default = 0]; // 5,24
114 
115  optional int32 mmsi = 3 [(dccl.field) = {min: 201000000 max: 775999999}];
116 
117  optional int32 imo = 4 [(dccl.field).omit = true];
118  optional string callsign = 5 [(dccl.field).max_length = 7];
119  optional string name = 6 [(dccl.field).max_length = 20];
120 
121  enum ShipType
122  {
123  TYPE__NOT_AVAILABLE = 0;
124  TYPE__RESERVED_1 = 1;
125  TYPE__RESERVED_2 = 2;
126  TYPE__RESERVED_3 = 3;
127  TYPE__RESERVED_4 = 4;
128  TYPE__RESERVED_5 = 5;
129  TYPE__RESERVED_6 = 6;
130  TYPE__RESERVED_7 = 7;
131  TYPE__RESERVED_8 = 8;
132  TYPE__RESERVED_9 = 9;
133  TYPE__RESERVED_10 = 10;
134  TYPE__RESERVED_11 = 11;
135  TYPE__RESERVED_12 = 12;
136  TYPE__RESERVED_13 = 13;
137  TYPE__RESERVED_14 = 14;
138  TYPE__RESERVED_15 = 15;
139  TYPE__RESERVED_16 = 16;
140  TYPE__RESERVED_17 = 17;
141  TYPE__RESERVED_18 = 18;
142  TYPE__RESERVED_19 = 19;
143  TYPE__WING_IN_GROUND = 20;
144  TYPE__WING_IN_GROUND_HAZARDOUS_CATEGORY_A = 21;
145  TYPE__WING_IN_GROUND_HAZARDOUS_CATEGORY_B = 22;
146  TYPE__WING_IN_GROUND_HAZARDOUS_CATEGORY_C = 23;
147  TYPE__WING_IN_GROUND_HAZARDOUS_CATEGORY_D = 24;
148  TYPE__WING_IN_GROUND_RESERVED_25 = 25;
149  TYPE__WING_IN_GROUND_RESERVED_26 = 26;
150  TYPE__WING_IN_GROUND_RESERVED_27 = 27;
151  TYPE__WING_IN_GROUND_RESERVED_28 = 28;
152  TYPE__WING_IN_GROUND_RESERVED_29 = 29;
153  TYPE__FISHING = 30;
154  TYPE__TOWING = 31;
155  TYPE__TOWING_LENGTH_EXCEEDS_200M_OR_BREADTH_EXCEEDS_25M = 32;
156  TYPE__DREDGING_OR_UNDERWATER_OPS = 33;
157  TYPE__DIVING_OPS = 34;
158  TYPE__MILITARY_OPS = 35;
159  TYPE__SAILING = 36;
160  TYPE__PLEASURE_CRAFT = 37;
161  TYPE__RESERVED_38 = 38;
162  TYPE__RESERVED_39 = 39;
163  TYPE__HIGH_SPEED_CRAFT = 40;
164  TYPE__HIGH_SPEED_CRAFT_HAZARDOUS_CATEGORY_A = 41;
165  TYPE__HIGH_SPEED_CRAFT_HAZARDOUS_CATEGORY_B = 42;
166  TYPE__HIGH_SPEED_CRAFT_HAZARDOUS_CATEGORY_C = 43;
167  TYPE__HIGH_SPEED_CRAFT_HAZARDOUS_CATEGORY_D = 44;
168  TYPE__HIGH_SPEED_CRAFT_RESERVED_45 = 45;
169  TYPE__HIGH_SPEED_CRAFT_RESERVED_46 = 46;
170  TYPE__HIGH_SPEED_CRAFT_RESERVED_47 = 47;
171  TYPE__HIGH_SPEED_CRAFT_RESERVED_48 = 48;
172  TYPE__HIGH_SPEED_CRAFT_NO_ADDITIONAL_INFORMATION = 49;
173  TYPE__PILOT_VESSEL = 50;
174  TYPE__SEARCH_AND_RESCUE_VESSEL = 51;
175  TYPE__TUG = 52;
176  TYPE__PORT_TENDER = 53;
177  TYPE__ANTI_POLLUTION_EQUIPMENT = 54;
178  TYPE__LAW_ENFORCEMENT = 55;
179  TYPE__SPARE56_LOCAL_VESSEL = 56;
180  TYPE__SPARE57_LOCAL_VESSEL = 57;
181  TYPE__MEDICAL_TRANSPORT = 58;
182  TYPE__NONCOMBATANT_SHIP_ACCORDING_TO_RR_RESOLUTION_NO_18 = 59;
183  TYPE__PASSENGER = 60;
184  TYPE__PASSENGER_HAZARDOUS_CATEGORY_A = 61;
185  TYPE__PASSENGER_HAZARDOUS_CATEGORY_B = 62;
186  TYPE__PASSENGER_HAZARDOUS_CATEGORY_C = 63;
187  TYPE__PASSENGER_HAZARDOUS_CATEGORY_D = 64;
188  TYPE__PASSENGER_RESERVED_65 = 65;
189  TYPE__PASSENGER_RESERVED_66 = 66;
190  TYPE__PASSENGER_RESERVED_67 = 67;
191  TYPE__PASSENGER_RESERVED_68 = 68;
192  TYPE__PASSENGER_NO_ADDITIONAL_INFORMATION = 69;
193  TYPE__CARGO = 70;
194  TYPE__CARGO_HAZARDOUS_CATEGORY_A = 71;
195  TYPE__CARGO_HAZARDOUS_CATEGORY_B = 72;
196  TYPE__CARGO_HAZARDOUS_CATEGORY_C = 73;
197  TYPE__CARGO_HAZARDOUS_CATEGORY_D = 74;
198  TYPE__CARGO_RESERVED_65 = 75;
199  TYPE__CARGO_RESERVED_66 = 76;
200  TYPE__CARGO_RESERVED_67 = 77;
201  TYPE__CARGO_RESERVED_68 = 78;
202  TYPE__CARGO_NO_ADDITIONAL_INFORMATION = 79;
203  TYPE__TANKER = 80;
204  TYPE__TANKER_HAZARDOUS_CATEGORY_A = 81;
205  TYPE__TANKER_HAZARDOUS_CATEGORY_B = 82;
206  TYPE__TANKER_HAZARDOUS_CATEGORY_C = 83;
207  TYPE__TANKER_HAZARDOUS_CATEGORY_D = 84;
208  TYPE__TANKER_RESERVED_65 = 85;
209  TYPE__TANKER_RESERVED_66 = 86;
210  TYPE__TANKER_RESERVED_67 = 87;
211  TYPE__TANKER_RESERVED_68 = 88;
212  TYPE__TANKER_NO_ADDITIONAL_INFORMATION = 89;
213  TYPE__OTHER = 90;
214  TYPE__OTHER_HAZARDOUS_CATEGORY_A = 91;
215  TYPE__OTHER_HAZARDOUS_CATEGORY_B = 92;
216  TYPE__OTHER_HAZARDOUS_CATEGORY_C = 93;
217  TYPE__OTHER_HAZARDOUS_CATEGORY_D = 94;
218  TYPE__OTHER_RESERVED_65 = 95;
219  TYPE__OTHER_RESERVED_66 = 96;
220  TYPE__OTHER_RESERVED_67 = 97;
221  TYPE__OTHER_RESERVED_68 = 98;
222  TYPE__OTHER_NO_ADDITIONAL_INFORMATION = 99;
223  }
224 
225  optional ShipType type = 7 [default = TYPE__NOT_AVAILABLE];
226  optional uint32 to_bow = 8
227  [(dccl.field) = {min: 0 max: 511 units {derived_dimensions: "length"}}];
228  optional uint32 to_stern = 9
229  [(dccl.field) = {min: 0 max: 511 units {derived_dimensions: "length"}}];
230  optional uint32 to_port = 10
231  [(dccl.field) = {min: 0 max: 63 units {derived_dimensions: "length"}}];
232  optional uint32 to_starboard = 11
233  [(dccl.field) = {min: 0 max: 63 units {derived_dimensions: "length"}}];
234 
235  enum FixType
236  {
237  FIX__UNDEFINED = 0;
238  FIX__GPS = 1;
239  FIX__GLONASS = 2;
240  FIX__COMBINED_GPS_AND_GLONASS = 3;
241  FIX__LORAN_C = 4;
242  FIX__CHAYKA = 5;
243  FIX__INTEGRATED_NAVIGATION_SYSTEM = 6;
244  FIX__SURVEYED = 7;
245  FIX__GALILEO = 8;
246  }
247  optional FixType fix_type = 12 [default = FIX__UNDEFINED];
248  optional uint32 eta_month = 13 [(dccl.field) = {min: 1 max: 12}];
249  optional uint32 eta_day = 14 [(dccl.field) = {min: 1 max: 31}];
250  optional uint32 eta_hour = 15 [(dccl.field) = {min: 0 max: 23}];
251  optional uint32 eta_minute = 16 [(dccl.field) = {min: 0 max: 59}];
252  optional float draught = 17 [(dccl.field) = {
253  min: 0
254  max: 25.5
255  precision: 1
256  units {derived_dimensions: "length"}
257  }];
258  optional string destination = 18 [(dccl.field).max_length = 20];
259 }