[PATCH 2/2] Add initial rudimentary no-fly time calculation

Linus Torvalds torvalds at linux-foundation.org
Fri Feb 8 02:01:54 PST 2013


On Fri, Feb 8, 2013 at 8:39 PM, Robert C. Helling <helling at lmu.de> wrote:
>
> After briefly staring at the patch I can say it looks good to me. But I have
> two questions:

And I have answers. Not that everybody necessarily will *agree* with
them, but hey..

> 1) It is not clear to me what the reference pressure really should be, I
> find http://en.wikipedia.org/wiki/Cabin_pressurization not too helpful: When
> they express it as an altitude, what do they assume about temperature
> (always 15 degrees or dropping by some amount (0.0065 K) per meter? Also,
> shall we protect against usual cabin pressure or shall we actually protect
> against pressure drop in an emergency of the plane (in that case I presume
> oxygen masks help the average passenger sufficiently against hyoxia but not
> divers against inert gas forming bubbles at sudden drop of pressure). But I
> don't know if this makes any relevant difference.

So we actually wondered about this, and asked the pilot on the plane
we just came to Sydney from what the *real* pressure in the cabin of
the plane was.

The answer was that the poor pilot didn't even know. He basically sets
the pressure not as a real pressure, but as a "altitude in feet". But
of course, the actual cabin pressurization doesn't really work in
altitudes (the real altitude is something totally different), so it
has to really do this with a pressure sensor and compressor, and in
the end the only thing it can do is to use the standard pressure
formula.

Which Dirk looked up on Wikipedia, and is what we calculate. So I'm
pretty sure that we do exactly the same calculation as the pressure
logic in the plane does.

And it had better be standard temperature, because the temperature in
the cabin certainly doesn't change.

As to protecting against pressure drop - it's clear that nobody really
does the catastrophic pressure thing. You can't. If you're actually
flying at 33000 feet, and get complete loss of pressure in the main
cabin, you'll *never* get Buhlmann to give you an acceptable pressure
by waiting at sea-level, because your pN2 will never go below 0.78. No
matter how long you wait.

The fact that your pN2 will never *ever* go below 0.78 is also why I
don't allow people to then muck with the gradient factors too much.
You want to go to an altitude where the pressure is in the 0.65 bar
range (with a pN2 that much smaller), so there will inevitably
*always* be a pressure drop that will never ever go away with any
amount of surface time. Make the gradient factors too careful, and the
logic will always say "that's too big of a pressure drop". Even if you
never did any diving at all..

> 2) I am not sure, the whole gradient factor thing makes any sense at
> altitude: GF_high is supposed to be applied at the surface (and that's what
> is in the formulas) but when you extrapolate to even lower pressures, you
> get effective gradient factors that are even higher (possibly above 100%).
> To be safe on that side, I would use GF_low=GF_high=whatever to make the
> depth/ambient pressure dependence of the gradient factor go away. But I have
> no good intuition about what a reasonable GF at altitude would be.

Heh. I made the same logical mistake initially, but then corrected
myself: we are never actually calculating any decompression at any
lower pressures.

All actual deco calculations are done at sealevel, using normal air.
No deco calculations at all for lower pressure. Because the whole
point is, we are *not* in the plane until *after* the no-fly time.

So no, we don't get confused about GF_high at low pressures, because
we literally only ever use surface pressure, never lower pressures.

So what the code does is to basically extend the deco calculations
using surface pressure, continuing the Buhlmann calculations. That
should all be perfectly safe, and not "out of spec", as far as I can
tell. After all, that's *exactly* what we do for a surface interval
between dives.

So think of the "no-fly" time as just a surface interval. Which is
exactly what it is, and it uses the exact same calculation too. The
only difference is that instead of diving, we want to make sure that
our tissue tolerances are ok for going up to a higher altitude (which
is in turn the exact same thing as ascending under water and having a
ceiling to how high you can ascend).

So I think the code is largely correct, but hey, maybe the above is
all the rambling of a crazy person.

Which is exactly why I wanted feedback - can I convince somebody
*else* who knows what they are doing that it is correct?

              Linus


More information about the subsurface mailing list