File size: 11,839 Bytes
7a4b92f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
"""
DIDSON and ARIS file and frame header formats
"""

file_attributes_3 = {
    'version': '4s',
    'numframes': 'i',
    'framerate': 'i',
    'resolution': 'i',  # 0=lo 1 = Hi
    'numbeams': 'i',  # 48 Lo 96 Hi for standard mode
    'samplerate': 'f',
    'samplesperchannel': 'i',
    'receivergain': 'i',  # 0-40 dB
    'windowstart': 'i',  # Windowstart 1 to 31 
    'windowlength': 'i',  # Windowlength coded as 0 to 3 
    'reverse': 'i',
    'serialnumber': 'i',
    'date': '32s',  # date file was made
    'idstring': '256s',  # User supplied identification notes
    'id1': 'i',  # four user supplied integers
    'id2': 'i',
    'id3': 'i',
    'id4': 'i',
    'startframe': 'i',  # used if this is a snippet file from source file
    'endframe': 'i',  # Used if this is a snippet file from source file
    'timelapse': 'i',  # Logic 0 or 1 (1 = timelapse active);
    'recordInterval': 'i',  # Ask Bill
    'radioseconds': 'i',  # Needed for timelapse -- ask Bill
    'frameinterval': 'i',  # Interval between frames in time lapse
    'userassigned': '136s',  # User assigned space
}

file_attributes_4 = {
    'version': '4s',
    'numframes': 'i',
    'framerate': 'i',
    'resolution': 'i',  # 0=lo 1 = Hi
    'numbeams': 'i',  # 48 Lo 96 Hi for standard mode
    'samplerate': 'f',
    'samplesperchannel': 'i',
    'receivergain': 'i',  # 0-40 dB
    'windowstart': 'i',  # Windowstart 1 to 31 
    'windowlength': 'i',  # Windowlength coded as 0 to 3 
    'reverse': 'i',
    'serialnumber': 'i',
    'date': '32s',  # date file was made
    'idstring': '256s',  # User supplied identification notes
    'id1': 'i',  # four user supplied integers
    'id2': 'i',
    'id3': 'i',
    'id4': 'i',
    'startframe': 'i',  # used if this is a snippet file from source file
    'endframe': 'i',  # Used if this is a snippet file from source file
    'timelapse': 'i',  # Logic 0 or 1 (1 = timelapse active);
    'recordInterval': 'i',  # Ask Bill
    'radioseconds': 'i',  # Needed for timelapse -- ask Bill
    'frameinterval': 'i',  # Interval between frames in time lapse
    'userassigned': '136s',  # User assigned space
}

file_attributes_5 = {
    'version': '4s',
    'numframes': 'I',  # Total frames in file
    'framerate': 'I',  # Initial recorded frame rate
    'resolution': 'I',  # Non-zero if HF, zero if LF
    'numbeams': 'I',  # ARIS 3000 = 128/64, ARIS 1800 = 96/48, ARIS 1200 = 48
    'samplerate': 'f',  # 1/Sample Period
    'samplesperchannel': 'I',  # Number of range samples in each beam
    'receivergain': 'I',  # Relative gain in dB:  0 - 40
    'windowstart': 'f',  # Image window start range in meters (code [0..31] in DIDSON)
    'windowlength': 'f',  # Image window length in meters  (code [0..3] in DIDSON)
    'reverse': 'I',  # Non-zero = lens down (DIDSON) or lens up (ARIS), zero = opposite
    'serialnumber': 'I',  # Sonar serial number
    'strdate': '32s',  # Date that file was recorded
    'idstring': '256s',  # User input to identify file in 256 characters
    'id1': 'i',  # User-defined integer quantity
    'id2': 'i',  # User-defined integer quantity
    'id3': 'i',  # User-defined integer quantity
    'id4': 'i',  # User-defined integer quantity
    'startframe': 'I',  # First frame number from source file (for DIDSON snippet files)
    'endframe': 'I',  # Last frame number from source file (for DIDSON snippet files)
    'timelapse': 'I',  # Non-zero indicates time lapse recording
    'recordInterval': 'I',  # Number of frames/seconds between recorded frames
    'radioseconds': 'I',  # Frames or seconds interval
    'frameinterval': 'I',  # Record every Nth frame
    'flags': 'I',  # See DDF_04 file format document
    'auxflags': 'I',  # See DDF_04 file format document
    'sspd': 'I',  # Sound velocity in water
    'flags3d': 'I',  # See DDF_04 file format document
    'softwareversion': 'I',  # DIDSON software version that recorded the file
    'watertemperature': 'I',  # Water temperature code:  0 = 5-15C, 1 = 15-25C, 2 = 25-35C
    'salinity': 'I',  # Salinity code:  0 = fresh, 1 = brackish, 2 = salt
    'pulselength': 'I',  # Added for ARIS but not used
    'txmode': 'I',  # Added for ARIS but not used
    'versionfgpa': 'I',  # Reserved for future use
    'versionpsuc': 'I',  # Reserved for future use
    'thumbnailfi': 'I',  # Frame index of frame used for thumbnail image of file
    'filesize': 'Q',  # Total file size in bytes
    'optionalheadersize': 'Q',  # Reserved for future use
    'optionaltailsize': 'Q',  # Reserved for future use
    'versionminor': 'I',  # DIDSON_ADJUSTED_VERSION_MINOR
    'largelens': 'I',  # Non-zero if telephoto lens (large lens, hi-res lens, big lens) is present
    'userassigned': '568s',  # Free space for user
}

frame_attributes_3 = {
    'framenumber': 'i',
    'frametime': 'i',
    'frametime2': 'i',
    'version': '4s',
    'status': 'i',
    'year': 'i',
    'month': 'i',
    'day': 'i',
    'hour': 'i',
    'minute': 'i',
    'second': 'i',
    'hsecond': 'i',
    'transmit': 'i',  # bit2 = 2.0 MHz, bit1 = Enable, bit0 = HF_MODE
    'windowstart': 'i',  # This will be updated at the end of this routine
    'windowlength': 'i',  # Add 2 if low resolution (index between 1 and 6)
    'threshold': 'i',
    'intensity': 'i',
    'receivergain': 'i',
    'degc1': 'i',
    'degc2': 'i',
    'humidity': 'i',
    'focus': 'i',
    'battery': 'i',
    'status1': '16s',  # User defined and supplied
    'status2': '8s',  # User defined and supplied
    'panwcom': 'f',  # Return from Pan/Tilt if used when compass present
    'tiltwcom': 'f',  # Return from Pan/Tilt if used when compass is present
    'velocity': 'f',  # Platform variables supplied by user
    'depth': 'f',
    'altitude': 'f',
    'pitch': 'f',
    'pitchrate': 'f',
    'roll': 'f',
    'rollrate': 'f',
    'heading': 'f',
    'headingrate': 'f',
    'sonarpan': 'f',
    'sonartilt': 'f',  # Read from compass if used, Read from Pan/Tilt if used and no compass
    'sonarroll': 'f',  # Read from compass if used, Read from Pan/Tilt if used and no compass
    'latitude': 'd',
    'longitude': 'd',
    'sonarposition': 'f',
    'configflags': 'i',  # bit0: 1=classic, 0=extended windows; bit1: 0=Standard, 1=LR
    'userassigned': '60s',  # Free space for user
}

frame_attributes_4 = {
    'framenumber': 'i',
    'frametime': 'i',
    'frametime2': 'i',
    'version': '4s',
    'status': 'i',
    'year': 'i',
    'month': 'i',
    'day': 'i',
    'hour': 'i',
    'minute': 'i',
    'second': 'i',
    'hsecond': 'i',
    'transmit': 'i',  # bit2 = 2.0 MHz, bit1 = Enable, bit0 = HF_MODE
    'windowstart': 'i',  # This will be updated at the end of this routine
    'windowlength': 'i',  # Add 2 if low resolution (index between 1 and 6)
    'threshold': 'i',
    'intensity': 'i',
    'receivergain': 'i',
    'degc1': 'i',
    'degc2': 'i',
    'humidity': 'i',
    'focus': 'i',
    'battery': 'i',
    'status1': '16s',  # User defined and supplied
    'status2': '8s',  # User defined and supplied
    'panwcom': 'f',  # Return from Pan/Tilt if used when compass present
    'tiltwcom': 'f',  # Return from Pan/Tilt if used when compass is present
    'velocity': 'f',  # Platform variables supplied by user
    'depth': 'f',
    'altitude': 'f',
    'pitch': 'f',
    'pitchrate': 'f',
    'roll': 'f',
    'rollrate': 'f',
    'heading': 'f',
    'headingrate': 'f',
    'sonarpan': 'f',
    'sonartilt': 'f',  # Read from compass if used, Read from Pan/Tilt if used and no compass
    'sonarroll': 'f',  # Read from compass if used, Read from Pan/Tilt if used and no compass
    'latitude': 'd',
    'longitude': 'd',
    'sonarposition': 'f',
    'configflags': 'i',  # bit0: 1=classic, 0=extended windows; bit1: 0=Standard, 1=LR
    'userassigned': '828s',  # Move pointer to end of frame header of length 1024 bytes
}

frame_attributes_5 = {
    'framenumber': 'I',
    'frametime': 'Q',  # Recording timestamp
    'version': '4s',
    'status': 'I',
    'sonartimestamp': 'Q',
    'tsday': 'I',
    'tshour': 'I',
    'tsminute': 'I',
    'tssecond': 'I',
    'tshsecond': 'I',
    'transmitmode': 'I',
    'windowstart': 'f',
    'windowlength': 'f',
    'threshold': 'I',
    'intensity': 'i',
    'receivergain': 'I',
    'degc1': 'I',
    'degc2': 'I',
    'humidity': 'I',
    'focus': 'I',
    'battery': 'I',
    'uservalue1': 'f',
    'uservalue2': 'f',
    'uservalue3': 'f',
    'uservalue4': 'f',
    'uservalue5': 'f',
    'uservalue6': 'f',
    'uservalue7': 'f',
    'uservalue8': 'f',
    'velocity': 'f',
    'depth': 'f',
    'altitude': 'f',
    'pitch': 'f',
    'pitchrate': 'f',
    'roll': 'f',
    'rollrate': 'f',
    'heading': 'f',
    'headingrate': 'f',
    'compassheading': 'f',
    'compasspitch': 'f',
    'compassroll': 'f',
    'latitude': 'd',
    'longitude': 'd',
    'sonarposition': 'f',
    'configflags': 'I',
    'beamtilt': 'f',
    'targetrange': 'f',
    'targetbearing': 'f',
    'targetpresent': 'I',
    'firmwarerevision': 'I',
    'flags': 'I',
    'sourceframe': 'I',
    'watertemp': 'f',
    'timerperiod': 'I',
    'sonarx': 'f',
    'sonary': 'f',
    'sonarz': 'f',
    'sonarpan': 'f',
    'sonartilt': 'f',
    'sonarroll': 'f',
    'panpnnl': 'f',
    'tiltpnnl': 'f',
    'rollpnnl': 'f',
    'vehicletime': 'd',
    'timeggk': 'f',
    'dateggk': 'I',
    'qualityggk': 'I',
    'numsatsggk': 'I',
    'dopggk': 'f',
    'ehtggk': 'f',
    'heavetss': 'f',
    'yeargps': 'I',
    'monthgps': 'I',
    'daygps': 'I',
    'hourgps': 'I',
    'minutegps': 'I',
    'secondgps': 'I',
    'hsecondgps': 'I',
    'sonarpanoffset': 'f',
    'sonartiltoffset': 'f',
    'sonarrolloffset': 'f',
    'sonarxoffset': 'f',
    'sonaryoffset': 'f',
    'sonarzoffset': 'f',
    'tmatrix': '64s',
    'samplerate': 'f',
    'accellx': 'f',
    'accelly': 'f',
    'accellz': 'f',
    'pingmode': 'I',
    'frequencyhilow': 'I',
    'pulsewidth': 'I',
    'cycleperiod': 'I',
    'sampleperiod': 'I',
    'transmitenable': 'I',
    'framerate': 'f',
    'soundspeed': 'f',
    'samplesperbeam': 'I',
    'enable150v': 'I',
    'samplestartdelay': 'I',
    'largelens': 'I',
    'thesystemtype': 'I',
    'sonarserialnumber': 'I',
    'encryptedkey': 'Q',
    'ariserrorflagsuint': 'I',
    'missedpackets': 'I',
    'arisappversion': 'I',
    'available2': 'I',
    'reorderedsamples': 'I',
    'salinity': 'I',
    'pressure': 'f',
    'batteryvoltage': 'f',
    'mainvoltage': 'f',
    'switchvoltage': 'f',
    'focusmotormoving': 'I',
    'voltagechanging': 'I',
    'focustimeoutfault': 'I',
    'focusovercurrentfault': 'I',
    'focusnotfoundfault': 'I',
    'focusstalledfault': 'I',
    'fpgatimeoutfault': 'I',
    'fpgabusyfault': 'I',
    'fpgastuckfault': 'I',
    'cputempfault': 'I',
    'psutempfault': 'I',
    'watertempfault': 'I',
    'humidityfault': 'I',
    'pressurefault': 'I',
    'voltagereadfault': 'I',
    'voltagewritefault': 'I',
    'focuscurrentposition': 'I',
    'targetpan': 'f',
    'targettilt': 'f',
    'targetroll': 'f',
    'panmotorerrorcode': 'I',
    'tiltmotorerrorcode': 'I',
    'rollmotorerrorcode': 'I',
    'panabsposition': 'f',
    'tiltabsposition': 'f',
    'rollabsposition': 'f',
    'panaccelx': 'f',
    'panaccely': 'f',
    'panaccelz': 'f',
    'tiltaccelx': 'f',
    'tiltaccely': 'f',
    'tiltaccelz': 'f',
    'rollaccelx': 'f',
    'rollaccely': 'f',
    'rollaccelz': 'f',
    'appliedsettings': 'I',
    'constrainedsettings': 'I',
    'invalidsettings': 'I',
    'enableinterpacketdelay': 'I',
    'interpacketdelayperiod': 'I',
    'uptime': 'I',
    'arisappversionmajor': 'H',
    'arisappversionminor': 'H',
    'gotime': 'Q',
    'panvelocity': 'f',
    'tiltvelocity': 'f',
    'rollvelocity': 'f',
    'sentinel': 'I',
    'userassigned': '292s',  # Free space for user
}