<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 04/11/2014 11:10, Robert Helling
      wrote:<br>
    </div>
    <blockquote
      cite="mid:FA18D01F-4A31-4E07-B1D0-0E8D1BBDF636@atdotde.de"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <br>
      <div>
        <div>On 04.11.2014, at 08:45, Willem Ferguson <<a
            moz-do-not-send="true"
            href="mailto:willemferguson@zoology.up.ac.za">willemferguson@zoology.up.ac.za</a>>
          wrote:</div>
        <div><br>
        </div>
        <div>Willem,</div>
        <br>
        <blockquote type="cite">The calculation of MOD, EAD and the like
          that happens in profile.c does not work for CCR because it is
          based on the gas mix info associated with individual
          cylinders. Function gas_mod in dive.h is a case in point. I
          was starting to mess around with these calculations to use
          dynamic fo2 values for each point on the dive profile (instead
          of fixed cylinder-specific fo2 values), but then I saw that
          this function is used in many places, including extensively in
          the planner.<br>
        </blockquote>
      </div>
      <div><br>
      </div>
      <div>I am not sure exactly what would be the meaning of MOD for a
        CCR given the dynamic O2 content. The only way I think this
        makes sense would be the MOD of the dillutant (since that sets
        the minimum fO2 that the CCR can deliver and that determines the
        depth).</div>
      <div><br>
      </div>
    </blockquote>
    I was thinking that it would be useful that a diver could review a
    dive and see at a particular moment, how far he/she was from the
    MOD, given the gas composition at that moment in time. Let's the fo2
    was 35% at a particular moment and the diver was 30m deep. The diver
    should know that this was pretty close to the MOD for that
    particular gas combination. This might for instance affect decision
    making with respect to setpoints. Of course the dive computer should
    provide such facilities for decision making and/or automatic control
    during the dive, but for the review of a dive afterwards, this
    information might be useful.<br>
    <br>
    <blockquote
      cite="mid:FA18D01F-4A31-4E07-B1D0-0E8D1BBDF636@atdotde.de"
      type="cite">
      <div>Indeed, gas_mod is used in various places but only the call
        in profile.c is about the current gas, in all other cases the
        MOD of an explicit cylinder is calculated (essentially to find
        the max depth to switch to it). What I would probably do is to
        leave everything as it is and only wrap the call in profile.c
        with an if(dc.dctype != CCR) { and in the else clause make sure
        the dillutant is used.</div>
      <div><br>
      </div>
      <div>I guess the others EAD, END and EADD should be ok the way
        they are since they use the info from fill_pressures which takes
        CCR-ness into account.</div>
      <div><br>
      </div>
    </blockquote>
    <br>
    At the moment it gives EAD of 0m throughout the dive and EADD of
    current_depth, but I have not looked at that code closely to explain
    that. However I note that fhe and fo2 are derived from
    cylinder-related data, using get_o2() and get_he().<br>
    <br>
    <blockquote
      cite="mid:FA18D01F-4A31-4E07-B1D0-0E8D1BBDF636@atdotde.de"
      type="cite">
      <div>What do you think?</div>
      <div><br>
      </div>
      <div>Best</div>
      <div>Robert</div>
    </blockquote>
    <br>
  </body>
</html>