<div dir="ltr"><div dir="ltr"><div dir="ltr"><i>[Apologies Dirk for spamming you earlier!]</i><div><br></div><div>I'm working my way through the Buhlmann model with a view to extending the planning functionality of SubSurface (purely self-interest in deco theory). I'm trying to understand the salinity variance, which I think comes from Schreiner extensions to the Buhlmann model? In core/dive.c water pressure calculations, what does the value 0.981 represent? </div><div><br></div><div><b>Dirk </b>- you answered (thanks) - "<span style="font-family:Calibri,sans-serif;font-size:11pt"><i>that's gravity. We need the weight, not the mass.</i>".  To confirm, this is using kN???  i.e. the standard specific weight of water? I wanted to be absolutely sure.</span></div><div><div><br></div></div><div><div><font face="monospace, monospace">/* Pa = N/m^2 - so we determine the weight (in N) of the mass of 10m</font></div><div><font face="monospace, monospace"> * of water (and use standard salt water at 1.03kg per liter if we don't know salinity)</font></div><div><font face="monospace, monospace"> * and add that to the surface pressure (or to 1013 if that's unknown) */</font></div><div><font face="monospace, monospace">int calculate_depth_to_mbar(int depth, pressure_t surface_pressure, int salinity)</font></div><div><font face="monospace, monospace">{</font></div><div><font face="monospace, monospace"><span style="white-space:pre">    </span>double specific_weight;</font></div><div><font face="monospace, monospace"><span style="white-space:pre">        </span>int mbar = surface_pressure.mbar;</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"><span style="white-space:pre">      </span>if (!mbar)</font></div><div><font face="monospace, monospace"><span style="white-space:pre">             </span>mbar = SURFACE_PRESSURE;</font></div><div><font face="monospace, monospace"><span style="white-space:pre">       </span>if (!salinity)</font></div><div><font face="monospace, monospace"><span style="white-space:pre">         </span>salinity = SEAWATER_SALINITY;</font></div><div><font face="monospace, monospace"><span style="white-space:pre">  </span>if (salinity < 500)</font></div><div><font face="monospace, monospace"><span style="white-space:pre">         </span>salinity += FRESHWATER_SALINITY;</font></div><div><font face="monospace, monospace"><span style="white-space:pre">       </span><span style="background-color:rgb(255,217,102)">specific_weight = salinity / 10000.0 * 0.981;</span></font></div><div><font face="monospace, monospace"><span style="white-space:pre">     </span>mbar += lrint(depth / 10.0 * specific_weight);</font></div><div><font face="monospace, monospace"><span style="white-space:pre"> </span>return mbar;</font></div><div><font face="monospace, monospace">}</font></div></div><div><br></div><div>Thanks</div><div><br></div><div><br></div></div></div></div>