mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add support to planner to use additional gases during the ascent
This change ended up being quite a bit bigger than expected as it uncovered a number of bugs in the existing code. The planner now handles gas changes correctly by creating (and later parsing) events in the simulated divecomputer. At the end of the dive specified in the input form the algorithm starts with the deepest interesting depth: either the first stop below our ceiling or the deepest depth at which we can change gases. It then traverses all the stop and all the gas change depth and at each stage ensures that we are allowed to ascend further before going on. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
fbea5e31ca
commit
c0ce218df4
2 changed files with 210 additions and 43 deletions
|
@ -425,7 +425,7 @@ static void save_dc(FILE *f, struct dive *dive, struct divecomputer *dc)
|
|||
fprintf(f, " </divecomputer>\n");
|
||||
}
|
||||
|
||||
static void save_dive(FILE *f, struct dive *dive)
|
||||
void save_dive(FILE *f, struct dive *dive)
|
||||
{
|
||||
struct divecomputer *dc;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue