mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Calculate momentary SAC rates with the right gases
The momentary SAC rate got broken by the multiple ressure handling too, and always used just the first cylinder. This uses the new "get_gasmix()" helper to see what you're breathing, and will do the SAC rate over all the cylinders that contain that gas. So it should now DTRT even for sidemount diving (assuming you had the same gas in the sidemount cylinders). NOTE! We could just do the SAC rate over *all* the gases you have pressures for, and maybe that's the right thing to do. The ones you are not breating from shouldn't have their pressure change. But maybe some people add their drysuit argon gas to the gas list? So this may need more work, but it's a step in the right direction. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
defa71256f
commit
df1bd0015a
3 changed files with 83 additions and 29 deletions
|
@ -140,8 +140,7 @@ extern int gas_volume(cylinder_t *cyl, pressure_t p);
|
|||
extern double gas_compressibility_factor(struct gasmix *gas, double bar);
|
||||
extern double isothermal_pressure(struct gasmix *gas, double p1, int volume1, int volume2);
|
||||
extern double gas_density(struct gasmix *gas, int pressure);
|
||||
|
||||
|
||||
extern int same_gasmix(struct gasmix *a, struct gasmix *b);
|
||||
|
||||
static inline int get_o2(const struct gasmix *mix)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue