<div dir="ltr">On 1 December 2017 at 16:54, Jef Driesen <<a href="mailto:jef@libdivecomputer.org">jef@libdivecomputer.org</a>> wrote:<br>> On 2017-12-01 15:57, Davide DB wrote:<br>>><br>>> Yes, what do you need exactly?<br>>> I this thread I shared the dctool raw data file and some screenshots<br>>> of Shearwater desktop and Subsurface of the same dive.<br>>> I can share the Subsurface xml file and maybe an export from<br>>> shearwater desktop if exist.<br>>> Eventually I will send you everything off list.<br>><br>><br>> The raw dive data, and also the data from Shearwater Desktop to compare<br>> against. The subsurface xml is useless here, because that's just the output<br>> of the libdivecomputer parser. Since that's basically what we want to verify<br>> it useless as "ground truth".<br>><br>>>> The average ppO2 is stored directly in the data, so that shouldn't match<br>>>> perfectly. But the individual sensors is another story. In the data there<br>>>> is<br>>>> only the millivolt, and libdivecomputer converts this into a ppO2 value<br>>>> based on the calibration values. This conversion is reverse engineered,<br>>>> so a<br>>>> mistake there is not impossible. Note that libdivecomputer no longer<br>>>> reports<br>>>> the average ppO2, only the individual sensors.<br>>>><br>>>> Is the resulting ppO2 wrong for the entire dive, or only during the deco<br>>>> stop? The calibration does a simple multiplication with a constant value,<br>>>> so<br>>>> if there is something wrong there, I would expect to see the same kind of<br>>>> error throughout the entire dive.<br>>><br>>><br>>> Yes, it's wrong for the entire dive. I noticed the error looking at<br>>> the deco part just because Subsurface signalled me being at over 1.6<br>>> for all the 6 meter stop. But looking at O2 values in the deep part,<br>>> Subsurface seems to report always 0.1, 0.2 more than the real value.<br>><br>><br>> That's already good to know. So that means that either the calibration<br>> constant, our calibration formula, or even the decoding of the millivolt<br>> values is wrong. But the problem here is how do we verify this?<br>><br>> Look at the sample data in your xml export from shearwater desktop:<br>><br>> <diveLogRecord><br>>     <currentTime>0</currentTime><br>>     <currentDepth>4</currentDepth><br>>     <firstStopDepth>0</firstStopDepth><br>>     <ttsMins>1</ttsMins><br>>     <averagePPO2>0.98</averagePPO2><br>>     <fractionO2>0.18</fractionO2><br>>     <fractionHe>0.45</fractionHe><br>>     <firstStopTime>0</firstStopTime><br>>     <currentNdl>99</currentNdl><br>>     <currentCircuitSetting>0</currentCircuitSetting><br>>     <waterTemp>20</waterTemp><br>>     <gasSwitchNeeded>false</gasSwitchNeeded><br>>     <externalPPO2>false</externalPPO2><br>>     <setPointType>0</setPointType><br>>     <circuitSwitchType>0</circuitSwitchType><br>>     <sensor1Millivolts>54</sensor1Millivolts><br>>     <sensor2Millivolts>55</sensor2Millivolts><br>>     <sensor3Millivolts>54</sensor3Millivolts><br>>     <batteryVoltage>1.52</batteryVoltage><br>>     <tank0pressurePSI>0</tank0pressurePSI><br>>     <tank1pressurePSI>0</tank1pressurePSI><br>>     <gasTime>0</gasTime><br>>     <sac>0</sac><br>> </diveLogRecord><br>><br>> There are millivolt values, but no corresponding ppO2 values. So I can<br>> double check the millivolt values, but we have nothing to compare our ppO2<br>> values against.<br>><br>> Jef<br><br>Hummm...<br>If I enable the average pO2 display on Subsurface even that values are higher than the average calculated by Shearwater Desktop (SD).<br>Of course if the input data have an offset, even the resulting average will be biased.<br>You wrote:<br><br>> In the data there is only the millivolt, and libdivecomputer converts this into a ppO2 value based on the calibration values. This conversion is reverse engineered, so a mistake there is not impossible.<br><br>What I do not understand is how this conversion was made the very first time. I mean how did you reverse engineered those values? I mean did you have a reference data set (mV, calibration K and resulting po2) to compare against?<div><br></div><div>SD optionally shows the individual mv values against the average pO2. Is this sufficient?</div><div><br></div><div><img src="cid:ii_16012f5f0bb1b2f5" alt="Inline images 1" style="margin-right: 0px;"><br></div><div><br><div>Going Sci-Fi the hard way to solve this is having the computer recording a dive at a fixed depth and a fixed FO2 input. I have (nearly) all the pieces to setup a test like this except that the sensor cable doesn't pass through the pressure chamber :) I don't know if the Petrel can be forced to record a dive at ambient pressure.</div><div><br><br>-- <br>Davide<br><a href="https://vimeo.com/bocio/videos">https://vimeo.com/bocio/videos</a></div></div></div>