summaryrefslogtreecommitdiffstats
path: root/core/profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/profile.c')
-rw-r--r--core/profile.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/core/profile.c b/core/profile.c
index 935f95ede..abe1757c4 100644
--- a/core/profile.c
+++ b/core/profile.c
@@ -962,10 +962,7 @@ void calculate_deco_information(struct dive *dive, struct divecomputer *dc, stru
int time_stepsize = 20;
entry->ambpressure = depth_to_bar(entry->depth, dive);
- entry->gfline = MAX((double)prefs.gflow, (entry->ambpressure - surface_pressure) / (gf_low_pressure_this_dive - surface_pressure) *
- (prefs.gflow - prefs.gfhigh) +
- prefs.gfhigh) *
- (100.0 - AMB_PERCENTAGE) / 100.0 + AMB_PERCENTAGE;
+ entry->gfline = get_gf(entry->ambpressure, dive) * (100.0 - AMB_PERCENTAGE) + AMB_PERCENTAGE;
if (t0 > t1) {
fprintf(stderr, "non-monotonous dive stamps %d %d\n", t0, t1);
int xchg = t1;