mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Correct pO2 formula in CNS calculation.
In commit e58f54cac1
("Fix ATM-vs-bar confusion") Linus broke the CNS
calculations; The partial pressure is fraction of gas times ambient
pressure, not divided by.
[Dirk Hohndel: identical patch sent by Robert and Anton; I combined the
commit messages and added the ACK from the perpetrator]
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a4050c2a71
commit
1b2d3c29d3
1 changed files with 1 additions and 1 deletions
|
@ -246,7 +246,7 @@ static int calculate_cns(struct dive *dive)
|
|||
po2 = sample->po2.mbar;
|
||||
} else {
|
||||
int o2 = active_o2(dive, dc, sample->time);
|
||||
po2 = o2 / depth_to_atm(sample->depth.mm, dive);
|
||||
po2 = o2 * depth_to_atm(sample->depth.mm, dive);
|
||||
}
|
||||
/* Find what table-row we should calculate % for */
|
||||
for (j = 1; j < sizeof(cns_table) / (sizeof(int) * 3); j++)
|
||||
|
|
Loading…
Add table
Reference in a new issue