summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/dive.h b/dive.h
index 05da2874b..fe2b5c784 100644
--- a/dive.h
+++ b/dive.h
@@ -104,6 +104,12 @@ static inline int interpolate(int a, int b, int part, int whole)
return rint(x / whole);
}
+static inline depth_t gas_mod(struct gasmix *mix, pressure_t po2_limit) {
+ depth_t depth;
+ depth.mm = po2_limit.mbar * 1000 / get_o2(mix) * 10 - 10000;
+ return depth;
+}
+
struct sample {
duration_t time;
depth_t depth;