diff options
| author | 2016-11-27 11:31:30 +0100 | |
|---|---|---|
| committer | 2016-12-04 05:32:08 +0900 | |
| commit | f03acb9e9a2d6fae22be6288be13ce63fd4f50ea (patch) | |
| tree | 5b4be4d5168073288a08ba418f391522e33985ce /core/deco.c | |
| parent | 4d0d37b6903a65ade442fece35238d1670522df2 (diff) | |
| download | subsurface-f03acb9e9a2d6fae22be6288be13ce63fd4f50ea.tar.gz | |
Fix effective GFs in notes
This patch fixes two bugs:
1) It first computes the effective gradient factors and then
composes the notes with the diveplan rather than the other way
around.
2) It does not try to fit a line through a single point.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/deco.c')
| -rw-r--r-- | core/deco.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/deco.c b/core/deco.c index 57acfe951..a445c2539 100644 --- a/core/deco.c +++ b/core/deco.c @@ -657,7 +657,7 @@ double get_gf(double ambpressure_bar, const struct dive *dive) double regressiona() { - if (sum1) { + if (sum1 > 1) { double avxy = sumxy / sum1; double avx = (double)sumx / sum1; double avy = sumy / sum1; |