comparison code_part1/OSTC_code_c_part2/p2_deco.c @ 567:8666b14fce24 bug_deco_clearing_missed_stops

Fix deepest low_depth value
author JeanDo
date Sat, 03 Mar 2012 22:26:33 +0100
parents 4e9e95d108d2
children a4586e115ded
comparison
equal deleted inserted replaced
565:19161c50654a 567:8666b14fce24
524 if( char_I_deco_model != 0 ) 524 if( char_I_deco_model != 0 )
525 { 525 {
526 overlay unsigned char first_stop = 0; 526 overlay unsigned char first_stop = 0;
527 overlay float p; 527 overlay float p;
528 528
529 if( depth >= low_depth ) 529 sim_limit( GF_low );
530 sim_limit( GF_low );
531 else
532 sim_limit( GF_high - depth * locked_GF_step );
533
534 p = sim_lead_tissue_limit - pres_surface; 530 p = sim_lead_tissue_limit - pres_surface;
535 if( p <= 0.0f ) 531 if( p <= 0.0f )
536 goto no_deco_stop; // We can surface directly... 532 goto no_deco_stop; // We can surface directly...
537 533
538 p *= BAR_TO_METER; 534 p *= BAR_TO_METER;
1025 char_O_deco_status = 0; // Calc bottom-time/nullzeit next iteration. 1021 char_O_deco_status = 0; // Calc bottom-time/nullzeit next iteration.
1026 1022
1027 // Values that should be reset just once for the full real dive. 1023 // Values that should be reset just once for the full real dive.
1028 // This is used to record the lowest stop for the whole dive, 1024 // This is used to record the lowest stop for the whole dive,
1029 // Including ACCROSS all simulated ascent. 1025 // Including ACCROSS all simulated ascent.
1030 // NOTE: Use a default of 6m (like the 10m in the DR5 code). 1026 low_depth = 0;
1031 // Because this produces less babling stops at the 1027 locked_GF_step = 0.0;
1032 // beginning of the decompression. But putting a value too high
1033 // have the immediat effect of using lower GF for shallow dives...
1034 low_depth = 6;
1035 1028
1036 // Reset gas switch history. 1029 // Reset gas switch history.
1037 backup_gas_used = sim_gas_last_used = 0; 1030 backup_gas_used = sim_gas_last_used = 0;
1038 backup_gas_depth = sim_gas_last_depth = 0; 1031 backup_gas_depth = sim_gas_last_depth = 0;
1039 backup_gas_delay = sim_gas_delay = 0; 1032 backup_gas_delay = sim_gas_delay = 0;