-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added parsing of the CCR setpoint information for Garmin Descent computers. #40
Added parsing of the CCR setpoint information for Garmin Descent computers. #40
Conversation
…uters. This is adding support for parsing the setpoint information in logfiles downloaded from Garmin Descent devices. The Garmin devices do not have support for ppO2 sensor input, so they only work in 'fixed setpoint' mode for CCR dives, and dive data records do not contain actual ppO2 values. The ppO2 values are retrofitted to the dive data based on 'setpoint change' events reported by the device. With this change CCR dives downloaded from a Garmin device are correctly classified as CCR dive, and the calculated ceiling / tissue loading graphs are accurate and match the deco stops reported by the device. Before this change, CCR dives were classified as open circuit dives, often resulting in a massively overstated calculated ceiling. This has been tested for logs with only automated setpoint changes - more test dives are needed to reverse engineer the log file format for manual setpoint changes, as the setpoint fields are not documented in Garmin's documentation for the FIT file format. Signed-off-by: Michael Keller <github@ike.ch>
Looks sane from a quick scan. |
…armin Descent computers. Also improved the display of setpoint information - switch mode is shown, and auto switch depth is only shown in auto mode. All of this has been tested. Signed-off-by: Michael Keller <github@ike.ch>
I realize that Linus apparently didn't act on his own approval. |
Now that this has been merged, is it the expectation that I make a pull request in https://github.com/subsurface/subsurface to update the submodule version, or will this be done by a maintainer as part of a periodical / pre-release update? |
@dirkhh will generally update libdivecomputer somewhat regularly as he makes releases, no need to make a pull request there. And it is presumably not hugely urgent, since you clearly can and do build your own binaries. |
This has been merged into Subsurface and will be available in the latest test builds (and will eventually become part of the next release) |
…o CC for CCR dives. This might need a bit of discussion. As a CCR diver I would like to see the ability to properly track the 'on loop' / 'bailed out to open circuit' status directly in Subsurface, because this is an important (or even the most important) bit of status information during a CCR dive. This should extend to the use of the correct ppO2 / gas mix in the deco ceiling / tissue model calculation. My idea for how to do this would be to track the 'type' ('diluent' / 'OC bailout') for every gasmix / tank that is reported by the dive computer. Most CCR capable dive computers that I am familiar with require the user to enter two different gas lists for diluent and bailout, so this should work with the existing libdivecomputer API for these. > Unfortunately I think making this change in Subsurface will require a bit of work, as the libdivecomputer field capable of tracking the 'type' of a gas or tank (`cache->tankinfo[]`) does not seem to be consumed at all in Subsurface. So this pull request is just providing a prerequisite for the change in Subsurface by populating `tankinfo[]`. In addition to this it also triggers a message on every switch from CC to OC and back, at least giving a visual indication of these diver triggered events. The messages can probably be removed from libdivecomputer again once 'loop status' tracking has been added to Subsurface. > Also included is a fix of the tab expansion mess that I created in subsurface#40. Apologies for this, I've switched to using a custom `.vimrc` for this project now. Signed-off-by: Michael Keller <github@ike.ch>
This might need a bit of discussion. As a CCR diver I would like to see the ability to properly track the 'on loop' / 'bailed out to open circuit' status directly in Subsurface, because this is an important (or even the most important) bit of status information during a CCR dive. This should extend to the use of the correct ppO2 / gas mix in the deco ceiling / tissue model calculation. My idea for how to do this would be to track the 'type' ('diluent' / 'OC bailout') for every gasmix / tank that is reported by the dive computer. Most CCR capable dive computers that I am familiar with require the user to enter two different gas lists for diluent and bailout, so this should work with the existing libdivecomputer API for these. Unfortunately I think making this change in Subsurface will require a bit of work, as the libdivecomputer field capable of tracking the 'type' of a gas or tank (`cache->tankinfo[]`) does not seem to be consumed at all in Subsurface. So this pull request is just providing a prerequisite for the change in Subsurface by populating `tankinfo[]`. In addition to this it also triggers a message on every switch from CC to OC and back, at least giving a visual indication of these diver triggered events. The messages can probably be removed from libdivecomputer again once 'loop status' tracking has been added to Subsurface. Also included is a fix of the tab expansion mess that I created in subsurface#40. Apologies for this, I've switched to using a custom `.vimrc` for this project now. Signed-off-by: Michael Keller <github@ike.ch>
This might need a bit of discussion. As a CCR diver I would like to see the ability to properly track the 'on loop' / 'bailed out to open circuit' status directly in Subsurface, because this is an important (or even the most important) bit of status information during a CCR dive. This should extend to the use of the correct ppO2 / gas mix in the deco ceiling / tissue model calculation. My idea for how to do this would be to track the 'type' ('diluent' / 'OC bailout') for every gasmix / tank that is reported by the dive computer. Most CCR capable dive computers that I am familiar with require the user to enter two different gas lists for diluent and bailout, so this should work with the existing libdivecomputer API for these. Unfortunately I think making this change in Subsurface will require a bit of work, as the libdivecomputer field capable of tracking the 'type' of a gas or tank (`cache->tankinfo[]`) does not seem to be consumed at all in Subsurface. So this pull request is just providing a prerequisite for the change in Subsurface by populating `tankinfo[]`. In addition to this it also triggers a message on every switch from CC to OC and back, at least giving a visual indication of these diver triggered events. The messages can probably be removed from libdivecomputer again once 'loop status' tracking has been added to Subsurface. Also included is a fix of the tab expansion mess that I created in subsurface#40. Apologies for this, I've switched to using a custom `.vimrc` for this project now. Signed-off-by: Michael Keller <github@ike.ch>
This might need a bit of discussion. As a CCR diver I would like to see the ability to properly track the 'on loop' / 'bailed out to open circuit' status directly in Subsurface, because this is an important (or even the most important) bit of status information during a CCR dive. This should extend to the use of the correct ppO2 / gas mix in the deco ceiling / tissue model calculation. My idea for how to do this would be to track the 'type' ('diluent' / 'OC bailout') for every gasmix / tank that is reported by the dive computer. Most CCR capable dive computers that I am familiar with require the user to enter two different gas lists for diluent and bailout, so this should work with the existing libdivecomputer API for these. Unfortunately I think making this change in Subsurface will require a bit of work, as the libdivecomputer field capable of tracking the 'type' of a gas or tank (`cache->tankinfo[]`) does not seem to be consumed at all in Subsurface. So this pull request is just providing a prerequisite for the change in Subsurface by populating `tankinfo[]`. In addition to this it also triggers a message on every switch from CC to OC and back, at least giving a visual indication of these diver triggered events. The messages can probably be removed from libdivecomputer again once 'loop status' tracking has been added to Subsurface. Also included is a fix of the tab expansion mess that I created in subsurface#40. Apologies for this, I've switched to using a custom `.vimrc` for this project now. Signed-off-by: Michael Keller <github@ike.ch>
This might need a bit of discussion. As a CCR diver I would like to see the ability to properly track the 'on loop' / 'bailed out to open circuit' status directly in Subsurface, because this is an important (or even the most important) bit of status information during a CCR dive. This should extend to the use of the correct ppO2 / gas mix in the deco ceiling / tissue model calculation. My idea for how to do this would be to track the 'type' ('diluent' / 'OC bailout') for every gasmix / tank that is reported by the dive computer. Most CCR capable dive computers that I am familiar with require the user to enter two different gas lists for diluent and bailout, so this should work with the existing libdivecomputer API for these. Unfortunately I think making this change in Subsurface will require a bit of work, as the libdivecomputer field capable of tracking the 'type' of a gas or tank (`cache->tankinfo[]`) does not seem to be consumed at all in Subsurface. So this pull request is just providing a prerequisite for the change in Subsurface by populating `tankinfo[]`. In addition to this it also triggers a message on every switch from CC to OC and back, at least giving a visual indication of these diver triggered events. The messages can probably be removed from libdivecomputer again once 'loop status' tracking has been added to Subsurface. Also included is a fix of the tab expansion mess that I created in subsurface#40. Apologies for this, I've switched to using a custom `.vimrc` for this project now. Signed-off-by: Michael Keller <github@ike.ch>
This is adding support for parsing the setpoint information in logfiles downloaded from Garmin Descent devices.
The Garmin devices do not have support for ppO2 sensor input, so they only work in 'fixed setpoint' mode for CCR dives, and dive data records do not contain actual ppO2 values. The ppO2 values are retrofitted to the dive data based on 'setpoint change' events reported by the device. With this change CCR dives downloaded from a Garmin device are correctly classified as CCR dive, and the calculated ceiling / tissue loading graphs are accurate and match the deco stops reported by the device. Before this change, CCR dives were classified as open circuit dives, often resulting in a massively overstated calculated ceiling.
This has been tested for logs with only automated setpoint changes - more test dives are needed to reverse engineer the log file format for manual setpoint changes, as the setpoint fields are not documented in Garmin's documentation for the FIT file format.
Signed-off-by: Michael Keller github@ike.ch