Algorithms

Please register or login

Welcome to ScubaBoard, the world's largest scuba diving community. Registration is not required to read the forums, but we encourage you to join. Joining has its benefits and enables you to participate in the discussions.

Benefits of registering include

  • Ability to post and comment on topics and discussions.
  • A Free photo gallery to share your dive photos with the world.
  • You can make this box go away

Joining is quick and easy. Log in or Register now!

Messages
4
Reaction score
1
Location
England
# of dives
200 - 499
Hi all,
This is my first post here on SB and i'm not fully sure if this is the right place for this question

I am currently studying computing at college and am writing a project to be a dive log. I want it to be able to calculate the final pressure after the first dive and if possible your RNT after surface interval.
I was wondering if anybody knows about the algorithms and can point me in right direction or places to look.

Many thanks
 
That helps thanks. Still quite confused though. Do you know how they assign the letters to each pressure group?
 
That helps thanks. Still quite confused though. Do you know how they assign the letters to each pressure group?

The letters is just arbitrary letters picked by the different certification organizations. and a table for one organization will give you a different letter than an another table from an another organization for the exact same dive.
The letter means nothing unless the user know what table is used for the logic, and frankly it is not that useful in divelog software, since the user don't have the possibility to choose what table to use (unless you implement a lot of tables). but if this is the functionality you want to implement just copy a table from an open source like the U.S Navy table or the Norwegian Standard table, creating lookup arrays and out put the result.

A much more useful functionality is to implement the actual algorithm for nitrogen absorption and saturation in body tissues (like Buhlmann ZHL-16) or variable bubble growth algorithms like the VBM, and simulate the loading based on the diveprofile (this is the same class of algorithms that is used in dive computers). The Buhlmann algorithms is very easy to implement.

"Deco for Divers" have a nice, easy to understand chapter explaining the Buhlmann algorithm.
This web page is a step by step on how to implement it in code (his code implementation is flawed but good enough to visualize the loading in an dive log software, wouldn't use it for a deco dive planning software)
"The physics of scuba diving" has a chapter on modeling the nitrogen absorption (short and concentrate on pre-buhlmann algorithm (Haldane)).
If you want to implement gradient factors into the buhlmann algorithm, here is a nice starting point.
And here is a document writen by Eric Baker explaning the M-Values
For more in depth info and theory, you have the books writen by Buhlmann him self.
 
Last edited:
Thanks for the quick reply. If I was the implement the Buhlmann algorithms what would that information be telling the user?
 
Thanks for the quick reply. If I was the implement the Buhlmann algorithms what would that information be telling the user?
Basically you can use this algorithm to calculate everything a dive table or a dive computer tells you, take a look here for an example of the visualization of it. I also recommend testing this functionality in the dive log program Diving log 6.0 (I am not the affiliated with this program)

What the algorithm does is to simulate different tissues (called "compartments") and calculate the ppN2/He pressure gradient between that compartment and the ambient ppN2/He pressure for each segment of the dive, with that information, in relation to the M-values (Max values), you can calculate things like No decompression limit time, residual nitrogen time, decompression stops and a lot more. In the example screenshot above they have made a virtual dive computer displaying the data for the loaded profile, and you can click on any part of the profile to see what the computer said on that moment on the dive, and show the pressure gradient of each compartment as a graph.

The algorithm can also be used to calculate the decompression stop when planning a dive, most dive planning programs lets you plot a profile, specify breathing gases, and the program uses buhlmann or a VBM variant to calculate a safe ascent. (see here for an example of this)

btw, both Diving log 6.0 and Multideco is great applications that I recommend.
 
Last edited:
https://www.shearwater.com/products/perdix-ai/

Back
Top Bottom