mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Improve gas accounting in the panner
When using gasmixes where the difference is less than 2% the planner can't caclulate casconsumptions correctly. This sets the minimum gasdifference to 1%. Fixes #795 Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
237043d6ba
commit
20a82e2b21
2 changed files with 4 additions and 4 deletions
|
@ -1112,7 +1112,7 @@ bool DivePlannerPointsModel::tankInUse(struct gasmix gasmix)
|
|||
continue;
|
||||
if (!p.entered) // removing deco gases is ok
|
||||
continue;
|
||||
if (gasmix_distance(&p.gasmix, &gasmix) < 200)
|
||||
if (gasmix_distance(&p.gasmix, &gasmix) < 100)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -1139,7 +1139,7 @@ void DivePlannerPointsModel::tanksUpdated()
|
|||
struct gasmix gas;
|
||||
gas.o2.permille = oldGases.at(i).first;
|
||||
gas.he.permille = oldGases.at(i).second;
|
||||
if (gasmix_distance(&gas, &p.gasmix) < 200) {
|
||||
if (gasmix_distance(&gas, &p.gasmix) < 100) {
|
||||
p.gasmix.o2.permille = gases.at(i).first;
|
||||
p.gasmix.he.permille = gases.at(i).second;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue