dive planner fixes [was: Re: source code may be getting a bit intimidating]

Dirk Hohndel dirk at hohndel.org
Mon Jan 7 11:00:56 PST 2013


Linus Torvalds <torvalds at linux-foundation.org> writes:

> On Mon, Jan 7, 2013 at 8:46 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
>> Linus Torvalds <torvalds at linux-foundation.org> writes:
>>
>>> However, it looks like it doesn't generate gas-change events?
>>
>> Just pushed a fix for that.
>
> It seems to still be buggy.
>
> Try this plan:
>
>  150 +10 20/30
>  150 +5 20/30
>  100 +5 20/30
>  100 +1 40
>
> and the gas change does happen, but it happens at the 15-minute mark
> at 150ft. And it seems to switch to *air*, not to 40% oxygen.
>
> That's all with the "planning window" still open. When I press "Ok",
> it fixes itself.

So there's an oddity that I noticed as well. As you enter the plan it
tries to fill things in and so when you add the '+5' the gas for that
segment is still unset (and therefore air). Again, this is where our
"Air == o2=0 && he=0 bytes us badly... because otherwise I could easily
test for "gas is unset" - but unless I look at the actual string, "gas
is unset" looks exactly like "air" - and on the planner side, where I
would have to make this call, I don't have access to the string.

I /REALLY/ want to re-open the conversation about why air has to be
special...

For now I think I'll fix it by pre-populating the gas field with the gas
from the last segment. So unless you actively change it, it will just
stay the same, which I think is a sane default and should fix this
immediate problem.

/D


More information about the subsurface mailing list