comparison code_part1/OSTC_code_c_part2/p2_deco.c @ 523:48bbb1a81027

New no need to check stops while in NDL.
author JeanDo
date Fri, 09 Dec 2011 20:43:46 +0100
parents 3e9904d3c040
children 6fa776a44768
comparison
equal deleted inserted replaced
522:e33a8ac4b660 523:48bbb1a81027
1304 gas_switch_find_current(); // Lookup for current gas & time. 1304 gas_switch_find_current(); // Lookup for current gas & time.
1305 gas_switch_set(); // setup calc_ratio's 1305 gas_switch_set(); // setup calc_ratio's
1306 1306
1307 calc_nullzeit(); 1307 calc_nullzeit();
1308 check_ndl(); 1308 check_ndl();
1309 char_O_deco_status = 2; // calc ascent next time. 1309 if( char_O_nullzeit > 0 ) // Some NDL time left ?
1310 char_O_deco_status = 0; // YES: recalc ndl next time.
1311 else
1312 char_O_deco_status = 2; // NO: calc ascent next time.
1310 break; 1313 break;
1311 1314
1312 case 2: //---- Simulate ascent to first stop ----------------------------- 1315 case 2: //---- Simulate ascent to first stop -----------------------------
1313 case 6: // @+5min variation 1316 case 6: // @+5min variation
1314 // Check proposed gas at begin of ascent simulation 1317 // Check proposed gas at begin of ascent simulation
1458 // Calc limit for surface, ie. GF_high. 1461 // Calc limit for surface, ie. GF_high.
1459 calc_limit(); 1462 calc_limit();
1460 1463
1461 int_O_gtissue_limit = (short)(calc_lead_tissue_limit * 1000); 1464 int_O_gtissue_limit = (short)(calc_lead_tissue_limit * 1000);
1462 int_O_gtissue_press = (short)((pres_tissue_N2[char_O_gtissue_no] + pres_tissue_He[char_O_gtissue_no]) * 1000); 1465 int_O_gtissue_press = (short)((pres_tissue_N2[char_O_gtissue_no] + pres_tissue_He[char_O_gtissue_no]) * 1000);
1463
1464 // if guiding tissue can not be exposed to surface pressure immediately
1465 if( calc_lead_tissue_limit > pres_surface && char_O_deco_status == 0)
1466 {
1467 char_O_nullzeit = 0; // deco necessary
1468 char_O_deco_status = 2; // calculate ascent on next iteration.
1469 }
1470 } 1466 }
1471 1467
1472 1468
1473 ////////////////////////////////////////////////////////////////////////////// 1469 //////////////////////////////////////////////////////////////////////////////
1474 // Compute stops. 1470 // Compute stops.