comparison code_part1/OSTC_code_c_part2/p2_deco.c @ 568:a4586e115ded bug_deco_clearing_missed_stops

Minor typo cleanup.
author JeanDo
date Sat, 03 Mar 2012 22:26:33 +0100
parents 8666b14fce24
children fff1d38625f0
comparison
equal deleted inserted replaced
567:8666b14fce24 568:a4586e115ded
543 first_stop = char_I_depth_last_deco; // Use last 3m..6m instead. 543 first_stop = char_I_depth_last_deco; // Use last 3m..6m instead.
544 544
545 // Store the deepest point needing a deco stop as the LOW reference for GF. 545 // Store the deepest point needing a deco stop as the LOW reference for GF.
546 // NOTE: following stops will be validated using this LOW-HIGH gf scale, 546 // NOTE: following stops will be validated using this LOW-HIGH gf scale,
547 // so if we want to keep coherency, we should not validate this stop 547 // so if we want to keep coherency, we should not validate this stop
548 // yet, but apply the search as all the following stops afterward. 548 // yet, but apply the search to it, as for all the following stops afterward.
549 if( first_stop > low_depth ) 549 if( first_stop > low_depth )
550 { 550 {
551 low_depth = first_stop; 551 low_depth = first_stop;
552 locked_GF_step = GF_delta / low_depth; 552 locked_GF_step = GF_delta / first_stop;
553 } 553 }
554 554
555 // We have a stop candidate. 555 // We have a stop candidate.
556 // But maybe ascending to the next stop will diminish the constraint, 556 // But maybe ascending to the next stop will diminish the constraint,
557 // because the GF might decrease more than the preassure gradient... 557 // because the GF might decrease more than the preassure gradient...
763 void deco_calc_dive_interval(void) 763 void deco_calc_dive_interval(void)
764 { 764 {
765 RESET_C_STACK 765 RESET_C_STACK
766 calc_dive_interval(); 766 calc_dive_interval();
767 } 767 }
768
769 768
770 ////////////////////////////////////////////////////////////////////////////// 769 //////////////////////////////////////////////////////////////////////////////
771 // Find current gas in the list (if any). 770 // Find current gas in the list (if any).
772 // 771 //
773 // Input: char_I_current_gas = 1..6 772 // Input: char_I_current_gas = 1..6
1955 ppN2 = N2_ratio * (pres_respiration - ppWater); 1954 ppN2 = N2_ratio * (pres_respiration - ppWater);
1956 ppHe = 0.0; 1955 ppHe = 0.0;
1957 float_desaturation_multiplier = char_I_desaturation_multiplier * (0.01 * SURFACE_DESAT_FACTOR); 1956 float_desaturation_multiplier = char_I_desaturation_multiplier * (0.01 * SURFACE_DESAT_FACTOR);
1958 float_saturation_multiplier = char_I_saturation_multiplier * 0.01; 1957 float_saturation_multiplier = char_I_saturation_multiplier * 0.01;
1959 1958
1960 // Make sure SURFACE_DESAT_FACTOR is applyed: 1959 // Make sure SURFACE_DESAT_FACTOR is applied:
1961 backup_model = char_I_deco_model; 1960 backup_model = char_I_deco_model;
1962 char_I_deco_model = 0; 1961 char_I_deco_model = 0;
1963 1962
1964 //---- Perform simulation ------------------------------------------------ 1963 //---- Perform simulation ------------------------------------------------
1965 for(t=0; t<char_I_dive_interval; ++t) 1964 for(t=0; t<char_I_dive_interval; ++t)