Problems with ceiling for CCR dive

Anton Lundin glance at acc.umu.se
Mon Oct 13 04:21:58 PDT 2014


On 13 October, 2014 - Robert Helling wrote:

> 
> On 13.10.2014, at 11:53, Willem Ferguson <willemferguson at zoology.up.ac.za> wrote:
> 
> Willem,
> 
> > 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...
> 
> 

The ordering of those two functions:
/* Let's try to do some deco calculations.
 * Needs to be run before calculate_gas_information so we know that if we have a po2, where in ccr-mode.
 */
void calculate_deco_information(struct dive *dive, struct divecomputer *dc, struct plot_info *pi, bool print_mode)

Thats so we don't need to "reverse-calculate" the original gasmix in the
add_segment() function...

Yes, its kinda abusing the entry->pressures.o2 value, but thats the way
it works right now.

//Anton


> 
> > 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.
> 
> Best
> Robert
> 
> 
> 
> -- 
> .oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
> 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
>                       http://www.atdotde.de
> 
> 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
> 
> 
> 
> 



> _______________________________________________
> subsurface mailing list
> subsurface at subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


-- 
Anton Lundin	+46702-161604


More information about the subsurface mailing list