mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
VPMB profile: use bottom_time to calculate deco_time in planner
This corrects the issue where the displayed ceiling in the profile was "broken" by the planner, especially for shorter and shallower dives. Also fixes issue outside of planner where the deepest VPM-B ceiling was shown too early, messing up the deco_time calculation. VPM-B plans respond to change in O2% in gas as expected (in my testing) Fixes: #630 Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
This commit is contained in:
parent
d470ef05e0
commit
04383e27e5
2 changed files with 24 additions and 13 deletions
|
@ -34,6 +34,7 @@ int decostoplevels_imperial[] = { 0, 3048, 6096, 9144, 12192, 15240, 18288, 2133
|
|||
325120, 345440, 365760, 386080 };
|
||||
|
||||
double plangflow, plangfhigh;
|
||||
int bottom_time = 0;
|
||||
|
||||
extern double regressiona();
|
||||
extern double regressionb();
|
||||
|
@ -669,7 +670,7 @@ bool plan(struct diveplan *diveplan, struct dive *dive, int timestep, struct dec
|
|||
bool stopping = false;
|
||||
bool pendinggaschange = false;
|
||||
int clock, previous_point_time;
|
||||
int avg_depth, max_depth, bottom_time = 0;
|
||||
int avg_depth, max_depth;
|
||||
int last_ascend_rate;
|
||||
int best_first_ascend_cylinder;
|
||||
struct gasmix gas, bottom_gas;
|
||||
|
@ -1066,6 +1067,7 @@ bool plan(struct diveplan *diveplan, struct dive *dive, int timestep, struct dec
|
|||
diveplan->eff_gflow = lrint(100.0 * (regressiona() * first_stop_depth + regressionb()));
|
||||
}
|
||||
|
||||
|
||||
create_dive_from_plan(diveplan, dive, is_planner);
|
||||
add_plan_to_notes(diveplan, dive, show_disclaimer, error);
|
||||
fixup_dc_duration(&dive->dc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue