This is a rough conversion from cuft to liters. Should be close enough
when we don't have working pressure to do the real calculation. (As far
as I know, this is the case with UDCF.)
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Not really surprising, but a sample log that I received used different
case for unit than I had expected.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Simplify depth conversion from by using the unit variable and allowing
dephtConvert template to do the work.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This will grab the divemode information from the first waypoint within
the dive that includes this info and uses it for dctype.
Note that our dive type is not as fine grained as the one in UDDF. The
latter allows one to switch divemode during the dive when we do not.
However, one could argue that i.e. a rebreather dive should be a
rebreather dive even if one switches to bailout gas at some point...
Fixes#922
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Let's show the units in CSV header so the actual fields have only the
values. This should be easier to parse with some other programs.
Fixes#472
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Let's show the units in CSV header so the actual fields have only the
values. This should be easier to parse with some other programs.
Fixes#472
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Apparently recording cylinder pressure in PSI is not the only oddity
with Shearwater Desktop. It also records half the value, so doubling the
reading here.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
When doing the xslt transformation for UDDF export, the C source does
actually give a parameter units with value 0. Thus we need to treat
that case as normal mode.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Make sure the Gas setup contains O2 value when trying to import that.
In latest log sample the Gas seems to contain the decompression
algorithm used. And as this value was grabbed after O2, we ended up with
empty O2.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
DivingLog seems to report cylinder start and end pressures in metric
format, but sample readings are in imperial in case user has selected
this unit. So we must convert the sample pressures in this case.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
If the last two fields were empty, we returned the field separator as
next to last value. Now we make sure not to return field separator as
field value.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>