116
|
1 // *********************************************************
|
|
2 // ** Common definitions for the OSTC decompression code **
|
|
3 // *********************************************************
|
|
4
|
|
5 //////////////////////////////////////////////////////////////////////////////
|
|
6 // OSTC - diving computer code
|
|
7 // Copyright (C) 2008 HeinrichsWeikamp GbR
|
|
8 //
|
|
9 // This program is free software: you can redistribute it and/or modify
|
|
10 // it under the terms of the GNU General Public License as published by
|
|
11 // the Free Software Foundation, either version 3 of the License, or
|
|
12 // (at your option) any later version.
|
|
13 //
|
|
14 // This program is distributed in the hope that it will be useful,
|
|
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17 // GNU General Public License for more details.
|
|
18 //
|
|
19 // You should have received a copy of the GNU General Public License
|
|
20 // along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21 //
|
|
22 //////////////////////////////////////////////////////////////////////////////
|
|
23 // history:
|
|
24 // 12/25/10 v110: [jDG] split in three files (deco.c, main.c, definitions.h)
|
|
25
|
|
26 # define DBG_c_gas 0b0000000000000001
|
|
27 # define DBG_c_ppO2 0b0000000000000010
|
|
28 # define DBG_RUN 0b0000000000000100
|
|
29 # define DBG_RESTART 0b0000000000001000
|
|
30
|
|
31 # define DBG_CdeSAT 0b0000000000010000
|
|
32 # define DBG_C_MODE 0b0000000000100000
|
|
33 # define DBG_C_SURF 0b0000000001000000
|
|
34 # define DBG_HEwoHE 0b0000000010000000
|
|
35
|
|
36 # define DBG_C_DPPO2 0b0000000100000000
|
|
37 # define DBG_C_DGAS 0b0000001000000000
|
|
38 # define DBG_C_DIST 0b0000010000000000
|
|
39 # define DBG_C_LAST 0b0000100000000000
|
|
40
|
|
41 # define DBG_C_GF 0b0001000000000000
|
|
42 # define DBG_ZH16ERR 0b0010000000000000
|
|
43 # define DBG_PHIGH 0b0100000000000000
|
|
44 # define DBG_PLOW 0b1000000000000000
|
|
45
|
|
46
|
|
47 # define DBS_mode 0b0000000000000001
|
|
48 # define DBS_ppO2 0b0000000000000010
|
|
49 # define DBS_HE_sat 0b0000000000000100
|
|
50 # define DBS_ppO2chg 0b0000000000001000
|
|
51
|
|
52 # define DBS_SAT2l 0b0000000000010000
|
|
53 # define DBS_SAT2h 0b0000000000100000
|
|
54 # define DBS_GFLOW2l 0b0000000001000000
|
|
55 # define DBS_GFLOW2h 0b0000000010000000
|
|
56
|
|
57 # define DBS_GFHGH2l 0b0000000100000000
|
|
58 # define DBS_GFHGH2h 0b0000001000000000
|
|
59 # define DBS_GASO22l 0b0000010000000000
|
|
60 # define DBS_GASO22h 0b0000100000000000
|
|
61
|
|
62 # define DBS_DIST2h 0b0001000000000000
|
|
63 # define DBS_LAST2h 0b0010000000000000
|
|
64 # define DBS_DECOO2l 0b0100000000000000
|
|
65 # define DBS_DECOO2h 0b1000000000000000
|
|
66
|
|
67
|
|
68 # define DBS2_PRES2h 0b0000000000000001
|
|
69 # define DBS2_PRES2l 0b0000000000000010
|
|
70 # define DBS2_SURF2l 0b0000000000000100
|
|
71 # define DBS2_SURF2h 0b0000000000001000
|
|
72
|
|
73 # define DBS2_DESAT2l 0b0000000000010000
|
|
74 # define DBS2_DESAT2h 0b0000000000100000
|
|
75 # define DBS2_GFDneg 0b0000000001000000
|
|
76 # define DBS2_ 0b000000000000000
|
|
77
|
|
78 # define DBS2_ 0b000000000000000
|
|
79 # define DBS2_ 0b000000000000000
|
|
80 # define DBS2_ 0b000000000000000
|
|
81 # define DBS2_ 0b000000000000000
|
|
82
|
|
83 # define MBAR_REACH_GASCHANGE_AUTO_CHANGE_OFF 150
|
|
84
|
|
85 // *************************
|
|
86 // ** P R O T O T Y P E S **
|
|
87 // *************************
|
|
88 void calc_hauptroutine(void);
|
|
89 void calc_tissue(void);
|
|
90 void calc_nullzeit(void);
|
|
91 void backup_sim_pres_tissue(void);
|
|
92 void restore_sim_pres_tissue(void);
|
|
93
|
|
94 void calc_without_deco(void);
|
|
95 void clear_tissue(void);
|
|
96 void calc_ascenttime(void);
|
|
97 void update_startvalues(void);
|
|
98 void clear_decoarray(void);
|
|
99 void update_decoarray(void);
|
|
100 void sim_tissue_1min(void);
|
|
101 void sim_tissue_10min(void);
|
|
102 void calc_gradient_factor(void);
|
|
103 void calc_wo_deco_step_1_min(void);
|
|
104 void calc_tissue_step_1_min(void);
|
|
105 //void debug(void);
|
|
106 void calc_percentage(void);
|
|
107 void calc_hauptroutine_data_input(void);
|
|
108 void calc_hauptroutine_update_tissues(void);
|
|
109 void calc_hauptroutine_calc_deco(void);
|
|
110 void calc_hauptroutine_calc_ascend_to_deco(void);
|
|
111 //void build_debug_output(void);
|
|
112 void calc_nextdecodepth_GF(void);
|
|
113 void copy_deco_table_GF(void);
|
|
114 void clear_internal_deco_table_GF(void);
|
|
115 void update_internal_deco_table_GF(void);
|
|
116
|
|
117
|
|
118 void deco_calc_hauptroutine(void);
|
|
119 void deco_calc_without_deco(void);
|
|
120 void deco_clear_tissue(void);
|
|
121 void deco_calc_percentage(void);
|
|
122 void deco_calc_wo_deco_step_1_min(void);
|
|
123 void deco_debug(void);
|
|
124 void deco_gradient_array(void);
|
|
125 void deco_hash(void);
|
|
126 void deco_calc_desaturation_time(void);
|
|
127 void deco_calc_CNS_fraction(void);
|
|
128 void deco_clear_CNS_fraction(void);
|
|
129 void deco_push_tissues_to_vault(void);
|
|
130 void deco_pull_tissues_from_vault(void);
|