OpenSeaMap-dev:.SON (Humminbird): Unterschied zwischen den Versionen

Aus OpenSeaMap-dev
Wechseln zu: Navigation, Suche
K (Markus verschob die Seite SON nach OpenSeaMap-dev:.SON (Humminbird))
 
(Eine dazwischenliegende Version von einem anderen Benutzer wird nicht angezeigt)
Zeile 3: Zeile 3:
 
= Basic Structure =
 
= Basic Structure =
  
Byte order of data is most significant byte is the first byte in the stream.
+
Byte order of data is most significant byte is the first byte in the stream (Big Endian).
  
 
== DAT File ==
 
== DAT File ==

Aktuelle Version vom 6. Dezember 2020, 16:35 Uhr

SON is a file format that is used by Humminbird instruments. It structure allows to store data from several sonar sensors to allow for storing so called side scan data. Side scans are continous depth measurments not only below the ship but to some extent to the side of the ships.

Basic Structure

Byte order of data is most significant byte is the first byte in the stream (Big Endian).

DAT File

For each recording a numbered file is created starting with R00001.DAT. That files stores general information such as time and date of recording and initial position. A corresponding directory R00001 holds a list of files that contain sonar sensor recordings. For earch sensor an index file and a data file is created. A multiple sensor setup may look like having a 50kHz, a 200kHz and two 455kHz side scan sensors for each side of the ship. This will result in four sensor files and four index files totalling to 9 files including the dat file.

8 bytes : unknown
int32 : seconds (NOT milliseconds) since January 1, 1970, 00:00:00 GMT.
int32 : longitude (projected)
int32 : latitude (projected)
bytes[6] : Name
bytes[4] : Extension

Index Files

Index files contain allow to identify headers and subsequent data in the son file

typedef struct indexstructure
{
  int32_t globalRecordNumber; // record number
  int32_t positionInStream; // start of header in other file 
}

SON Files

Having analyzed the index structure one can access the positions in the file directly. The header consists of a sequence of control characters that indicate the following data (indicated as signed byte value).

Header

-128 : int32 // global record number
-127 : int32 // recording time since start
-126 : int32 // longitude (projected)
-125 : int32 // latitude (projected)
-124 : int16 : gps enabled (0/1); int16 : gps heading to be divided by 10.0
-123 : 2 unused bytes; int16 gps speed to be divided by 10.0
-122 : 4 bytes // unknown
-121 : int32 : depth in decimeter
-110 : int32 : sensor frequency in Hz (e.g. 85000Hz)
-107 : int32 // unknown
-96 : int32 // data length for this data block following the header

80 : byte : Beam id (0 for first beam, 1 for second beam, ... encodes the same id as the file name)
81 : byte // unknown
83 : byte // unknown
84 : byte // unknown
86 : byte // unknown
87 : byte // unknown
33 : header termination

Example Recording time since start with 1 second in a stream [-127, 0 , 0 , 0, 1]

Data

Yet to be discovered or documented