aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/units.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/units.h')
-rw-r--r--src/units.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/units.h b/src/units.h
new file mode 100644
index 0000000..1557bc0
--- /dev/null
+++ b/src/units.h
@@ -0,0 +1,30 @@
+/* SPDX-License-Identifier: MIT-0 */
+
+#ifndef UNITS_H
+#define UNITS_H
+
+#define UNITS_DEFAULT METRIC
+#define SURFACE_PRESSURE_DEFAULT 1.01325
+
+/* types */
+enum UNITS {
+ METRIC,
+ IMPERIAL,
+};
+
+/* global variables */
+extern enum UNITS UNITS;
+extern double SURFACE_PRESSURE;
+
+/* 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);
+
+#endif /* end of include guard: UNITS_H */