Some gas handling improvements

Add a time linear gas interpolation strategy. Some minor changes.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Save CCR cylinder use in XML and git

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Load and save the dc type for CCR dives

Oddly we already had code to load this from XML, but nothing else.
This makes the load from XML work like the rest of our code and adds the
save to XML plus the load and save for the git format.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In a CCR dive the diluent and oxygen cylinders are both used

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix per_cylinder_mean_depth calculation for CCR

This patch is bigger than necessary because I also renamed the
get_cylinder_use() function to the much more accurate
get_cylinder_idx_by_use().

If we have no gas changes (except for a possible explicit first gas),
(which in the CCR case also means no bailout), this code will give you
correct per cylinder depth and duration for oxygen and diluent and
therefore create more reasonable gas consumption data for CCR dives.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Translation updates

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
CCR test dive

This is an anonymized version of a real dive. With the latest changes the
SAC calculations now make "mostly sense".

What's clearly still broken is the tank pressure graph.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add a TODO.CCR file to track what's left to do for CCR support

These are the things I ran into today. I'm sure there are many, many more.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>