mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 06:15:26 +00:00
VPM-B profile: calculate parameters when in planner mode
Calculating parameters when in the planner mode is necessary to display the correct ceiling. Fixes #601 Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
This commit is contained in:
parent
fb42213111
commit
f9d05a8038
1 changed files with 2 additions and 2 deletions
|
@ -998,7 +998,7 @@ void calculate_deco_information(struct dive *dive, struct divecomputer *dc, stru
|
|||
entry->ceiling = (entry - 1)->ceiling;
|
||||
} else {
|
||||
/* Keep updating the VPM-B gradients until the start of the ascent phase of the dive. */
|
||||
if (decoMode() == VPMB && !in_planner() && last_ceiling >= first_ceiling && first_iteration == true) {
|
||||
if (decoMode() == VPMB && last_ceiling >= first_ceiling && first_iteration == true) {
|
||||
nuclear_regeneration(t1);
|
||||
vpmb_start_gradient();
|
||||
/* For CVA calculations, start by guessing deco time = dive time remaining */
|
||||
|
@ -1012,7 +1012,7 @@ void calculate_deco_information(struct dive *dive, struct divecomputer *dc, stru
|
|||
current_ceiling = entry->ceiling;
|
||||
last_ceiling = current_ceiling;
|
||||
/* If using VPM-B outside the planner, take first_ceiling_pressure as the deepest ceiling */
|
||||
if (decoMode() == VPMB && !in_planner()) {
|
||||
if (decoMode() == VPMB) {
|
||||
if (current_ceiling > first_ceiling) {
|
||||
time_deep_ceiling = t1;
|
||||
first_ceiling = current_ceiling;
|
||||
|
|
Loading…
Add table
Reference in a new issue