subsurface crash when merging .xml files

Linus Torvalds torvalds at linux-foundation.org
Fri Mar 3 11:30:19 PST 2017


On Fri, Mar 3, 2017 at 2:59 AM, Alessandro Volpi <volpial at gmail.com> wrote:
>
> The only remaining question is : why is the tank start pressure redundant
> field present only in a few dives, as the data are imported with smk2ssrf ?
> I have observed that all records with the redundant data have been generated
> by the SmartTec dive computer whilst the old Aladin Air Z O2 and the new
> Galileo Sol and Galileo Trimix are not affected.

The reason is probably just that the SmartTec import had the dive
computer always remember and download first/last pressure data, and
then it ignores it if it's "close enough" to the sample data.

And that's exactly what subsurface does too, except the rules for
"close enough" probably differ.

In subsurface, the "redundancy" check is whether the samples are
within half a bar of the reported pressure (see
same_rounded_pressure() in core/dive.c - the "500" constant is because
we do things in millibar internally, of course).

For imperial divers, that's about a 8 PSI difference where we say that
the pressures are effectively the same.

I suspect that the SmartTec import has something similar, but maybe
the SmartTec redundancy check is tighter. Maybe it's just 0.1 bar
instead of 0.5 bar. Or, if they work natively in PSI, maybe they cut
off at 1PSI differences or something.

As to why the dive computer would report different values to begin
with: I think your theory is right that you just turned on the dive
computer earlier, and then just test-breathing at the surface (or
temperature changes or whatever) means that the early cylinder
pressures are different from the first few samples. Or maybe the
sensor just fluctuated a bit.

                     Linus


More information about the subsurface mailing list