If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
I'm interested to know the structure of the sonar data recorded on a multimedia card in a Lowrance unit. Is each return geo referenced? I'd like to import the recorded data to Surfer to produce rough bathymetry maps.
Yes, GPS position data is imbedded for each sounding in a Lowrance sonar log (.slg) file. You can use the Lowrance Sonar Viewer application to export the raw data (x,y,z) to a text file for import into Surfer.
Has anyone tried to get out the other data from the Lowrance MMC file???
It cantains the echo intensities and positions for each ping, so it could be nice to be able to unpack all the data and run in a program of your own...
The sonar viewer is quite good, but when displaying the sidescan image recorded with a modified Lowrance it has its problems. It would be easy to build a mosaic-picture of large areas if one could unpack the lot...
Check out one of my modified-lowrance-sss images on the web (screenshot from the sonar viewer) at the following site (wrecksite in Finland)
Thanks for the feedback on my question, interesting stuff. I'd be interested in getting a copy of a data file to look at if possible. I have a LCX15MT but I haven't installed a data card or interfaced my GPS to it yet ... and it's cold so the boats out of the water. My email address is:
mark dot munro at ppo2 dot com
What kind of time is available per meg of storage?
Do you have news about the structure of lowrance slg files?
It would be really interesting to write an alternate software for processing sonar recordings.
I have broken the Lowrance data structure, but I have not had the time / knowledge to write a nice software to display the files in a more "sidescan"-convenient way.
I know which bits are displaying the position, speed etc. From this, a software could be made which compensates the scan speed to the depth, so that the images are shown in the right scale (no streching, mosaic possible etc.)
Does anyone want to write a software and share it back to me, if I give you the structure?
Boy, it's odd that I posted this same question just yesterday
Here's what I've found out so far: No response from the various authors of programs that do read/convert the SLG format files. Still waiting. I also contacted Lowrance, no response yet.
I had read in an internet post that somewhere there's an academic paper that lists a lot of information about the format of the file, separate from the limited information that the slg2txt outputs. Still looking for the paper, although I've found another couple that reference SLG2TXT.
If anyone here has any information on the file, please post it, as I'm currently stumbling my way through reverse engineering the binary data, and it's a pain.
I have come quite far in taking the code apart. Hope you will share back your results! It would be great to get a good viewer taking the position and speed into account!
Here goes:
Before each "ping", a string of data is displayed. It is of different length, depending if the GPS position is included or not (GPS updates 1 time/second, but the pings are usually more frequent). I think it can also be dependent on Lowrance product models.
I will list which byte means what (1 byte = 8 pcs zeros or ones) starting from when each new ping is started. This example is a string where the GPS data is included.
This is one example where you see the beginnings of 12 Lowrance-pings (each ping has a column)
The ones which begin with 4 have the GPS data in the string, the ones which begin with 1 do not...
-> pings 5,6 and 11,12 have the GPS data.
It should not be impossible to sort out which pings have the GPS data and which do not, and from that get the position data....
I am working with a Lowrance LMS-525C DF Sonar/GPS Chartplotter Combo. I am attempting to use it for Echo Sounding in an industrial waste pond.
I have analyzed the raw binary slg file produced by this machine in light of the very helpful starting information provided in this forum.
Here's what I know / think:
An SLG file consist of a file header followed by some number of records.
The File Header contains the following information:
Bytes 0x00 - 01 is a 16 bit integer. probably the revision number of the file. (I get 0x0100 for now)
Bytes 0x02 - 03 are unknown to me -- currently set to 0x00
Bytes 0x04 - 0x05 are a 16 bit integer giving the size of any single record within the file. I'm my case 0x07B2 or 1970 (base10) bytes.
Bytes 0x05 - 0x06 are unknown to me -- currently set to 0x00.
Here ends the information to be found in the header for the binary file.
The rest of the file is a sequence of records all having the byte-size given above.
A record has a (short) header followed by the data.
In terms of offsets into a record, A record's header is
0x00 - 01 is unknown to me currently set to 0x00.
0x02 - 0x03 is a critically important 16-bit quantity which enumerates which 'optional fields' are to be found in this record. More on this in a minute. For now, let's call this the "Manifest Variable."
0X04 - 0X07 is a 4 byte float value giving the "Lower Limit"
Here endeth the definition of a record's header.
The Data in a record consists of up to 13 optional fields followed by the ping data. As near as I can tell the optional fields follow the same sequence as in the file created by reading an slg file into Lowrance's SonarViewer.exe and then outputting a CSV (which, in all likelihood, is equivalent to that file produced by their slg2txt.exe utility.) Specifically, the sequence of the optional fields appears to be:
Depth: 4 byte float
Water Temp: 4 byte Float
Temp2: 4 byte float
Temp3: 4 byte float
Water Speed: 4 byte float
Position X: 4 byte Integer in Mercator Meters
Position Y: 4 byte Integer in Mercator Meters
Surface Depth: 4 byte float
Top of Bottom Depth: 4 byte float
Time offset: 4 byte integer
Speed: 4 byte float
Track: 4 byte float
Altitude: 4 byte float
following these optional fields is the ping data.
The ping data consists first of a 16 bit integer giving how many 'listenings' are present in this record, and then of that many unsigned characters (255 to 0 in value) giving the intensity / volume of the sound heard at a particular instant.
Any remaining space in the record is padded with 0x00.
Now, which optional fields are present in a given record? Sadly, I failed miserably in my attempts to logically decipher the Manifest Variable. I can, however, say that in my particular data, the following values have the following meanings (all cases are using 200khz mode for pinging):
Manifest Variable = 0x112C, raw (or 0x2C11 if x-lated to a short int) means
Depth: present
Water Temp: present
Temp2: absent
Temp3: absent
Water Speed: absent
Position X: absent
Position Y: absent
Surface Depth: present
Top of Bottom Depth: present
Time offset: present
Speed: absent
Track: absent
Altitude: absent
Manifest Variable = 0x012C, raw, means
Same as 0x112C except Water Temp absent.
Manifest Variable = 0x146D, raw, means
Depth: present
Water Temp: present
Temp2: absent
Temp3: absent
Water Speed: absent
Position X: present
Position Y: present
Surface Depth: present
Top of Bottom Depth: present
Time offset: present
Speed: present
Track: present
Altitude: present
Manifest Variable = 0x146D, raw, means
Same as 0x046D with Water Temp Absent
(So, o.k., the first nibble, or the first bit of the first nibble, appears to control water temp, but that's the only sense I could get out of it)
Notes and comments:
1. I saw no field for "Upper Limit." Seems to always be 0.000 in the CSV file.
2. I have not exhaustively tested these Manifest Variable interpretations yet, but I'm pretty sure my data only has 4 possibilities. If I find others, I will write again.
3. In the cases of those optional fields that are always absent from my data, I'm only guessing about their place / sequence among the other optional fields. If you find otherwise, please let all of us know.
4. I've glanced at older versions of the slg files, in the form of sample data supplied by Lowrance. They seem to follow the same general scheme with the following caveats:
A. No version number. They seem to begin at the "Size of Each record" value
B. Their "manifest variable" interpretations or implementations seem to be entirely different from Rev 1. Good Luck.
5. Could someone, please, give me a logical explanation for the interpretation of the Manifest Variable in Rev. 1 of the slg file? I'd learn a lot from hearing it.
6. General meanings of each of the fields can be found on page 153 of http://www.twdb.state.tx.us/RWPG/rpg...ationBrine.pdf
7. I wrote, in C++, an importer for the CSV version of the SLG file sometime ago. I also have adequate binary-read facilities left over from my hack on version 3 of Lowrance's USR file. I've begun work on the importer for this binary slg file. It won't take long (so long as I can keep interested. The professional need has passed for now.) If someone has the web space, I'm willing to post the source code when it is done.
8. Why I bothered: The whole reason I chose to hack the slg was because the speed of sound in the industrial soup that we are surveying is more than different enough from that of normal water to make the reported depths meaningless. I'm hoping to read the ping return times from the slg file for a know depth, back-calc the speed of sound from that, and then go on to survey the rest of the lake. Also, the Lowrance seems to have difficulty in depths under, say, 3.5 feet. (and this pond happens to be a generally shallow evaporation lake.) I hope that I can overcome this limitation as well.
9. Comments, questions, suggestion, are welcome.
10. Thanks again for the great starting point. I hope all this is useful to someone else, too.
I have a program in C++ that reads the lowrance slg files and have already broken down the header.
Yes it is very complicated and is almost too much to post here. The key to it is, there is a set of flags that determine which bytes of data are present in each ping. The hard part is, that they are actually individual bits. Basically 1's and 0's for True or False. These offset bits will determine what bytes to read.
I have done a lot of work to get this far, but I am swamped and have basically abandonded the project. If anyone is will ing to take over my work or at least see what has been done, I would gladly email you all of my files.
Comment