Both the calculations for CNS and OTU did not take
into account the pO2 drop when using a PSCR. Furthermore,
there was some unit confusion due to not using internal
units.
Reported-by: arosl
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Create a gastype enum, which describes the type of a gas.
For now: air, nitrox, normoxic, trimix and oxygen.
This probably should be made configurable.
The gas types will be used to bin gasses in the statistics
module.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
There were helper functions to access O2 and He component fractions.
Add another one for N2. Indeed, this can be used in three cases, where
N2 was deduced indirectly.
Moreover, add a general accessor with a gas_component argument.
This will be used by the filter code to filter for gas components.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The deco-routines used an enum to pass around the inert gas
type. Make that globally available and make it include O2.
This will be used in a future commit to generalize access
of gas fractions.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
But only functions that operate only on gases. Functions concerning
cylinders or dives remain in dive.c or are moved to equipment.c
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>