<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hello Robert, hallo Dirk,<br>
    </p>
    <br>
    <div class="moz-cite-prefix">Am 21.02.2017 um 11:44 schrieb Robert
      Helling:<br>
    </div>
    <blockquote
      cite="mid:5824F147-3AE5-4BAF-BA49-23A896565A9C@atdotde.de"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      Stefan,
      <div class=""><br class="">
        <div>
          <blockquote type="cite" class="">
            <div class="">On 21.02.2017, at 11:02, Stefan Fuchs <<a
                moz-do-not-send="true" href="mailto:sfuchs@gmx.de"
                class="">sfuchs@gmx.de</a>> wrote:</div>
            <br class="Apple-interchange-newline">
            <div class="">
              <div bgcolor="#FFFFFF" text="#000000" class="">
                <blockquote
                  cite="mid:44D42C4C-572C-4300-974D-3DBB32B7ADCE@atdotde.de"
                  type="cite" style="font-family: Menlo-Regular;
                  font-size: 12px; font-style: normal;
                  font-variant-caps: normal; font-weight: normal;
                  letter-spacing: normal; orphans: auto; text-align:
                  start; text-indent: 0px; text-transform: none;
                  white-space: normal; widows: auto; word-spacing: 0px;
                  -webkit-text-stroke-width: 0px; background-color:
                  rgb(255, 255, 255);" class="">
                  <div class="">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=""><br class="">
                  </div>
                </blockquote>
                <span style="font-family: Menlo-Regular; font-size:
                  12px; font-style: normal; font-variant-caps: normal;
                  font-weight: normal; letter-spacing: normal; orphans:
                  auto; text-align: start; text-indent: 0px;
                  text-transform: none; white-space: normal; widows:
                  auto; word-spacing: 0px; -webkit-text-stroke-width:
                  0px; background-color: rgb(255, 255, 255); float:
                  none; display: inline !important;" class="">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; orphans:
                  auto; text-align: start; text-indent: 0px;
                  text-transform: none; white-space: normal; widows:
                  auto; word-spacing: 0px; -webkit-text-stroke-width:
                  0px; background-color: rgb(255, 255, 255);" class="">
              </div>
            </div>
          </blockquote>
          <div><br class="">
          </div>
          <div>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>
            <pre style="margin-top: 0px; margin-bottom: 0px;" class=""><span style=" color:#808000;" class="">
</span></pre>
            <pre style="margin-top: 0px; margin-bottom: 0px;" class=""><!--StartFragment--><span style=" color:#808000;" class="">static</span><span style=" color:#c0c0c0;" class=""> </span><span style=" color:#808000;" class="">void</span><span style=" color:#c0c0c0;" class=""> </span>create_dive_from_plan(<span style=" color:#808000;" class="">struct</span><span style=" color:#c0c0c0;" class=""> </span><span style=" color:#800080;" class="">diveplan</span><span style=" color:#c0c0c0;" class=""> </span>*diveplan,<span style=" color:#c0c0c0;" class=""> </span><span style=" color:#808000;" class="">bool</span><span style=" color:#c0c0c0;" class=""> </span>track_gas)</pre>
            <pre style="margin-top: 0px; margin-bottom: 0px;" class=""><!--EndFragment--></pre>
            <pre style="margin-top: 0px; margin-bottom: 0px;" class="">close to the bottom there is </pre>
            <pre style="margin-top: 0px; margin-bottom: 0px;" class=""><pre style="margin-top: 0px; margin-bottom: 0px;" class=""><!--StartFragment--><span style=" color:#c0c0c0;" class="">                       </span>update_cylinder_pressure(&displayed_dive,<span style=" color:#c0c0c0;" class=""> </span>sample[-<span style=" color:#000080;" class="">1</span>].<span style=" color:#800000;" class="">depth</span>.<span style=" color:#800000;" class="">mm</span>,<span style=" color:#c0c0c0;" class=""> </span>depth,<span style=" color:#c0c0c0;" class=""> </span>time<span style=" color:#c0c0c0;" class=""> </span>-<span style=" color:#c0c0c0;" class=""> </span>sample[-<span style=" color:#000080;" class="">1</span>].<span style=" color:#800000;" class="">time</span>.<span style=" color:#800000;" class="">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="">
        </div>
      </div>
    </blockquote>
    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>
    <br>
    What do you think about the part of the minim gas calculation we
    created up to now?<br>
    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>
    <br>
    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)?<br>
    <br>
    <br>
    Best regards<br>
    Stefan<br>
    <br>
    <div class="moz-signature">-- <br>
      <meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8">
      <title></title>
      <meta name="GENERATOR" content="OpenOffice.org 3.3 (Win32)">
      <meta name="CREATED" content="0;0">
      <meta name="CHANGEDBY" content="Stefan Fuchs">
      <meta name="CHANGED" content="20120503;23115492">
      <style type="text/css">
        <!--
                P { color: #000000 }
        -->
        </style>
      <p>Stefan Fuchs<br>
        E-Mail: <a href="mailto:sfuchs@gmx.de">sfuchs@gmx.de</a></p>
    </div>
  </body>
</html>