Mercurial > public > mk2
comparison code_part1/OSTC_code_c_part2/p2_deco.c @ 710:d36f060e8203
bugfix CNS compute: NOAA tables are in ATA, not bar.
author | jDG |
---|---|
date | Wed, 08 May 2013 12:41:28 +0200 |
parents | 1a5804e21d3f |
children | f555590f1419 |
comparison
equal
deleted
inserted
replaced
709:74878be38d4c | 710:d36f060e8203 |
---|---|
2153 | 2153 |
2154 if( char_I_step_is_1min == 1 ) | 2154 if( char_I_step_is_1min == 1 ) |
2155 time_factor = 30.0f; | 2155 time_factor = 30.0f; |
2156 else if( char_I_step_is_1min == 2 ) | 2156 else if( char_I_step_is_1min == 2 ) |
2157 time_factor = 300.0f; | 2157 time_factor = 300.0f; |
2158 | 2158 //------------------------------------------------------------------------ |
2159 // Don't increase CNS below 0.5 bar, but keep it steady. | |
2159 if (char_I_actual_ppO2 < 50) | 2160 if (char_I_actual_ppO2 < 50) |
2160 ; // no changes | 2161 ; // no changes |
2162 //------------------------------------------------------------------------ | |
2163 // Below (and including) 1.60 bar | |
2161 else if (char_I_actual_ppO2 < 60) | 2164 else if (char_I_actual_ppO2 < 60) |
2162 CNS_fraction += time_factor/(-540.0 * char_I_actual_ppO2 + 54000.0); | 2165 CNS_fraction += time_factor/(-533.07 * char_I_actual_ppO2 + 54000.0); |
2163 else if (char_I_actual_ppO2 < 70) | 2166 else if (char_I_actual_ppO2 < 70) |
2164 CNS_fraction += time_factor/(-450.0 * char_I_actual_ppO2 + 48600.0); | 2167 CNS_fraction += time_factor/(-444.22 * char_I_actual_ppO2 + 48600.0); |
2165 else if (char_I_actual_ppO2 < 80) | 2168 else if (char_I_actual_ppO2 < 80) |
2166 CNS_fraction += time_factor/(-360.0 * char_I_actual_ppO2 + 42300.0); | 2169 CNS_fraction += time_factor/(-355.38 * char_I_actual_ppO2 + 42300.0); |
2167 else if (char_I_actual_ppO2 < 90) | 2170 else if (char_I_actual_ppO2 < 90) |
2168 CNS_fraction += time_factor/(-270.0 * char_I_actual_ppO2 + 35100.0); | 2171 CNS_fraction += time_factor/(-266.53 * char_I_actual_ppO2 + 35100.0); |
2169 else if (char_I_actual_ppO2 < 110) | 2172 else if (char_I_actual_ppO2 < 110) |
2170 CNS_fraction += time_factor/(-180.0 * char_I_actual_ppO2 + 27000.0); | 2173 CNS_fraction += time_factor/(-177.69 * char_I_actual_ppO2 + 27000.0); |
2171 else if (char_I_actual_ppO2 < 150) | 2174 else if (char_I_actual_ppO2 < 150) |
2172 CNS_fraction += time_factor/( -90.0 * char_I_actual_ppO2 + 17100.0); | 2175 CNS_fraction += time_factor/( -88.84 * char_I_actual_ppO2 + 17100.0); |
2173 else if (char_I_actual_ppO2 < 160) | |
2174 CNS_fraction += time_factor/(-225.0 * char_I_actual_ppO2 + 37350.0); | |
2175 else if (char_I_actual_ppO2 < 165) | 2176 else if (char_I_actual_ppO2 < 165) |
2176 CNS_fraction += time_factor*0.000755; // Arieli et all.(2002): Modeling pulmonary and CNS O2 toxicity... Formula (A1) based on value for 1.55 and c=20 | 2177 CNS_fraction += time_factor/(-222.11 * char_I_actual_ppO2 + 37350.0); |
2177 else if (char_I_actual_ppO2 < 170) | 2178 //------------------------------------------------------------------------ |
2178 CNS_fraction += time_factor*0.00102; // example calculation: Sqrt((1.7/1.55)^20)*0.000404 | 2179 // Arieli et all.(2002): Modeling pulmonary and CNS O2 toxicity: |
2180 // J Appl Physiol 92: 248–256, 2002, doi:10.1152/japplphysiol.00434.2001 | |
2181 // Formula (A1) based on value for 1.55 and c=20 | |
2182 // example calculation: Sqrt((1.7/1.55)^20)*0.000404 | |
2183 else if (char_I_actual_ppO2 < 170) | |
2184 CNS_fraction += time_factor*0.00102; | |
2179 else if (char_I_actual_ppO2 < 175) | 2185 else if (char_I_actual_ppO2 < 175) |
2180 CNS_fraction += time_factor*0.00136; | 2186 CNS_fraction += time_factor*0.00136; |
2181 else if (char_I_actual_ppO2 < 180) | 2187 else if (char_I_actual_ppO2 < 180) |
2182 CNS_fraction += time_factor*0.00180; | 2188 CNS_fraction += time_factor*0.00180; |
2183 else if (char_I_actual_ppO2 < 185) | 2189 else if (char_I_actual_ppO2 < 185) |