comparison Discovery/Src/buehlmann.c @ 973:79b522fbabe6 Evo_2_23

Deactivate deco gas calculation option: In the previous version had the option to consider a deco gas i the calculation or not. Reason for this was to have the automatic gas suggestion available while the deco calculation is still based on the current gas. This might cause a critical situation in case the diver is not sure if the option is active or not => In the new version the TTS / deco is always calculated considering all deco gases.
author Ideenmodellierer
date Sun, 26 Jan 2025 19:31:38 +0100
parents 974648b5ccfe
children 7891160acde3
comparison
equal deleted inserted replaced
972:12426391edd9 973:79b522fbabe6
257 tts_seconds += ascend_time; 257 tts_seconds += ascend_time;
258 gStop.depth = next_depth; 258 gStop.depth = next_depth;
259 for(i = gGas_id + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++) 259 for(i = gGas_id + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++)
260 { 260 {
261 if((pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) 261 if((pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0)
262 || (pDiveSettings->gas[pDiveSettings->decogaslist[i].GasIdInSettings].note.ub.decocalc == 0)) 262 #ifdef ENABLE_DECOCALC_OPTION
263 || (pDiveSettings->gas[pDiveSettings->decogaslist[i].GasIdInSettings].note.ub.decocalc == 0)
264 #endif
265 )
263 { 266 {
264 break; 267 break;
265 } 268 }
266 float pressureChange = ((float)pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero) / 10; 269 float pressureChange = ((float)pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero) / 10;
267 if(gStop.depth <= pressureChange + 0.00001f) 270 if(gStop.depth <= pressureChange + 0.00001f)
460 do{ 463 do{
461 pressureTop_tmp = pressureTop; 464 pressureTop_tmp = pressureTop;
462 for(i = gGas_id + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++) 465 for(i = gGas_id + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++)
463 { 466 {
464 if((pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) 467 if((pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0)
465 || (pDiveSettings->gas[pDiveSettings->decogaslist[i].GasIdInSettings].note.ub.decocalc == 0)) 468 #ifdef ENABLE_DECOCALC_OPTION
469 || (pDiveSettings->gas[pDiveSettings->decogaslist[i].GasIdInSettings].note.ub.decocalc == 0)
470 #endif
471 )
466 { 472 {
467 break; 473 break;
468 } 474 }
469 pressureChange = gSurface_pressure_bar + ((float)pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero) / 10; 475 pressureChange = gSurface_pressure_bar + ((float)pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero) / 10;
470 if(pressureBottom <= pressureChange) 476 if(pressureBottom <= pressureChange)
478 484
479 } 485 }
480 for(i = gGas_id + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++) 486 for(i = gGas_id + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++)
481 { 487 {
482 if((pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) 488 if((pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0)
483 || (pDiveSettings->gas[pDiveSettings->decogaslist[i].GasIdInSettings].note.ub.decocalc == 0)) 489 #ifdef ENABLE_DECOCALC_OPTION
490 || (pDiveSettings->gas[pDiveSettings->decogaslist[i].GasIdInSettings].note.ub.decocalc == 0)
491 #endif
492 )
484 { 493 {
485 break; 494 break;
486 } 495 }
487 496
488 pressureChange = gSurface_pressure_bar + ((float)pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero)/ 10; 497 pressureChange = gSurface_pressure_bar + ((float)pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero)/ 10;