Subsurface looping at end of download from DC

Dirk Hohndel dirk at hohndel.org
Mon Oct 14 22:31:09 UTC 2013


Oh, this reminds me. For reasons that are a bit to silly to explain in
much detail... while we STORE all pressures in mbar as an int, when
calling any of the deco functions (so deco_allowed_depth, etc), the
pressure is given in bar as double...

yes, we should probably change that, but that's what it is currently
expecting... is this maybe the issue at hand?

/D

On Tue, 2013-10-15 at 06:50 +0200, Patrick Valsecchi wrote:
> I had the same bug when I was playing with salinity from the DC. To
> compute the deco, we need the absolute pressure. This depends on the
> depth, the water density and the surface pressure. So, if you got the
> unit of the surface pressure wrong, for sure the deco algo is going to
> have trouble computing a profile. Please check what you get from the
> DC and what are the default values.
> 
> But I don't see why we should have an infinite loop. We should add
> some fail safe...
> 
> 
> Tim Wootton <tim at tee-jay.demon.co.uk> a écrit :
>         On 14/10/13 21:05, Dirk Hohndel wrote:
>         
>                         if (deco_allowed_depth(tissue_tolerance, surface_pressure, dive, 1)<=
>                         next_stop) {
>                         
>                         is never true.
>                 
>                 So what is the return of deco_allowed_depth()?
>         
>         294790  (tissue_tolerance=1045.7861759884499, surface_pressure=1016 , 
>         dive, 1)
>         
>         btw I missed a 0 off of the next_stop value, should have read 294000
>         
>         Interesting thing all these dives were already imported into my "real" 
>         xml file. Now I notice it in the parameters of this method I'm wondering 
>         if my patch to make surface pressure available for this DC is the 
>         culprit as that wouldn't have been available before.
>         
>         
>                 It looks like you triggered a bug in our deco calculation :-)
>         
>         
>         
>         ______________________________________________________________
>         
>         subsurface mailing list
>         subsurface at hohndel.org
>         http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
>         




More information about the subsurface mailing list