Subsurface deco calculations

Linus Torvalds torvalds at linux-foundation.org
Wed Feb 8 09:50:43 PST 2017


On Wed, Feb 8, 2017 at 9:14 AM, Linus Torvalds
<torvalds at linux-foundation.org> wrote:
>
> IOW, if I take your xml files and remove the trip and the gas change
> gasmix percentage from them, I can reproduce something very similar to
> what you report.

.. actually, I left out one step: in order to get he right dive merge
order (ostc merged as the second dive computer) I also edited the dive
time of the vyprt to be before the ostc.

And that's part of the issue: when we use the vyper as the "base"
dive, it only has one cylinder, and then when we try to merge the ostc
into that base dive, the "find best cylinder match" will fail, because
there aren't enough cylidners to match to. The first OSTC cylinder
(air) isn't a great match for the only cylinder in the base dive
(32%), but since it's the _only_ cylinder in the base dive, we match
those two up anyway. And then the second OSTC cylinder (which is 32%)
has no cylinder at all to match up to, so we don't renumber it at all.

That code was written to basically create the dives with the primary
dive computer first, and then merge the random secondary ones we would
carry. So the code expected that the base dive is the primary and more
capable dive computer.

So it's not just some "we don't look at the mix" trivial issue.

I'll have to think about this more.

              Linus


More information about the subsurface mailing list