Problems with ceiling for CCR dive

Robert Helling helling at
Mon Oct 13 03:27:05 PDT 2014

On 13.10.2014, at 11:53, Willem Ferguson <willemferguson at> wrote:


> If I execute calculate_deco_information() AFTER get_pressures(), then, for OC as well as CCR dives, the ceilings appear correct because, now, there are calculated po2 values to work from, allowing calculation of pn2 values and ceilings. See line 962 in profile.c (latest master). But I do not know whether you would consider the swop of order a wise thing to do. But this does not solve the ceilings for dive plans. Please comment, will you?

In planning, you of course never have sensor data, you only have a set-point.

If it works it does so by accident I think. Look at the beginning of add_segment() in deco.c: It creates a new pressures structure totally unininitalized and then calls fill_pressures on it. You would have to pass down the pressures structure that you created in profile.c to it. But...

> What I can do is this:
> Create a function in profile.c that does the voting. It will reside in profile.c, be plot_info aware, and return a double, being the calculated po2 value. Now we can remove the sensor values from the pressures structure and return the sensor data to the "base level" of plot_info. This might also remove the need of a 5th calling parameter for get_pressures(). Please comment, will you?

… I think this is much better and should solve all problems at once.


Robert C. Helling     Elite Master Course Theoretical and Mathematical Physics
                      Scientific Coordinator
                      Ludwig Maximilians Universitaet Muenchen, Dept. Physik
                      Phone: +49 89 2180-4523  Theresienstr. 39, rm. B339

Enhance your privacy, use cryptography! My PGP keys have fingerprints
A9D1 A01D 13A5 31FA 6515  BB44 0820 367C 36BC 0C1D    and
DCED 37B6 251C 7861 270D  5613 95C7 9D32 9A8D 9B8F

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <>

More information about the subsurface mailing list