<div dir="ltr"><div>Robert,<br><br></div>I'm actually awake now, and am working through and trying to reproduce the issues.<br><div><div><div class="gmail_extra"><br><div class="gmail_quote">On 5 July 2016 at 08:57, Rick Walsh <span dir="ltr"><<a href="mailto:rickmwalsh@gmail.com" target="_blank">rickmwalsh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class=""><p dir="ltr"><br>
On 5 Jul 2016 07:33, "Robert Helling" <<a href="mailto:helling@atdotde.de" target="_blank">helling@atdotde.de</a>> wrote:<span class="">> In patch 4/5 you do<br>
><br>
> + if (((cyl->gasmix.o2.permille == 0) ? O2_IN_AIR : cyl->gasmix.o2.permille) + cyl->gasmix.he.permille > 1000)<br>
><br>
> Please do not access the permille’s directly when you are reading. Use get_o2(cal->gasmix) and get_he() instead.<br>
><br>
> Also, don’t use upper case function names in C code (best_He -> best_he)<br>
><br></span>
I'll send a revised version using the get functions and lowercase names.</p></span>
<p dir="ltr"><span class="">> Then, there seems to be a problem with rounding (and that might be more what the user expects rather than a mathematical issue): For EAN50 I expect (at least for max_po2=1.6 bar) to get an MOD of 21m. That is what everybody uses. So subsurface should do this as well. In the old MOD calculation we fiddled with the rounding until we did. You should do as well as otherwise users will tell us we cannot do math (even if it’s them).<br>
><br></span>
When entering cylinders and gasmixes we don't distinguish between bottom mix and deco gasses. The depth column still gives the deco mod - I haven't touched this, the value is calculated using deco pO2 (default 1.6) and rounded down to 3m / 10' increments. The new bottom mod column always uses the bottom pO2 (default 1.4). Do you think that should round down to 3m increments too? I'm not aware of the same convention for bottom mix mod as deco mods, which is based on 3m stop intervals.</p></blockquote><div>Did what I wrote above make sense?  I think the issue is more that the column headings aren't clear enough.  What if I re-label the "Switch at" heading to "Deco MOD".  "Switch at" is still correct, but I think having a "Deco MOD" and "Bot. MOD" column would be clearer.<br><br>Probably the greatest clarity would be achieved if there were separate tables for bottom gas and deco gasses, but that's too invasive with respect to screen real estate and code.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<p dir="ltr"><span class="">> Then, if we change the depth of the dive, the percentages are not updated. We need the plannerPointsModel send a signal to update the best mixes.<br>
><br></span>
Really? I thought I sorted that out. The mix will only change if the * option is used, otherwise the mix is calculated based on the specified depth in the bottom mod field, not the max depth.</p></blockquote><div>Are you referring to changing depth by using the mouse on the profile widget?  I always enter depths in the table (and the mix changes with depth when you do that if either bot MOD or MND are *) but I see now that gas mixes aren't updated if depths are changed with the mouse.  When I re-send the patch series, I'll add a patch to address this.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<p dir="ltr"><span class="">> When I set two cylinders to use best mix and then change the max po2, i get an too many gas mixes error.<br>
><br></span>
I'll look into that.  In testing I came across and fixed a few too many gas errors, but clearly missed that.</p></blockquote><div>Yes, I can reproduce that.  I'll work out a way to fix it and update the patch series. <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<p dir="ltr"><span class="">> Finally, there is the question which max pO2 to use. For the „*“ option it should definitely be the bottom one, but for deco mixes I would assume the deco pO2, wouldn’t you?<br>
><br></span>
For deco mixes, the mod is shown in the depth field (as it always has been) and uses the deco max pO2. The bottom mod field is calculated with the bottom pO2.</p><br></blockquote><div>Cheers<br><br></div><div>Rick <br></div></div></div></div></div></div>