summaryrefslogtreecommitdiffstats
path: root/core/deco.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-08-05 20:43:06 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-08-08 16:26:31 -0700
commit52e5d9c605469b338075e22533a8f97a6f984b57 (patch)
treec8fd18dc85ee5afba09c6714353316efc8a8db68 /core/deco.h
parent594d1d3514f91221884bdc31f29a09e8f325f1e8 (diff)
downloadsubsurface-52e5d9c605469b338075e22533a8f97a6f984b57.tar.gz
Cleanup: move planner/deco related declarations planner/deco.h
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/deco.h')
-rw-r--r--core/deco.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/core/deco.h b/core/deco.h
index 4a10b7366..ed1135abb 100644
--- a/core/deco.h
+++ b/core/deco.h
@@ -2,14 +2,47 @@
#ifndef DECO_H
#define DECO_H
+#include "units.h"
+#include "gas.h"
+#include "divemode.h"
+
#ifdef __cplusplus
extern "C" {
#endif
struct dive;
-struct deco_state;
+struct divecomputer;
struct decostop;
+struct deco_state {
+ double tissue_n2_sat[16];
+ double tissue_he_sat[16];
+ double tolerated_by_tissue[16];
+ double tissue_inertgas_saturation[16];
+ double buehlmann_inertgas_a[16];
+ double buehlmann_inertgas_b[16];
+
+ double max_n2_crushing_pressure[16];
+ double max_he_crushing_pressure[16];
+
+ double crushing_onset_tension[16]; // total inert gas tension in the t* moment
+ double n2_regen_radius[16]; // rs
+ double he_regen_radius[16];
+ double max_ambient_pressure; // last moment we were descending
+
+ double bottom_n2_gradient[16];
+ double bottom_he_gradient[16];
+
+ double initial_n2_gradient[16];
+ double initial_he_gradient[16];
+ pressure_t first_ceiling_pressure;
+ pressure_t max_bottom_ceiling_pressure;
+ int ci_pointing_to_guiding_tissue;
+ double gf_low_pressure_this_dive;
+ int deco_time;
+ bool icd_warning;
+};
+
extern const double buehlmann_N2_t_halflife[];
extern int deco_allowed_depth(double tissues_tolerance, double surface_pressure, const struct dive *dive, bool smooth);
@@ -29,6 +62,7 @@ extern void calc_crushing_pressure(struct deco_state *ds, double pressure);
extern void vpmb_start_gradient(struct deco_state *ds);
extern void clear_vpmb_state(struct deco_state *ds);
extern void printdecotable(struct decostop *table);
+extern void add_segment(struct deco_state *ds, double pressure, struct gasmix gasmix, int period_in_seconds, int setpoint, enum divemode_t divemode, int sac);
extern double regressiona();
extern double regressionb();