comparison src/p2_deco.c @ 595:1719de53e497

2.97 SP2 (999bar fix)
author heinrichsweikamp
date Mon, 25 Jun 2018 18:29:54 +0200
parents 146e50d2672f
children 66334c6adcf6
comparison
equal deleted inserted replaced
594:b891cd260d1b 595:1719de53e497
2728 assert( sim_depth_limit > 0 ); // No stop at surface... 2728 assert( sim_depth_limit > 0 ); // No stop at surface...
2729 2729
2730 // loop through internal deco table 2730 // loop through internal deco table
2731 for(x=0; x<NUM_STOPS; ++x) 2731 for(x=0; x<NUM_STOPS; ++x)
2732 { 2732 {
2733 // Make sure deco-stops are recorded in order: 2733 // In case the first deco stop is to be placed deeper than previously recorded
2734 assert( !internal_deco_depth[x] || sim_depth_limit <= internal_deco_depth[x] ); 2734 // stops for gas changes during the initial ascent (this may happen because the
2735 2735 // deco stops are placed at the next deeper multiple of 3 meters instead of the
2736 // real stop's depth), relocate the deco stop to the depth of the last gas change.
2737 // The resulting combined stop's duration will be the sum of the configured gas
2738 // change time plus the duration of the deco stop itself.
2739 if( internal_deco_depth[x] && (sim_depth_limit > internal_deco_depth[x]) )
2740 sim_depth_limit = internal_deco_depth[x];
2741
2736 // Is there already a stop entry for our current depth? 2742 // Is there already a stop entry for our current depth?
2737 if( internal_deco_depth[x] == sim_depth_limit ) 2743 if( internal_deco_depth[x] == sim_depth_limit )
2738 { 2744 {
2739 // Yes - increment stop time if possible 2745 // Yes - increment stop time if possible
2740 // Stop time entries are limited to 99 minutes because of display constraints. 2746 // Stop time entries are limited to 99 minutes because of display constraints.