deco calculations

Dirk Hohndel dirk at
Sat Jan 5 00:07:21 PST 2013

Jan Schubert <Jan.Schubert at> writes:
> OK did some more investigations: My best guess is, that the reason would
> be that we do not take the ascent into account while the dive computer
> does. Deciding if there should be a stop and at which depth seems to be
> done in deco_allowed_depth() based on the value of tissues_tolerance
> related to surface pressure. As soon as tissues_tolerance is larger than
> surface pressure we start to calculate the deco ceiling while the dive
> computer calculates an ascent at the given ascent rate at exactly this
> time resulting in some decompression on the way up resulting in no deco
> stop at all. The same for all the following samples: We start
> calculating the deco ceiling based on no future prediction while the
> dive computer does it all the time. In my theory, this would also
> explain while the calculated depth is always deeper than the real one.
> Just a theory but my best so far...

You are correct. The ceiling that we show is the ceiling AT THAT POINT
IN TIME. Not the ceiling as it would be by the time you ascend... that's
what we use in planning. But when visualizing a dive, the only thing I
believe makes sense to display is the ceiling at the specific point in
time. Otherwise I could argue that we should never show a ceiling unless
you violated deco at some point - because clearly whenever the real dive
crossed the ceiling it was already gone...

>> Why don't you wait for what I'm working on and then comment on that?
> Sry, did not know on what you are working and that there is a relation
> at the time of my writing...

No need for apologies. It was frustrating for me that I was trying to
find time to implement what I wanted to implement and instead ended up
responding to email for quite some time...

But now the code is out there and you will hopefully find the bugs in it


More information about the subsurface mailing list