comparison code_part1/OSTC_code_c_part2/p2_deco.c @ 216:c7e32ff65636

BUGFIX typo when last stop is just below 3m.
author JeanDo
date Thu, 24 Feb 2011 23:22:14 +0100
parents 275befc5f39d
children ce6f16711567
comparison
equal deleted inserted replaced
215:df63e01ac992 216:c7e32ff65636
633 overlay unsigned char next_stop; // Next index (0..30) 633 overlay unsigned char next_stop; // Next index (0..30)
634 overlay float pres_stop; // Next depth (0m..90m) 634 overlay float pres_stop; // Next depth (0m..90m)
635 635
636 if( first_stop <= char_I_depth_last_deco ) // new in v104 636 if( first_stop <= char_I_depth_last_deco ) // new in v104
637 next_stop = 0; 637 next_stop = 0;
638 else if( first_stop == 6 )
639 next_stop = char_I_depth_last_deco;
638 else 640 else
639 next_stop = first_stop - 3; // Index of next (upper) stop. 641 next_stop = first_stop - 3; // Index of next (upper) stop.
640 if( first_stop == 3 )
641 first_stop = char_I_depth_last_deco;
642 642
643 pres_stop = next_stop * 0.09995 // Meters to bar 643 pres_stop = next_stop * 0.09995 // Meters to bar
644 + pres_surface; 644 + pres_surface;
645 645
646 // Keep GF_low until a first stop depth is found: 646 // Keep GF_low until a first stop depth is found: