Show effective gradient factors for VPMB-plans

For each stop, this computes an effective gradient factor
that gives the same ceiling. Then, it does linear regression
to find values for GFlow and GFhigh that give a similar deco
profile.

Note that this optimises the average gradient factor. The
runtime however depends strongly at the gradient factor at
the last depth. So we don't necessarily to get the runtime
right.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Robert C. Helling 2016-11-23 11:50:50 +01:00 committed by Dirk Hohndel
parent d1a0655613
commit 4d0d37b690
3 changed files with 78 additions and 5 deletions

View file

@ -859,6 +859,7 @@ struct diveplan {
short gfhigh;
short vpmb_conservatism;
struct divedatapoint *dp;
int eff_gflow, eff_gfhigh;
};
struct divedatapoint *plan_add_segment(struct diveplan *diveplan, int duration, int depth, int cylinderid, int po2, bool entered);