diff options
Diffstat (limited to 'profile.c')
-rw-r--r-- | profile.c | 18 |
1 files changed, 6 insertions, 12 deletions
@@ -1278,17 +1278,14 @@ static void calculate_gas_information(struct dive *dive, struct plot_info *pi) * END just uses N2 */ entry->mod = (prefs.mod_ppO2 / fo2 * 1000 - 1) * 10000; entry->ead = (entry->depth + 10000) * - (entry->po2 + (amb_pressure - entry->po2) * (1 - ratio)) / amb_pressure - - 10000; + (entry->po2 + (amb_pressure - entry->po2) * (1 - ratio)) / amb_pressure - 10000; entry->end = (entry->depth + 10000) * - (amb_pressure - entry->po2) * (1 - ratio) / amb_pressure / N2_IN_AIR * 1000 - - 10000; + (amb_pressure - entry->po2) * (1 - ratio) / amb_pressure / N2_IN_AIR * 1000 - 10000; entry->eadd = (entry->depth + 10000) * (entry->po2 / amb_pressure * O2_DENSITY + entry->pn2 / amb_pressure * N2_DENSITY + entry->phe / amb_pressure * HE_DENSITY) / - (O2_IN_AIR * O2_DENSITY + N2_IN_AIR * N2_DENSITY) * 1000 - - 10000; + (O2_IN_AIR * O2_DENSITY + N2_IN_AIR * N2_DENSITY) * 1000 - 10000; if (entry->mod < 0) entry->mod = 0; if (entry->ead < 0) @@ -1343,17 +1340,14 @@ static void calculate_gas_information_new(struct dive *dive, struct plot_info *p * END just uses N2 */ entry->mod = (prefs.mod_ppO2 / fo2 * 1000 - 1) * 10000; entry->ead = (entry->depth + 10000) * - (entry->po2 + (amb_pressure - entry->po2) * (1 - ratio)) / amb_pressure - - 10000; + (entry->po2 + (amb_pressure - entry->po2) * (1 - ratio)) / amb_pressure - 10000; entry->end = (entry->depth + 10000) * - (amb_pressure - entry->po2) * (1 - ratio) / amb_pressure / N2_IN_AIR * 1000 - - 10000; + (amb_pressure - entry->po2) * (1 - ratio) / amb_pressure / N2_IN_AIR * 1000 - 10000; entry->eadd = (entry->depth + 10000) * (entry->po2 / amb_pressure * O2_DENSITY + entry->pn2 / amb_pressure * N2_DENSITY + entry->phe / amb_pressure * HE_DENSITY) / - (O2_IN_AIR * O2_DENSITY + N2_IN_AIR * N2_DENSITY) * 1000 - - 10000; + (O2_IN_AIR * O2_DENSITY + N2_IN_AIR * N2_DENSITY) * 1000 - 10000; if (entry->mod < 0) entry->mod = 0; if (entry->ead < 0) |