Repository navigation
Expand file tree
/
Copy pathstructs-inc.xml
More file actions
217 lines (178 loc) · 7.49 KB
/
Copy pathstructs-inc.xml
File metadata and controls
217 lines (178 loc) · 7.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<a-bunch-of-structs>
<struct name="msg8_header">
<description>Standard AIS header for all AIS binary broadcast messages</description>
<field name="MessageID" numberofbits="6" type="uint">
<description>AIS message number. Must be 8</description>
<required>8</required>
</field>
<field name="RepeatIndicator" numberofbits="2" type="uint">
<description>Indicated how many times a message has been repeated</description>
<unavailable>0</unavailable>
<lookuptable>
<entry key="0">default</entry>
<entry key="3">do not repeat any more</entry>
</lookuptable>
<testvalue>1</testvalue>
</field>
<field name="UserID" numberofbits="30" type="uint">
<description>Unique ship identification number (MMSI)</description>
<testvalue>1193046</testvalue> <!-- Default value for all NAUTICAST devices -->
</field>
<field name="Spare" numberofbits="2" type="uint">
<description>Reserved for definition by a regional authority.</description>
<required>0</required>
</field>
</struct>
<struct name="position2d" postgis_type="POINT">
<description>Generic representation of position on the WGS84 sphereoid</description>
<field name="longitude" numberofbits="28" type="decimal">
<description>East West location</description>
<range min="-180" max="180"/>
<unavailable>181</unavailable>
<units>degrees</units>
<scale>600000</scale>
<decimalplaces>5</decimalplaces>
<testvalue>-122.16328055555556</testvalue> <!-- Stanford - Trancos -->
</field>
<field name="latitude" numberofbits="27" type="decimal">
<description>North South location</description>
<range min="-90" max="90"/>
<unavailable>91</unavailable>
<units>degrees</units>
<scale>600000</scale>
<decimalplaces>5</decimalplaces>
<testvalue>37.424458333333334</testvalue> <!-- Stanford - Trancos -->
</field>
</struct>
<!-- FIX: add ranges -->
<struct name="time">
<description>UTC Time stamp - more than just msg 4?</description>
<field name="year" numberofbits="14" type="uint">
<description>year 1-9999</description>
<unavailable>0</unavailable>
<testvalue>2</testvalue>
</field>
<field name="month" numberofbits="4" type="uint">
<description>month 1..12</description>
<unavailable>0</unavailable>
<testvalue>2</testvalue>
</field>
<field name="day" numberofbits="5" type="uint">
<description>day of the month 1..31</description>
<unavailable>0</unavailable>
<testvalue>28</testvalue>
</field>
<field name="hour" numberofbits="5" type="uint">
<description>UTC hours 0..23</description>
<unavailable>24</unavailable>
<testvalue>23</testvalue>
</field>
<field name="min" numberofbits="6" type="uint">
<description>minutes</description>
<unavailable>60</unavailable>
<testvalue>45</testvalue>
</field>
<field name="sec" numberofbits="6" type="uint">
<description>seconds</description>
<unavailable>60</unavailable>
<testvalue>54</testvalue>
</field>
</struct> <!-- time -->
<struct name="sotdmaState">
<field name="syncstate" numberofbits="2" type="uint">
<description>Synchronization state</description>
<lookuptable>
<entry key="0">UTC direct</entry>
<entry key="1">UTC indirect</entry>
<entry key="2">synchronized to a base station</entry>
<entry key="3">synchronized to another station</entry>
</lookuptable>
<testvalue>2</testvalue>
</field>
<field name="slottimeout" numberofbits="3" type="uint">
<description>Frames remaining until a new slot is selected</description>
<units>frames</units>
<lookuptable>
<entry key="0">Last frame in this slot</entry>
<entry key="1">1 frames left</entry>
<entry key="2">2 frames left</entry>
<entry key="3">3 frames left</entry>
<entry key="4">4 frames left</entry>
<entry key="5">5 frames left</entry>
<entry key="6">6 frames left</entry>
<entry key="7">7 frames left</entry>
</lookuptable>
<testvalue>0</testvalue>
</field>
<!-- ============================== -->
<!-- SOTDMA Sub message in Table 11 14bits -->
<!-- ============================== -->
<!-- FIX: cannot current handle case statements. -->
<field name="slotoffset" numberofbits="14" type="uint">
<description>In what slot will the next transmission occur. BROKEN</description>
<case><fieldname>slottimeout</fieldname><values>0</values></case>
<range min="0" max="2249"/>
<testvalue>1221</testvalue>
</field>
<!-- === FIX: Cannot currently handle case statements === -->
<turn_this_case_stuff_off>
<field name="emptytime" numberofbits="2" type="uint">
<description>These bits not defined in the specification.</description>
<case><fieldname>slottimeout</fieldname><values>1</values></case>
<default>0</default>
</field>
<field name="min" numberofbits="7" type="uint">
<description>UTC time minutes field</description>
<case><fieldname>slottimeout</fieldname><values>1</values></case>
<range min="0" max="59"/>
<units>minutes</units>
</field>
<field name="hour" numberofbits="5" type="uint">
<description>UTC time hour field</description>
<case><fieldname>slottimeout</fieldname><values>1</values></case>
<range min="0" max="23"/>
<units>hours</units>
</field>
<!-- <case values="2 4 6"> -->
<field name="slotnumber" numberofbits="14" type="uint">
<description>Slot number used for this transmission</description>
<case><fieldname>slottimeout</fieldname><values>2 4 6</values></case>
<range min="0" max="2249"/>
</field>
<!-- <case values="3 5 7"> -->
<field name="receivedstations" numberofbits="14" type="uint">
<alias>numstations</alias>
<description>Number of other stations currently receiving</description>
<case><fieldname>slottimeout</fieldname><values>3 5 7</values></case>
<range min="0" max="16383"/>
</field>
</turn_this_case_stuff_off>
</struct> <!-- sotdma state -->
<struct name="pos_small" postgis_type="POINT">
<description>Generic representation of position on the WGS84
sphereoid. Smaller number of bits. Used by SLS and IMO binary
messages</description>
<field name="longitude" numberofbits="25" type="decimal">
<description>East West location</description>
<range min="-180" max="180"/>
<unavailable>181</unavailable>
<units>degrees</units>
<scale>60000</scale>
<decimalplaces>4</decimalplaces>
<testvalue>-122.16328</testvalue> <!-- Stanford - Trancos -->
</field>
<field name="latitude" numberofbits="24" type="decimal">
<description>North South location</description>
<range min="-90" max="90"/>
<unavailable>91</unavailable>
<units>degrees</units>
<scale>60000</scale>
<decimalplaces>4</decimalplaces>
<testvalue>37.42446</testvalue> <!-- Stanford - Trancos -->
</field>
</struct>
<!-- ====================================================================== -->
<!-- BINARY BROADCAST MESSAGE HEADER -->
<!-- ====================================================================== -->
<!-- should this go here ? And have a no name mangling option? -->
</a-bunch-of-structs>