changeset 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 486dddfba7ce
children 5f535ef6a3db
files Discovery/Src/t7.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Discovery/Src/t7.c	Mon Apr 01 09:01:09 2019 +0000
+++ b/Discovery/Src/t7.c	Fri Mar 29 14:00:43 2019 +0100
@@ -2838,7 +2838,7 @@
         change.y = start.y;
 
         value = pState->lifeData.tissue_nitrogen_bar[i] - 0.7512f;
-        value *= 80;//20
+        value *= 80;
 
         if(value < 0)
             front = 0;
@@ -2935,10 +2935,10 @@
     }
 
     stop.y = start.y - (3 * 15) - 1;
-    if((percent_N2 > 0) && (partial_pressure_N2 > 0.8f))//(0.8f + 0.5f)))
+    if((percent_N2 > 0) && (partial_pressure_N2 > 0.7512f))
     {
-        value = partial_pressure_N2;
-        value *= 80;//20
+        value = partial_pressure_N2 - 0.7512f;
+        value *= 80;
 
         if(value < 0)
             front = 3;
@@ -2971,7 +2971,7 @@
     {
 
         value = partial_pressure_He;
-        value *= 80;//20
+        value *= 80;
 
         if(value < 0)
             front = 3;