dylan-smith / DiveIntelligence

1 stars 1 forks source link

Implement Schreiner equation #177

Open dylan-smith opened 1 month ago

dylan-smith commented 1 month ago

Would give ever so slightly more accurate values for tissue pressures. There's a good description of the math here: https://wrobell.dcmod.org/decotengu/model.html#schreiner-equation

The reason it would be more accurate is the way the current code calculates the change in tissue pressure during an ascent or descent, is it does it one second at a time. So lets say you were descending at 30m/min, that is 0.5m/sec. The current code assumes you instantly descend to 0.5m then spend 1 second there, then instantly teleport to 1m and spend 1 sec there, etc. This makes the calculations easier to do, but ever so slightly less accurate than if we were to use the schreiner equation.