Garmin gas change bug and some corner cases.

Michael Andreen harv at
Tue Nov 16 14:34:27 PST 2021


Did a test dive with a new gear configuration to play around with.

Garmin transmitter attached to back cylinder. Air as gas.
Suunto transmitter attached to stage cylinder. Air as gas.

Garmin watch in single tank mode, air bottom gas with ean32 and air as backup 
Suunto vyper air with two mixes, both air.

During the dive I did some gas switches, only switching between air mixes on 
both computers.

When I did the first import from garmin I only had half the gas mixes and all 
of them were to ean32. Looking at the fit file in an online fit explorer I saw 
that it had the three gases as 0 (Air), 1 (EAN32) and 2 (Air) and the gas 
switch event were between id 0 and 2. Doing the following change in 
libdivecomputer fixed that specific issue.

diff --git a/src/garmin_parser.c b/src/garmin_parser.c
index 46baa63..7431547 100644
--- a/src/garmin_parser.c
+++ b/src/garmin_parser.c
@@ -217,7 +217,7 @@ static void garmin_event(struct garmin_parser_t *garmin,
        case 57:
-               sample.gasmix = data - 1;
+               sample.gasmix = data;
                garmin->callback(DC_SAMPLE_GASMIX, sample, garmin->userdata);

I get a dive with two air cylinders and the transmitter pressure graph linked 
to the first cylinder and gas switches between these two air cylinders. There 
is a hidden EAN32 cylinder too. In general everything seems as it should.

The suunto vyper air vyper air imported the dive and all the gas changes and 
two air cylinders. However all gas changes are to the first cylinder and the 
2nd one is hidden. Skimming through the suunto d9 parser it looks like the gas 
change event only contains o2, so not much to do about that. There likely 
won't be that many gas switches if I have the same gas in a stage cylinder.

However, when I try to merge the dives, the transmitter pressure for both 
computers are linked to the first cylinder. Assuming I have the garmin as the 
first dive computer, is there some way to change the suunto transmitter 
pressure to apply to the 2nd cylinder? There doesn't seem to be any explicit 
association between pressure data in a sample and a cylinder. I tried to add a 
dummy pressure in front in the xml file, but that didn't seem to do anything.

As it is now if I fix the gas change event for the suunto log (or if I had 
been using different gas mixes so they were correct from the start) then the 
pressure visualization will switch away from the real data, to calculated 
pressure change for the 2nd cylinder.

I guess similar things would also happen with a single log if the transmitter 
is connected to a gasmix that is not the first, although then it's pretty easy 
to change the cylinder information after.


More information about the subsurface mailing list