Math behind divetables

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!

andypandy

Guest
Messages
3
Reaction score
0
Location
Stockholm, Sweden
I've already posted this in another part of the forum but maybe here is where it belongs...

I'm about to write a small diveplanner in Java for a computer science course and I was wondering if someone knew of the equations behind for instance the Padi divetable. I could just copy the numbers in to the program but as one of the constraints of the project is the size of the finished software I'd really prefer to use some kind of equation. I'm guessing that the Padi divetable must be based on such an equation, but is it public or some kind of company secret? Anyone know where I can find it?

Thanx in advance

Andreas Lindberg
 
Andypandy,

You can look at this article which goes into M-Values. Honestly I didn't have the time to read the whole thing, but it gets deep. It might be eaiser to just put the values in.

In either case, I would love to see your finished product.

Good Luck

Bill :) :)

M-Values
 
They are all based off of the findings of the US Navy's research in the sixties. The gets pretty in depth and it is by no means accurate. I just started my DECO/AdV. Nitrox Course and found the explanations about the tables to be extremely impressive and has broadened my understanding of the dive tables tremendously. I would recommend getting with a Deco instructor for a much more thorough explanation of the original Navy Tables. (Foundation for all dive tables.) I just got lucky because my instructor happens to be a mathematician as well as a dive instructor. Check it out a good luck. Decompression theory books would probably be of a good reference. The algorithms are all being argued and I do believe that the tables are actually based on probability. As far as I know, there is no exact equation. Just a range of values. Check out V Planner and some other programs that are out there. I think there are some open sources available.
 
andypandy:
I've already posted this in another part of the forum but maybe here is where it belongs...

I'm about to write a small diveplanner in Java for a computer science course and I was wondering if someone knew of the equations behind for instance the Padi divetable. I could just copy the numbers in to the program but as one of the constraints of the project is the size of the finished software I'd really prefer to use some kind of equation. I'm guessing that the Padi divetable must be based on such an equation, but is it public or some kind of company secret? Anyone know where I can find it?

Thanx in advance

Andreas Lindberg

Andreas,

I just saw your post, sorry for the extreme delay. You can find very in depth papers discussing the decompression algorithms. I bought myself a Sensus Pro data logger and was looking into the decompression algorithms for some software I was writing. I ended up concluding that a lookup table that modeled the dive tables was the easiest way to write this. I was going to write it in C++. My idea was to build an array of structs that had certain properties. The array would be three dimensional and indexed by the divers depth and the initial pressure group the dive started in.

struct tableEntry{
int mintime;
int maxtime;
char finalPressGroup;}

Once the desired depth and pressure group was indexed, the time of the dive would fall between mintime and maxtime of one of the table entries resulting in the outgoing pressure group of finalPressGroup.

A second array containing similar structs, indexed by outgoing pressure group could give you the Surface Interval values the dive table spits out.

Good Luck,
James
 
at one point i wrote up some code that implemented buhlmann ZHL-16B which is a well-defined algorithm and set of parameters that you can implement. it gave me pretty good agreement with the PADI NDL tables, but i never got into testing how it agreed for repetetive diving.

i believe the PADI tables are based only on the 60 min compartment, with fudges for deep and long dives, and tweaks for the results of doppler studies of actual divers. as such, i don't think there's any algorithm you could implement which would replicate them exactly.
 
lamont:
at one point i wrote up some code that implemented buhlmann ZHL-16B which is a well-defined algorithm and set of parameters that you can implement. it gave me pretty good agreement with the PADI NDL tables, but i never got into testing how it agreed for repetetive diving.

i believe the PADI tables are based only on the 60 min compartment, with fudges for deep and long dives, and tweaks for the results of doppler studies of actual divers. as such, i don't think there's any algorithm you could implement which would replicate them exactly.

Awesome. I never found a nice enough algorithm that I felt it was worth coding up. Can you send me your code if you still have it? I'll send you a PM with my email if you still have the code.

This is exactly why I got into this sport. I'm a physicist/engineer and I love seeing nature and being active. What is more perfect that diving?!!

James
 
osujamesc:
Awesome. I never found a nice enough algorithm that I felt it was worth coding up. Can you send me your code if you still have it? I'll send you a PM with my email if you still have the code.

This is exactly why I got into this sport. I'm a physicist/engineer and I love seeing nature and being active. What is more perfect that diving?!!

James

Sorry, I don't have the code anymore, and I was never particularly happy with it anyway... Its pretty easy though, you just setup some arrays for your different compartments with different half-times. Start with running absolutely square ascents and descents. Track your N2 loading in the compartments. Compare with the M-values to see if your profile makes you bubble. There are some corrections in the ZHL-16B model for ppH2O and ppCO2 (IIRC) which aren't difficult. That'll get you started.
 
osujamesc:
Awesome. I never found a nice enough algorithm that I felt it was worth coding up. Can you send me your code if you still have it? I'll send you a PM with my email if you still have the code.

This is exactly why I got into this sport. I'm a physicist/engineer and I love seeing nature and being active. What is more perfect that diving?!!

James
Attached in an excel spreadsheet that is very close to the PADI RDP or wheel. The DSAT M-values I lifted from the Erik Baker M-value article. I had to reverse engineer a bit to figure out what PADI chose for the pressure group dividing lines, and also to figure out what they assumed for H2O vapor pressure (I ended up with 1.6fsw).

There isn't any "algorithm". All of the neo-Haldanian tables are just based on exponential ongass/offgas. A bit of algebraic manipulation changes it to a form where the equation generates the time it takes to ongass to a certain percentage of M-value for a given depth.

While the pressure groups on the PADI table reflect only the 60 minute HT, the NDLs are set by running the calcualations for each compartment and not allowing any compartment to exceed 100%. That's why, for example, that the NDL for 80' on air is 30 minutes, even though you are nowhere near pressure group Z.
 
https://www.shearwater.com/products/perdix-ai/

Back
Top Bottom