mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix ATM-vs-bar confusion
SAC should be calculated in relationship to surface pressure, not "1 bar".
I also realize that we have a few other cases where we do the same
mistake: the partial pressure calculations do things like
po2 = o2 / 1000.0 * depth_to_mbar(sample->depth.mm, dive);
which is wrong as well - the partial pressure is also relative to
standard atmospheric pressures.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
92bbed3304
commit
e58f54cac1
4 changed files with 16 additions and 6 deletions
|
|
@ -226,7 +226,7 @@ static int get_local_sac(struct plot_data *entry1, struct plot_data *entry2, str
|
|||
|
||||
/* Mean pressure in ATM */
|
||||
depth = (entry1->depth + entry2->depth) / 2;
|
||||
atm = (double) depth_to_mbar(depth, dive) / SURFACE_PRESSURE;
|
||||
atm = depth_to_atm(depth, dive);
|
||||
|
||||
cyl = dive->cylinder + index;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue