comparison Discovery/Src/t7.c @ 222:9b4b3decd9ba div-fixes-3

Bugfix: correct presentation error in tissues custom view The green vertical line in the N2/He bars show the inspired partial pressures of the respective gasses. Obviously, the tissue partial pressure is always lower on an initial descent, than the inspired partial pressure of the respective gas. Further, when for a given depth, the inspired partial pressure is equal to the tissue partial pressure, the tissue gets fully saturated, so the bars stop at the green line. For N2, a simple presentation error was present. As the body is always saturated with about 75% of N2 (according to the Buelmann algorithm), the tissue N2 was shifted left for that amount, but the inspired N2 line was not. So, the N2 green vertical line was too far to the right. Corrected this. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
author Jan Mulder <jlmulder@xs4all.nl>
date Fri, 29 Mar 2019 14:00:43 +0100
parents 4a0ebade04f5
children 2bb1db22b5f5
comparison
equal deleted inserted replaced
221:486dddfba7ce 222:9b4b3decd9ba
2836 { 2836 {
2837 stop.y = start.y; 2837 stop.y = start.y;
2838 change.y = start.y; 2838 change.y = start.y;
2839 2839
2840 value = pState->lifeData.tissue_nitrogen_bar[i] - 0.7512f; 2840 value = pState->lifeData.tissue_nitrogen_bar[i] - 0.7512f;
2841 value *= 80;//20 2841 value *= 80;
2842 2842
2843 if(value < 0) 2843 if(value < 0)
2844 front = 0; 2844 front = 0;
2845 else 2845 else
2846 if(value > CUSTOMBOX_SPACE_INSIDE) 2846 if(value > CUSTOMBOX_SPACE_INSIDE)
2933 { 2933 {
2934 start.y = t7cH.WindowY1 - 5; 2934 start.y = t7cH.WindowY1 - 5;
2935 } 2935 }
2936 2936
2937 stop.y = start.y - (3 * 15) - 1; 2937 stop.y = start.y - (3 * 15) - 1;
2938 if((percent_N2 > 0) && (partial_pressure_N2 > 0.8f))//(0.8f + 0.5f))) 2938 if((percent_N2 > 0) && (partial_pressure_N2 > 0.7512f))
2939 { 2939 {
2940 value = partial_pressure_N2; 2940 value = partial_pressure_N2 - 0.7512f;
2941 value *= 80;//20 2941 value *= 80;
2942 2942
2943 if(value < 0) 2943 if(value < 0)
2944 front = 3; 2944 front = 3;
2945 else if(value + 5 > CUSTOMBOX_SPACE_INSIDE) 2945 else if(value + 5 > CUSTOMBOX_SPACE_INSIDE)
2946 front = CUSTOMBOX_SPACE_INSIDE - 3; 2946 front = CUSTOMBOX_SPACE_INSIDE - 3;
2969 stop.y = start.y - (3 * 15) - 1; 2969 stop.y = start.y - (3 * 15) - 1;
2970 if((percent_He > 0) && (partial_pressure_He > 0.01f)) // 0.5f 2970 if((percent_He > 0) && (partial_pressure_He > 0.01f)) // 0.5f
2971 { 2971 {
2972 2972
2973 value = partial_pressure_He; 2973 value = partial_pressure_He;
2974 value *= 80;//20 2974 value *= 80;
2975 2975
2976 if(value < 0) 2976 if(value < 0)
2977 front = 3; 2977 front = 3;
2978 else if(value + 5 > CUSTOMBOX_SPACE_INSIDE) 2978 else if(value + 5 > CUSTOMBOX_SPACE_INSIDE)
2979 front = CUSTOMBOX_SPACE_INSIDE - 3; 2979 front = CUSTOMBOX_SPACE_INSIDE - 3;