NDL staying at 0 for a while after deco completion

Legacy OSTC's
wrobell
Posts: 105
Joined: Wednesday 28. January 2009, 16:28

Re: NDL staying at 0 for a while after deco completion

Post by wrobell »

And another example, which you can reproduce with libdeco-ostc,
which uses OSTC firmware for decompression calculations:

[pre]
$ ./bin/decolint 20 33
Dive profile segments:
20m for 33min

GF Low: 30%, GF High: 85%
Surface pressure: 1013 millibar

Gas list:
o2=21%, he=0% at 0m

NDL (ZH-L16C): 33min


$ ./bin/decolint 20 34
Dive profile segments:
20m for 34min

GF Low: 30%, GF High: 85%
Surface pressure: 1013 millibar

Gas list:
o2=21%, he=0% at 0m

NDL (ZH-L16C): 34min


$ ./bin/decolint 20 35
Dive profile segments:
20m for 35min

GF Low: 30%, GF High: 85%
Surface pressure: 1013 millibar

Gas list:
o2=21%, he=0% at 0m

NDL (ZH-L16C): 35min
[/pre]

To my knowledge above is not bug in libdeco-ostc, but some *possible*
problem with OSTC NDL calculations. Happy to be proved wrong, but please
take a look at debug messages I have put inside OSTC code - OSTC starts to
report 0 minute NDL from the 1958th second to the 2100th second (32min - 35min)
for the last example above (20m/35min). The attached file contains
the debug messages.

The above problem is very similar to what I have experienced on the dive - at
the edge of non-deco and deco stages of a dive, the OSTC firmware stucks
at 0min NDL.

I looked today at sim_ascent_to_first_stop and calc_nextdecodepth functions,
because both try to calculate depth of first deco stop and both can hit
the surface without finding first deco stop and I was suspecting that maybe
in some situations, they got stuck in some weird mode. Found nothing, so now
I suspect the function calculating NDL.
wrobell
Posts: 105
Joined: Wednesday 28. January 2009, 16:28

Re: NDL staying at 0 for a while after deco completion

Post by wrobell »

I changed the code of libdeco-ostc a bit to gather more data for the following
scenario

- dive at 20m for 33min
- ascent to 5m at 3m/min (20m -> 5m within 5min)

I have taken the absolute pressure of depth, dive time in seconds, NDL and N2
pressure in each tissue compartment produced by OSTC and saved the data as CSV
file (p-ndl.csv, see attached zip file).

Then I have recalculated NDL with R script (p-ndl.R) and produced the graph

[img]file.php?2,file=584,filename=p-ndl.png[/img]

Up to 33th minute of the dive, the OSTC calculated NDL and the recalculated NDL
follow each other. During the ascent OSTC's NDL shoots up, while
the recalculated NDL stays at 0 (which means the NDL is 0 minutes or we
are in deco already).

The sudden OSTC's NDL increase suggests that above scenario is similar to
issue raised by posts starting this thread.

The recalculated NDL makes sense as well - slow ascent should get you into deco,
isn't it?

EDIT: I will try to extend this example to contain more information. Also, please do not hesitate to look into the script and data and point out any errors.

EDIT 2: Actually, there is a stupid error in recalculation of NDL. After fixing
it, there are still differences between OSTC NDL and the recalculated NDL. I will
try to provide more info in the evening or tomorrow (and hopefully spot some more
errors on my side).
wrobell
Posts: 105
Joined: Wednesday 28. January 2009, 16:28

Re: NDL staying at 0 for a while after deco completion

Post by wrobell »

And hopefully last attempt at this subject.

I have fixed the NDL recalculation function, updated the script and recalculated
NDL for two dive profiles

- 20m for 33min -> ascent to 5m -> 5m for few minutes
- 40m for 5min -> ascent to 15m -> 15m for few minutes

I have ensured that both dives are NDL dives.

The graphs are as follows

[img]file.php?2,file=585,filename=p-20m.png[/img]

[img]file.php?2,file=586,filename=p-40m.png[/img]

As you can see, there is a difference between OSTC NDL and recalculated NDL
at the edge between no deco and deco situations. IMHO, OSTC behaves quite well
for these two dive profiles. The recalculated NDL starts to increase on ascent
and drops immediately when ceiling limit changes tissue compartment (or is about
to do it). YMMV.

On the original issue raised in this thread. Both examples show sudden spike
of NDL when ascent ceiling starts to drop. This confirms what Matthias said.

The script performing calculations and producing above graphs uses different
algorithms than OSTC firmware and can be considered independent implementation...
so you can consider this post as independent verification of some of the OSTC
calculations and I hope some Swiss people stop harassing me, roll up sleeves,
verify my calculations or at least buy some beer. ;)

The "dt-ndl-check" script producing above graphs can be found at http://git.savannah.gnu.org/cgit/decote ... ee/scripts

The data is in the attached zip file. The PDF versions of graphs and the data
can be downloaded from here.
swissdiving
Posts: 815
Joined: Saturday 30. July 2011, 07:30

Re: NDL staying at 0 for a while after deco completion

Post by swissdiving »

Wrobell I didn't start the thread. Like I said, I don't have a problem with the ostc's behaviour and if something needs to be fixed I am sure Matthias will.

PS. I'll buy you a beer anyway!
Cheers,

Hansjoerg

--> 2N ¦ 2201 / 3892
--> OSTC4 ¦ 257 / 392 / 424 / 647/1324 Fischer

RTFM
nodekh
Posts: 57
Joined: Thursday 11. September 2014, 09:36

Re: NDL staying at 0 for a while after deco completion

Post by nodekh »

which version of ostc's software was that?
OSTC 2N 4689
Post Reply