aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/deco.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/deco.h')
-rw-r--r--src/deco.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/deco.h b/src/deco.h
index 2500580..0630fec 100644
--- a/src/deco.h
+++ b/src/deco.h
@@ -37,6 +37,13 @@ enum ALGO {
ZHL_16C = 2,
};
+typedef struct gas_t {
+ unsigned char o2;
+ unsigned char he;
+ unsigned char n2;
+ double mod;
+} gas_t;
+
typedef struct decostate_t {
double pn2[16];
double phe[16];
@@ -45,15 +52,11 @@ typedef struct decostate_t {
double firststop;
double max_depth;
double ceil_multiple;
+ const gas_t *gas;
+ double depth;
+ double runtime;
} decostate_t;
-typedef struct gas_t {
- unsigned char o2;
- unsigned char he;
- unsigned char n2;
- double mod;
-} gas_t;
-
/* global variables */
extern enum ALGO ALGO_VER;
extern enum UNITS UNITS;
@@ -83,8 +86,8 @@ unsigned char gas_he(const gas_t *gas);
unsigned char gas_n2(const gas_t *gas);
double gas_mod(const gas_t *gas);
-double add_segment_ascdec(decostate_t *ds, double dstart, double dend, double time, const gas_t *gas);
-double add_segment_const(decostate_t *ds, double depth, double time, const gas_t *gas);
+void add_segment_ascdec(decostate_t *ds, double dstart, double dend, double time, const gas_t *gas);
+void add_segment_const(decostate_t *ds, double depth, double time, const gas_t *gas);
double get_gf(const decostate_t *ds, double depth);
double ceiling(const decostate_t *ds, double gf);
double gf99(const decostate_t *ds, double depth);