Mercurial > public > mk2
comparison code_part1/OSTC_code_c_part2/p2_deco.c @ 252:8b252ff2eded
Bug bb13 : strange failling assertion...
author | JeanDo |
---|---|
date | Wed, 30 Mar 2011 02:23:47 +0200 |
parents | f0cba9cff25c |
children | f8f869bafd92 |
comparison
equal
deleted
inserted
replaced
251:f0cba9cff25c | 252:8b252ff2eded |
---|---|
1899 temp1 = log(1.0 - temp1); | 1899 temp1 = log(1.0 - temp1); |
1900 temp1 = temp1 / -0.6931; // temp1 is the multiples of half times necessary. | 1900 temp1 = temp1 / -0.6931; // temp1 is the multiples of half times necessary. |
1901 // 0.6931 is ln(2), because the math function log() calculates with a base of e not 2 as requested. | 1901 // 0.6931 is ln(2), because the math function log() calculates with a base of e not 2 as requested. |
1902 // minus because log is negative | 1902 // minus because log is negative |
1903 temp2 = var_N2_halftime * temp1 / float_desaturation_multiplier; // time necessary (in minutes ) for complete desaturation (see comment about 10 percent) , new in v.101: float_desaturation_multiplier | 1903 temp2 = var_N2_halftime * temp1 / float_desaturation_multiplier; // time necessary (in minutes ) for complete desaturation (see comment about 10 percent) , new in v.101: float_desaturation_multiplier |
1904 | |
1905 // HERE ==> This assert fails during simulated dives, and should not.... | |
1906 assert( temp2 < 28800.0 ); // 480h !! | |
1904 } | 1907 } |
1905 else | 1908 else |
1906 { | 1909 { |
1907 temp1 = 0.0; | 1910 temp1 = 0.0; |
1908 temp2 = 0.0; | 1911 temp2 = 0.0; |
1934 // saturation_time (for flight) | 1937 // saturation_time (for flight) |
1935 if (temp4 > temp2) | 1938 if (temp4 > temp2) |
1936 desat_time = (unsigned short)temp4; | 1939 desat_time = (unsigned short)temp4; |
1937 else | 1940 else |
1938 desat_time = (unsigned short)temp2; | 1941 desat_time = (unsigned short)temp2; |
1939 | 1942 |
1940 if(desat_time > int_O_desaturation_time) | 1943 if(desat_time > int_O_desaturation_time) |
1941 int_O_desaturation_time = desat_time; | 1944 int_O_desaturation_time = desat_time; |
1942 | 1945 |
1943 // N2 saturation in multiples of halftime for display purposes | 1946 // N2 saturation in multiples of halftime for display purposes |
1944 temp2 = temp1 * 20.0; // 0 = 1/8, 120 = 0, 249 = 8 | 1947 temp2 = temp1 * 20.0; // 0 = 1/8, 120 = 0, 249 = 8 |