Is there a convenient way (short of figuring out the API and writing a program... which I can do but I'd rather not) to parse a dump file?
I have managed to download from my old Uwatec Aladin Air Z, and most everything is good but I'm not getting gas consumption data. Looking at uwatec_memomouse_parser.c, it seems like the parser should be getting tank pressure from the data, but I'm not seeing it in subsurface. So, I'd like to reparse a dump file so I can walk through it in the debugger and figure out what's going on. I looked at hacking up examples/universal.c, but it's pretty set on downloading from a computer.
Also if anyone knows of any documentation for the Uwatec data format, that might be helpful, but I suspect I can get a really good idea of what's going on by just walking through the code as it dissects the data.
On 2015-03-18 09:07, Shawn Willden wrote:
Is there a convenient way (short of figuring out the API and writing a program... which I can do but I'd rather not) to parse a dump file?
Yes, that's possible with the simulator. Instructions and binaries can be found here:
http://libdivecomputer.org/simulator.html
On Linux (and Mac OS X) the setup is the easiest. Just install socat, and run the command:
socat PTY,link=/tmp/ttyS0 PTY,link=/tmp/ttyS1
Next, start the simulator with the following options:
./simulator -l simulator.log -p /tmp/ttyS1 -b aladin <memorydump>
Finally, rebuild libdivecomputer with the --enable-pty option, and run the application. Download dives from the simulator with /tmp/ttyS0 as the serial port. For example with the universal test app:
./universal -l aladin.log -d aladin.xml -b aladin /tmp/ttyS0
(Note that with the aladin protocol, the download is not initiated on the application side, but on the device side. So you may need to start the application before the simulator, or start the simulator with a delay using the -w <milliseconds> option.)
I have managed to download from my old Uwatec Aladin Air Z, and most everything is good but I'm not getting gas consumption data. Looking at uwatec_memomouse_parser.c, it seems like the parser should be getting tank pressure from the data, but I'm not seeing it in subsurface. So, I'd like to reparse a dump file so I can walk through it in the debugger and figure out what's going on. I looked at hacking up examples/universal.c, but it's pretty set on downloading from a computer.
The aladin/memomouse parser doesn't report tank pressure, because that info is not stored in the sample data.
Also if anyone knows of any documentation for the Uwatec data format, that might be helpful, but I suspect I can get a really good idea of what's going on by just walking through the code as it dissects the data.
Links to external protocol documentation can be found here:
http://libdivecomputer.org/links.html
Jef
On Wed, Mar 18, 2015 at 4:38 AM, Jef Driesen jef@libdivecomputer.org wrote:
On 2015-03-18 09:07, Shawn Willden wrote:
Is there a convenient way (short of figuring out the API and writing a program... which I can do but I'd rather not) to parse a dump file?
Yes, that's possible with the simulator. Instructions and binaries can be found here [...]
Thanks, that's very helpful.
The aladin/memomouse parser doesn't report tank pressure, because that info is not stored in the sample data.
It is. At least, the DataTrak software I used to use on Windows showed detailed air consumption curves, so the data is retrievable somehow. Unless there's some way for the host to instruct the dive computer to provide more data, it must be buried in the download.
I'm really hoping to avoid having to find some way to get a copy of Windows to run DataTrak.
Also if anyone knows of any documentation for the Uwatec data format, that
might be helpful, but I suspect I can get a really good idea of what's going on by just walking through the code as it dissects the data.
Links to external protocol documentation can be found here:
Hmm. Looking at the Aladin and Memomouse pages there certainly doesn't seem to be any place for tank pressure. But DataTrak *does* display it.
The data format does include a "level of exertion" value that it says is derived from the computer based on air consumption. I suppose Datatrak could be using that somehow to estimate consumption... but as I recall it shows actual tank pressures, too.
I think I'm going to have to find a copy of Windows and validate my recollections. If I can find a copy of DataTrak... The "buy a new computer" option is looking more and more attractive ...
I found a manual for DataTrak on Scubapro's web site, and I think I understand what I was misremembering.
DataTrak showed exertion throughout the dive, plus total air consumption (from which it calculated SAC). That is consistent with the data available from Aladin; the depth sample data contains extertion info and the dive log contains the total air consumption.
I actually don't care all that much about the exertion data... it was cool to see, but I imagine subsurface has no similar concept and trying to hack it in would be non-trivial. I really would like to see the air consumption, and subsurface clearly has that.
Do you know offhand if libdivecomputer is not returning that data for or if subsurface is ignoring it?
If you don't, I'll figure it out.
On Wed, Mar 18, 2015 at 8:30 AM, Shawn Willden shawn@willden.org wrote:
On Wed, Mar 18, 2015 at 4:38 AM, Jef Driesen jef@libdivecomputer.org wrote:
On 2015-03-18 09:07, Shawn Willden wrote:
Is there a convenient way (short of figuring out the API and writing a program... which I can do but I'd rather not) to parse a dump file?
Yes, that's possible with the simulator. Instructions and binaries can be found here [...]
Thanks, that's very helpful.
The aladin/memomouse parser doesn't report tank pressure, because that info is not stored in the sample data.
It is. At least, the DataTrak software I used to use on Windows showed detailed air consumption curves, so the data is retrievable somehow. Unless there's some way for the host to instruct the dive computer to provide more data, it must be buried in the download.
I'm really hoping to avoid having to find some way to get a copy of Windows to run DataTrak.
Also if anyone knows of any documentation for the Uwatec data format, that
might be helpful, but I suspect I can get a really good idea of what's going on by just walking through the code as it dissects the data.
Links to external protocol documentation can be found here:
Hmm. Looking at the Aladin and Memomouse pages there certainly doesn't seem to be any place for tank pressure. But DataTrak *does* display it.
The data format does include a "level of exertion" value that it says is derived from the computer based on air consumption. I suppose Datatrak could be using that somehow to estimate consumption... but as I recall it shows actual tank pressures, too.
I think I'm going to have to find a copy of Windows and validate my recollections. If I can find a copy of DataTrak... The "buy a new computer" option is looking more and more attractive ...
-- Shawn
On 2015-03-18 15:30, Shawn Willden wrote:
Hmm. Looking at the Aladin and Memomouse pages there certainly doesn't seem to be any place for tank pressure. But DataTrak *does* display it.
They might be cheating. There appears to be a field with the total air consumption. DataTrak might be using that to interpolate the air consumption during the dive and generate a fake graph.
Suunto does this too for their older models (the vyper family). It's very confusing for users. They assume the graph is generated from real data, and wonder why libdivecomputer based applications don't show it. This is actually one of the most common question I receive.
The libdivecomputer api does support begin/end tank pressure. I assume that the Aladin's total air consumption value is the difference between the end and begin pressure. Unfortunately that's not enough info for libdivecomputer.
Jef
Right, if you read the rest of my rambling, I think they're using the per-sample "exertion level" -- which is derived by the computer from air consumption -- and using that along with the total consumption to fake a curve.
I do want to see if I can get that total consumption number imported into subsurface.
On Wed, Mar 18, 2015 at 9:13 AM, Jef Driesen jef@libdivecomputer.org wrote:
On 2015-03-18 15:30, Shawn Willden wrote:
Hmm. Looking at the Aladin and Memomouse pages there certainly doesn't seem to be any place for tank pressure. But DataTrak *does* display it.
They might be cheating. There appears to be a field with the total air consumption. DataTrak might be using that to interpolate the air consumption during the dive and generate a fake graph.
Suunto does this too for their older models (the vyper family). It's very confusing for users. They assume the graph is generated from real data, and wonder why libdivecomputer based applications don't show it. This is actually one of the most common question I receive.
The libdivecomputer api does support begin/end tank pressure. I assume that the Aladin's total air consumption value is the difference between the end and begin pressure. Unfortunately that's not enough info for libdivecomputer.
Jef