diff options
author | Robert C. Helling <helling@atdotde.de> | 2015-07-06 00:07:39 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-07-05 15:53:49 -0700 |
commit | a7d18a9fa649e1f6e9b7d553e286abce8a430b9a (patch) | |
tree | 61737419a9b77a6737d931fc4e195579fcb19e70 /profile.c | |
parent | 9c6a3a7ff387578ddede2e69d8b994a11cf8eaee (diff) | |
download | subsurface-a7d18a9fa649e1f6e9b7d553e286abce8a430b9a.tar.gz |
Round MOD of gas rather than truncate
For the proper calculation, we need to take salinity and surface pressure
into account (rather than depth = bar * 10 - 10)
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r-- | profile.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -963,7 +963,7 @@ static void calculate_gas_information_new(struct dive *dive, struct plot_info *p * END takes O₂ + N₂ (air) into account ("Narcotic" for trimix dives) * EAD just uses N₂ ("Air" for nitrox dives) */ pressure_t modpO2 = { .mbar = (int)(prefs.modpO2 * 1000) }; - entry->mod = (double)gas_mod(&dive->cylinder[cylinderindex].gasmix, modpO2, 1).mm; + entry->mod = (double)gas_mod(&dive->cylinder[cylinderindex].gasmix, modpO2, dive, 1).mm; entry->end = (entry->depth + 10000) * (1000 - fhe) / 1000.0 - 10000; entry->ead = (entry->depth + 10000) * fn2 / (double)N2_IN_AIR - 10000; entry->eadd = (entry->depth + 10000) * |