Subsurface minimum gas calculation - First version for review

Stefan Fuchs sfuchs at
Mon Feb 20 06:02:40 PST 2017

Hallo Robert,

Am 17.02.2017 um 17:56 schrieb Robert Helling:
>>>>>     More details below...
>>>>>     Link to initial idea and discussion:
>>>>>     <>
>>>>>     Link to feature branch on Github:
>>>>>     <>
>>>> For this and all the other comments from Robert I hope I understood
>>>> everything and there is nothing to discuss. Updated version will
>>>> come soon.
>>>> A very important hint came from Robert about why we add the two new
>>>> variables to struct diveplan. This was clearly a mistake is not
>>>> needed. I will remove it.
>>> Updated version available. I'm not 100% sure if I catched
>>> everything. I did some more testing and found no more real bugs.
>>> Documentation is still missing. Will be able to do this next week.
>>> Again the one question about putting a warning icon into the
>>> profile: It would be great if there is anyone who could guide me how
>>> to do this.
>> Look at the DiveEventItem usage in the profilewidget2.cpp - you need
>> to tell it which axes its coordinates are relative to (timeAxis and
>> profileYAxis most likely, and you need to give it an event to
>> display. And then you add it to the scene.
Thanks for the hint: I'm now able to have a dummy warning symbol in the
profile created by the planner.

Now I identified the next hurdle: Is there somewhere the curve cylinder
pressure versus dive time for every specific cylinder? Or how could I
create it for a specific cylinder id? I found that this is neither in
struct cylinder_t, nor in dive or divecomputer. I think this somehow
works with the struct sample and is created at the moment when the
profile is finally created.
What I need to do are two things:
1. Get the cylinder pressure for "my" "lastbottomdp" which is a struct
divedatapoint *. In fact I need the pressure at time lastbottomdp.time
2. If this value is smaller than the minimum gas result I need to go
back on the time axis and find the point in time when cylinder pressure
goes below minimum gas. At this time I like to put the event/warning icon.

Best regards


Stefan Fuchs
E-Mail: sfuchs at <mailto:sfuchs at>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the subsurface mailing list