-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdecompression.h
More file actions
45 lines (33 loc) · 1.47 KB
/
decompression.h
File metadata and controls
45 lines (33 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#define NUM_OF_COMPARTMENTS 16
struct decompression_settings {
float surfacePressure;
float ascentRate;
float stopIncrement;
float gfLow;
float gfHigh;
float waterVapourPressure;
};
struct param_compartment_gas {
float a_value;
float b_value;
float half_time;
};
struct param_compartment {
struct param_compartment_gas helium;
struct param_compartment_gas nitrogen;
};
struct gas_pair {
float nitrogen;
float helium;
};
struct tissue_compartment {
float helium;
float nitrogen;
};
void initialiseCompartments(struct tissue_compartment *compartments);
void instantSchreiner(struct decompression_settings decoSettings, struct tissue_compartment *compartments, struct gas_pair gas, float deltaTime, float ambientPressure);
void SchreinerAscentDescent(struct decompression_settings decoSettings, struct tissue_compartment *compartments, struct gas_pair gas, float ascentRate, float deltaTime, float ambientPressure);
float stopTime(struct decompression_settings decoSettings, struct tissue_compartment *compartments, struct gas_pair gas, float ambientPressure, float targetPressure);
float noDecompressionLimit(struct decompression_settings decoSettings, struct tissue_compartment *compartments, struct gas_pair gas, float ambientPressure);
float calculateCeiling(struct tissue_compartment *compartments);
void copyCompartments(struct tissue_compartment *from, struct tissue_compartment *to);