Set O2 partial pressure for CCR dives correctly

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Robert C. Helling 2014-09-19 09:36:29 +02:00 committed by Dirk Hohndel
parent 4891b00224
commit 7cdf55ffcc

1
dive.c
View file

@ -1466,6 +1466,7 @@ extern void fill_pressures(struct gas_pressures *pressures, const double amb_pre
pressures->he = 0;
pressures->n2 = 0;
} else {
pressures->o2 = po2;
pressures->he = (amb_pressure - pressures->o2) * (double)get_he(mix) / (1000 - get_o2(mix));
pressures->n2 = amb_pressure - pressures->o2 - pressures->he;
}