diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-06-23 21:27:52 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-06-23 21:36:50 -0700 |
commit | ef0272f5efb7cfd7d864dbe1f53b18348de305d3 (patch) | |
tree | 18822cf9110b9611bb4146f94b2513fceb12df40 /dive.h | |
parent | 596095389ba703341839e21cbbe1b438a50622d2 (diff) | |
download | subsurface-ef0272f5efb7cfd7d864dbe1f53b18348de305d3.tar.gz |
Perform deco calculation for plan
This uses a bunch of default values that we eventually need to get from
the UI, but it's a first step towards a working dive planner.
This exhibits some graphical artifacts when running, but other than that
appears to be mostly correct.
Things go far worse if I enable the changing of the scale once the deco
makes the dive longer than the displayed time window. Things quickly
spiral out of control.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r-- | dive.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -713,6 +713,8 @@ struct diveplan { int surface_pressure; /* mbar */ int bottomsac; /* ml/min */ int decosac; /* ml/min */ + short gflow; + short gfhigh; struct divedatapoint *dp; }; @@ -723,6 +725,7 @@ void free_dps(struct divedatapoint *dp); void get_gas_string(int o2, int he, char *buf, int len); struct divedatapoint *create_dp(int time_incr, int depth, int o2, int he, int po2); void dump_plan(struct diveplan *diveplan); +void plan(struct diveplan *diveplan, char **cached_datap, struct dive **divep, char **error_string_p); struct event *get_next_event(struct event *event, char *name); |