aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/deco.h
diff options
context:
space:
mode:
authorGravatar Tim Segers <tsegers@pm.me>2022-10-11 17:56:55 +0200
committerGravatar Tim Segers <tsegers@pm.me>2022-10-11 17:56:55 +0200
commit70ea0d58f937c4493bdcbacd59d4f7bf18792352 (patch)
treee1aa47ac7c9d62338e50e747d9e2dcee5f9444d0 /src/deco.h
parent07cac4282bf721e75d70f1811f55152989a6a7c5 (diff)
downloadopendeco-70ea0d58f937c4493bdcbacd59d4f7bf18792352.tar.gz
Make various constants configurable
- SURFACE_PRESSURE* - SWITCH_INTERMEDIATE* - P_WV - PO2_MAX - END_MAX - ALGO_VER * can now also be set from the CLI
Diffstat (limited to 'src/deco.h')
-rw-r--r--src/deco.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/deco.h b/src/deco.h
index 439626f..68c65ed 100644
--- a/src/deco.h
+++ b/src/deco.h
@@ -12,11 +12,10 @@
#define P_WV_BUHL 0.0627 /* Buhlmann value, Rq = 1.0, least conservative */
#define P_WV_NAVY 0.0567 /* US. Navy value, Rq = 0.9 */
#define P_WV_SCHR 0.0493 /* Schreiner value, Rq = 0.8, most conservative */
-#define P_WV P_WV_BUHL
-#define SURFACE_PRESSURE 1.01325
#define MOD_AUTO 0
+/* types */
enum ALGO {
ZHL_16A = 0,
ZHL_16B = 1,
@@ -40,6 +39,15 @@ typedef struct gas_t {
double mod;
} gas_t;
+/* global variables */
+extern enum ALGO ALGO_VER;
+extern double SURFACE_PRESSURE;
+extern double P_WV;
+
+extern double PO2_MAX;
+extern double END_MAX;
+
+/* functions */
double bar_to_msw(const double bar);
double msw_to_bar(const double msw);
double abs_depth(const double gd);