<div>I can help testing this as I'm familiar with the Minimum deco or Rock bottom gas management. </div><div><br></div><div>If you send me a link to your branch I can look at it and try to break it. </div><div><br></div><div>Pablo</div><div><br></div><div><br><div class="gmail_quote"><div>On Tue, Feb 21, 2017 at 14:04 Stefan Fuchs <<a href="mailto:sfuchs@gmx.de">sfuchs@gmx.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000" class="gmail_msg">
    <p class="gmail_msg">Hello Robert, hallo Dirk,<br class="gmail_msg">
    </p></div><div bgcolor="#FFFFFF" text="#000000" class="gmail_msg">
    <br class="gmail_msg">
    <div class="m_3694149035500512025moz-cite-prefix gmail_msg">Am 21.02.2017 um 11:44 schrieb Robert
      Helling:<br class="gmail_msg">
    </div>
    <blockquote type="cite" class="gmail_msg">
      
      Stefan,
      <div class="gmail_msg"><br class="gmail_msg">
        <div class="gmail_msg">
          <blockquote type="cite" class="gmail_msg">
            <div class="gmail_msg">On 21.02.2017, at 11:02, Stefan Fuchs <<a href="mailto:sfuchs@gmx.de" class="gmail_msg" target="_blank">sfuchs@gmx.de</a>> wrote:</div>
            <br class="m_3694149035500512025Apple-interchange-newline gmail_msg">
            <div class="gmail_msg">
              <div bgcolor="#FFFFFF" text="#000000" class="gmail_msg">
                <blockquote type="cite" style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)" class="gmail_msg">
                  <div class="gmail_msg">the problem is that for computers that
                    don’t have gas information, the interpolation of
                    cylinder pressures is only done at the plot stage.
                    The information is in struct plot_data which you
                    find in profile.h, in particular in cylinderindex
                    and pressure[2] (to access the latter there is a
                    macro, for usage see profile.c. Strictly speaking,
                    that is to handle the CCR case which you want to
                    avoid anyway but it’s better to use this as an
                    accessor).</div>
                  <div class="gmail_msg"><br class="gmail_msg">
                  </div>
                </blockquote>
                <span style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);float:none;display:inline!important" class="gmail_msg">Hmmm...
                  plot_data is rather difficult to access from
                  planner.c. Or do I miss any easy way to do this?</span><br style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)" class="gmail_msg">
              </div>
            </div>
          </blockquote>
          <div class="gmail_msg"><br class="gmail_msg">
          </div>
          <div class="gmail_msg">Hmm. That’s true. Problem is: during planning, so far, we
            don’t track gas usage but compute it only later. Concretely,
            in planner.c</div>
          <div class="gmail_msg">
            <pre style="margin-top:0px;margin-bottom:0px" class="gmail_msg"><span style="color:#808000" class="gmail_msg">
</span></pre>
            <pre style="margin-top:0px;margin-bottom:0px" class="gmail_msg"><span style="color:#808000" class="gmail_msg">static</span><span style="color:#c0c0c0" class="gmail_msg"> </span><span style="color:#808000" class="gmail_msg">void</span><span style="color:#c0c0c0" class="gmail_msg"> </span>create_dive_from_plan(<span style="color:#808000" class="gmail_msg">struct</span><span style="color:#c0c0c0" class="gmail_msg"> </span><span style="color:#800080" class="gmail_msg">diveplan</span><span style="color:#c0c0c0" class="gmail_msg"> </span>*diveplan,<span style="color:#c0c0c0" class="gmail_msg"> </span><span style="color:#808000" class="gmail_msg">bool</span><span style="color:#c0c0c0" class="gmail_msg"> </span>track_gas)</pre>
            <pre style="margin-top:0px;margin-bottom:0px" class="gmail_msg"></pre>
            <pre style="margin-top:0px;margin-bottom:0px" class="gmail_msg">close to the bottom there is </pre>
            <pre style="margin-top:0px;margin-bottom:0px" class="gmail_msg"><pre style="margin-top:0px;margin-bottom:0px" class="gmail_msg"><span style="color:#c0c0c0" class="gmail_msg">                        </span>update_cylinder_pressure(&displayed_dive,<span style="color:#c0c0c0" class="gmail_msg"> </span>sample[-<span style="color:#000080" class="gmail_msg">1</span>].<span style="color:#800000" class="gmail_msg">depth</span>.<span style="color:#800000" class="gmail_msg">mm</span>,<span style="color:#c0c0c0" class="gmail_msg"> </span>depth,<span style="color:#c0c0c0" class="gmail_msg"> </span>time<span style="color:#c0c0c0" class="gmail_msg"> </span>-<span style="color:#c0c0c0" class="gmail_msg"> </span>sample[-<span style="color:#000080" class="gmail_msg">1</span>].<span style="color:#800000" class="gmail_msg">time</span>.<span style="color:#800000" class="gmail_msg">seconds</span>,</pre>This might be a place where one could inject a test if rock bottom is exceeded if that value is already known at that stage. Alternatively, you might have to store the pressure vs time information or you store the rock bottom value for the gas with the dive and generate the warning only in the plotting stage (close to where the gas pressure curves are created). Thinking about this, I guess the latter is what I would go for.</pre>
          </div>
          <br class="gmail_msg">
        </div>
      </div>
    </blockquote></div><div bgcolor="#FFFFFF" text="#000000" class="gmail_msg">
    For the moment I have to stop here because I will be on holiday for
    a week soon and this part for sure will need approximately 1-3 years
    development time on my side ;-)<br class="gmail_msg">
    <br class="gmail_msg">
    What do you think about the part of the minim gas calculation we
    created up to now?<br class="gmail_msg">
    Is it already time to do a pull request to maybe have some deeper
    testing or do we need to continue testing and review internally?<br class="gmail_msg">
    <br class="gmail_msg">
    Tomorrow I may be able to write a few words about this feature for
    the user manual. Shall I put user manual updates in a separate
    commit (I assume yes)?</div><div bgcolor="#FFFFFF" text="#000000" class="gmail_msg"><br class="gmail_msg">
    <br class="gmail_msg">
    <br class="gmail_msg">
    Best regards<br class="gmail_msg">
    Stefan<br class="gmail_msg">
    <br class="gmail_msg">
    <div class="m_3694149035500512025moz-signature gmail_msg">-- <br class="gmail_msg">
      
      
      
      
      
      
      
      <p class="gmail_msg">Stefan Fuchs<br class="gmail_msg">
        E-Mail: <a href="mailto:sfuchs@gmx.de" class="gmail_msg" target="_blank">sfuchs@gmx.de</a></p>
    </div>
  </div><div bgcolor="#FFFFFF" text="#000000" class="gmail_msg"></div>

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