mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
VPMB: time_clear_ceiling is only valid after time_deep_ceiling
Some messed up logic was producing negative deco_time values for some no-deco dives. The CVA wouldn't converge and unrealistic VPMB ceilings were displayed in the profile. This fixes it. See #762 Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
This commit is contained in:
parent
8e1ea8cd14
commit
05b4113609
1 changed files with 1 additions and 1 deletions
|
@ -1036,7 +1036,7 @@ void calculate_deco_information(struct dive *dive, struct divecomputer *dc, stru
|
|||
// Use the point where the ceiling clears as the end of deco phase for CVA calculations
|
||||
if (current_ceiling > 0)
|
||||
time_clear_ceiling = 0;
|
||||
else if (time_clear_ceiling == 0)
|
||||
else if (time_clear_ceiling == 0 && t1 > time_deep_ceiling)
|
||||
time_clear_ceiling = t1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue