<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 15 February 2017 at 06:50, Stefan Fuchs <span dir="ltr"><<a target="_blank" href="mailto:sfuchs@gmx.de">sfuchs@gmx.de</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
  

    
  
  <div bgcolor="#FFFFFF">
    <p>Hi All,</p>
    <p>Joachim (R.) and I finished our first basic version of the
      minimum gas calculation for the planner.<br>
      We are now looking for testing and feedback :-)<br></p></div></blockquote><div>Great work on tackling this.  It's really good to see new ideas and new developers contributing to the code.  I will test when I get a chance, which unfortunately won't be for a few days.  In the meantime, I have a few comments/suggestions.<br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div bgcolor="#FFFFFF"><p>
      More details below...<br>
    </p>
    <p>Link to initial idea and discussion:<br>
      <a target="_blank" href="https://github.com/Subsurface-divelog/subsurface/issues/188" class="gmail-m_8098681307314788349moz-txt-link-freetext">https://github.com/Subsurface-<wbr>divelog/subsurface/issues/188</a><br>
    </p>
    <p>Link to feature branch on Github:<br>
      <a target="_blank" href="https://github.com/sfuchs79/subsurface/tree/feature_minimum_gas" class="gmail-m_8098681307314788349moz-txt-link-freetext">https://github.com/sfuchs79/<wbr>subsurface/tree/feature_<wbr>minimum_gas</a></p>
    <p><br>
    </p>
    <p>My feedback to comments from Robert and Joachim (B.):<br>
      - Increased deco for longer bottom time due to problem solving
      time: No, honestly this would have been much too complex for me at
      the moment. Also this would not be according to how I would even
      handle it during a real dive. But this may be a longer
      discussion... ;-)<br></p></div></blockquote><div>This is a worthy consideration, but beyond the scope of what's intended for the moment.  Of course someone could look into this is the future.. <br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div bgcolor="#FFFFFF"><p>
      - Real gases: Yes, hopefully implemented correctly.<br>
      - No hard coded SAC*2: Yes, good idea, we didn't do this but for
      the moment I limited SAC factor to min 2.0/max 10.0. 2.0 would be
      two divers with unchanged SAC. SAC factor of e.g. 4.0 would be two
      divers with doubled SAC. BTW: Setting problem solving time to 0min
      comes close to "disabling" the feature.<br>
      - Support rec dives: Yes, clearly, calculation is active for all
      OC dives. I put some limitations for min depth (>18m) and min
      tank size (12l). Calculating minimum gas for smaller cylinders is
      from my point of view almost useless.<br></p></div></blockquote><div>I don't see the reason for limiting tank size and depth.  10.5l steel cylinders are pretty common where I dive, and AL80 (11.1l) cylinders are the most common in warm water.  Also there are smaller 300bar cylinders popular in some areas.  Minimum gas is also relevant for bailout cylinders, and some people use AL40 (5.6l) for them (although we don't do any automatic bailout calculations).  Surely having sufficient gas is just as important a consideration for small cylinders.<br><br></div><div>I agree minimum gas is usually less of a concern for shallow dives, but spend an hour or more at 18m on air without a deco cylinder and you will require a significant amount of gas to allow two divers to surface safely.  Do we gain anything by excluding this possibility?<br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div bgcolor="#FFFFFF"><p>
      - Calculating problem solving time as result: No, this would not
      fit with my idea of doing and using it.<br>
    </p>
    <p>Open questions:<br>
      - Most important: Any huge mistakes? Do we screw up <a target="_blank" href="http://s.th">s.th</a>.? ;-)<br>
      - What is missing? What else will we need to do? E.g.:<br>
          o Everything ready for translations?<br></p></div></blockquote><div>Dirk usually does a call for translations in the lead up to each release.  In the meantime, just make sure strings are included in <span class="gmail-blob-code-inner"><span class="gmail-pl-c1">translate</span>() functions, and it looks like you've covered that.<br></span></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div bgcolor="#FFFFFF"><p>
          o Which documentation would be mandatory?<br></p></div></blockquote><div>A paragraph in the manual explaining what the minimum gas calculation means and how to use it should be fine.  Note, edit Documentation/user-manual.txt, not the HTML directly.  Other "documentation" should be in commit messages and code comments (if/where appropriate).<br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div bgcolor="#FFFFFF"><p>
      - Any dive setups where this should work but doesn't based on this
      implementation? Remark: It is clear for me that this
      implementation is currently only useful for limited types of dive
      scenarios. <br>
    </p>
    <p>Possible enhancements I still have in my mind:<br>
      - Print such a tiny little yellow warning flag in the profile when
      minimum gas is exceeded before end of bottom time. Anyone could
      guide me how to do this?<br>
      - Tooltips for the new preferences. I can easily do this. One
      question: What about line breaks in tooltips? Good/not good? How
      do they work?<br></p></div></blockquote><div>In general, try to keep tooltips as short as possible so that they don't need more than one line.  If you really do need to go over ~10 words, a line break could be worth considering.  I can't remember, does Qt wrap tooltips automatically?<br><br><br></div><div>Robert mentioned this his comments, so sorry to repeat, but where possible try to use the special unit types defined in core/dive.h: duration_t (unit seconds), depth_t (unit mm), <span class="gmail-pl-c1">pressure_t (unit mbar), </span><span class="gmail-pl-c1">volume_t (unit ml).  It's a little bit of extra work, but it makes the code clearer to read and debug.  Obviously the UI should present the values in friendly units.<br></span></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div bgcolor="#FFFFFF"><p>
    </p>
    <p>Best regards<span class="gmail-HOEnZb"><font color="#888888"><br>
      Stefan<br>
    </font></span></p><span class="gmail-HOEnZb"><font color="#888888">
    <br>
    <div class="gmail-m_8098681307314788349moz-signature">-- <br>
      
      
      
      
      
      
      
      <p>Stefan Fuchs<br>
        E-Mail: <a target="_blank" href="mailto:sfuchs@gmx.de">sfuchs@gmx.de</a></p>
    </div>
  </font></span></div>

<br>______________________________<wbr>_________________<br>
subsurface mailing list<br>
<a href="mailto:subsurface@subsurface-divelog.org">subsurface@subsurface-divelog.<wbr>org</a><br>
<a target="_blank" rel="noreferrer" href="http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface">http://lists.subsurface-<wbr>divelog.org/cgi-bin/mailman/<wbr>listinfo/subsurface</a><br>
<br></blockquote></div><br></div></div>