Subsurface deco calculations

Linus Torvalds torvalds at linux-foundation.org
Wed Feb 8 20:23:25 PST 2017


On Feb 8, 2017 8:01 PM, "Miika Turkia" <miika.turkia at gmail.com> wrote:


My original order of downloading seems to work now fine. However, if I
first download from the OSTC and after that from air integrated Vyper,
I end up with two cylinders in the used equipment tab, one with air
the other with 32% mix. It still seems that only the Nitrox one is
being used. With a quick look in the xml (attached) I do not spot why
the air cylinder is considered as used.


We never renumber or delete cylinders on our own - we just ignore unused
cylinders at the end.

So when you download from the OSTC first, you actually have four cylinders
defined, and the second one is the one you are using. If you look at the
XML, you'll see all four cylinders.

The first cylinder is an air one that you never use, but we don't delete it
just because you didn't use it. You had it in your dive computer, we keep
it around.

In fact we keep the other two around too, but we have that crazy logic
where we don't show them because they are at the end and not used. We
should stop doing that too, but Dirk added it for some broken dive
computers that always reported eight cylinders or something like that.

When you download from the vyper first, the 32% cylinder ends up being the
first one, and you still have the other three cylinders that the OSTC
reports, but now they are all at the end so they get hidden by that same
crazy logic.

BTW what is the flags in the event tag?


Not really used any more. We used to encode the cylinder number in the
flags (because libdivecomputer didn't give it any sane way), but now it's
just legacy noise that doesn't get renumbered. So it was the first cylinder
for the vyper, and it is still flags=1 for that one, and it was the second
cylinder for the OSTC, so it's flags=2 for that one.

        Linus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20170208/46bb9988/attachment.html>


More information about the subsurface mailing list