aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/deco.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/deco.h')
-rw-r--r--src/deco.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/deco.h b/src/deco.h
index 35905ca..2500580 100644
--- a/src/deco.h
+++ b/src/deco.h
@@ -14,6 +14,7 @@
#define P_WV_SCHR 0.0493 /* Schreiner value, Rq = 0.8, most conservative */
#define ALGO_VER_DEFAULT ZHL_16C
+#define UNITS_DEFAULT METRIC
#define SURFACE_PRESSURE_DEFAULT 1.01325
#define P_WV_DEFAULT P_WV_BUHL
@@ -25,6 +26,11 @@
#define MOD_AUTO 0
/* types */
+enum UNITS {
+ METRIC,
+ IMPERIAL,
+};
+
enum ALGO {
ZHL_16A = 0,
ZHL_16B = 1,
@@ -50,6 +56,7 @@ typedef struct gas_t {
/* global variables */
extern enum ALGO ALGO_VER;
+extern enum UNITS UNITS;
extern double SURFACE_PRESSURE;
extern double P_WV;
@@ -61,6 +68,11 @@ extern int LAST_STOP_AT_SIX;
/* functions */
double bar_to_msw(double bar);
double msw_to_bar(double msw);
+double bar_to_fsw(double bar);
+double fsw_to_bar(double msw);
+double msw_or_fsw(double msw, double fsw);
+double xsw_to_bar(double xsw);
+double bar_to_xsw(double bar);
double abs_depth(double gd);
double gauge_depth(double ad);