{"filter":false,"title":"sl2fileformat.md","tooltip":"/lib/doc/sl2fileformat.md","undoManager":{"mark":4,"position":4,"stack":[[{"start":{"row":0,"column":0},"end":{"row":81,"column":0},"action":"insert","lines":["File format","===========","Much kudos to openstreetmap.org project and their SL2 documentation page","http://wiki.openstreetmap.org/wiki/SL2","","","## Datatypes","type  | definition","------|-----------","byte  | UInt8","short | UInt16LE","int   | UInt32LE","float | FloatLE (32 bits IEEE 754 floating point number)","","","## Structure","###Header","10 byte header, then a series of blocks/frames as described below.","","offset| bytes | type  | description","-----:|------:|-------|-----------------------------------------------------------------","    0 |     2 | short | filetype*","    2 |     8 | ?     | unknown / not verified","    ","    ","__filetype*__ 1 = slg, 2 = sl2","","","### Block/Frame","offset| bytes | type  | description","-----:|------:|-------|-----------------------------------------------------------------","    0 |    26 | ?     | unknown / not verified","   26 |     2 | short | blockSize*, size of current block in bytes","   28 |     2 | short | lastBlockSize, size of previous block (frameIndex -1) in bytes.","   30 |     2 | short | channel*, gets translated to channelName","   32 |     2 | short | packetSize, seems to always be same as blockSize","   34 |     2 | int   | frameIndex. Starts at 0. Used ot match frames/block on different channels.","   38 |     2 | short | upperLimit","   40 |     2 | short | lowerLimit","   42 |     9 | ?     | unknown / not verified","   51 |     1 | byte  | frequency*","   52 |    10 | ?     | unknown / not verified","   62 |     4 | float | waterDepth in feet","   66 |     4 | float | keelDepth in feet","   70 |    28 | ?     | unknown / not verified","   98 |     4 | float | speedGps, Speed from gps in knots","  102 |     4 | float | temperature, in Celcius","  106 |     4 | int   | lowrance encoded longitude","  110 |     4 | int   | lowrance encoded latitude","  114 |     4 | float | speedWater, in knots. Should be actual water speed or GPS if sensor not present.","  118 |     4 | float | courseOverGround in radians,","  122 |     4 | float | altitude in feet","  126 |     4 | float | heading, in radians","  130 |    11 | ?     | unkown / not verified","  140 |     4 | int   | time1, Unknown resolution, unknown epoch.","  144 |     ? | ?     | unknown / not verified. Contains sounding/bounce data","","__blockSize*__ The last block in the file doesn't follow this pattern and I don't know why.","","__channel*__","* 0 = Primary (Tranditional Sonar)","* 1 = Secondary (Traditional Sonar)","* 2 = DSI (DownScan Imaging)","* 3 = Left (Sidescan)","* 4 = Right (Sidescan)","* 5 = Composite (Sidescan)","* Any other value is treated as invalid","","","__frequency*__","* 0 = 200 KHz","* 1 = 50 KHz","* 2 = 83 KHz","* 4 = 800 KHz","* 5 = 38 KHz","* 6 = 28 KHz","* 7 = 130 - 210 KHz","* 8 = 90 - 150 KHz","* 9 = 40 - 60 KHz","* 10 = 25 - 45 KHz","* Any other value is treaded like 200 KHz",""],"id":1}],[{"start":{"row":0,"column":0},"end":{"row":0,"column":1},"action":"insert","lines":["S"],"id":2}],[{"start":{"row":0,"column":1},"end":{"row":0,"column":2},"action":"insert","lines":["L"],"id":3}],[{"start":{"row":0,"column":2},"end":{"row":0,"column":3},"action":"insert","lines":["2"],"id":4}],[{"start":{"row":0,"column":3},"end":{"row":0,"column":4},"action":"insert","lines":[" "],"id":5}]]},"ace":{"folds":[],"scrolltop":0,"scrollleft":0,"selection":{"start":{"row":0,"column":4},"end":{"row":0,"column":4},"isBackwards":true},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":0},"timestamp":1444821430229,"hash":"6de310f469845af9f3a70d648c509e77360cf994"}