On 01-12-17 17:43, Davide DB wrote:
On 1 December 2017 at 16:54, Jef Driesen <[email protected]> wrote:
On 2017-12-01 15:57, Davide DB wrote:
That's already good to know. So that means that either the calibration
constant, our calibration formula, or even the decoding of the millivolt
values is wrong. But the problem here is how do we verify this?

Look at the sample data in your xml export from shearwater desktop:

<diveLogRecord>
     <currentTime>0</currentTime>
     <currentDepth>4</currentDepth>
     <firstStopDepth>0</firstStopDepth>
     <ttsMins>1</ttsMins>
     <averagePPO2>0.98</averagePPO2>
     <fractionO2>0.18</fractionO2>
     <fractionHe>0.45</fractionHe>
     <firstStopTime>0</firstStopTime>
     <currentNdl>99</currentNdl>
     <currentCircuitSetting>0</currentCircuitSetting>
     <waterTemp>20</waterTemp>
     <gasSwitchNeeded>false</gasSwitchNeeded>
     <externalPPO2>false</externalPPO2>
     <setPointType>0</setPointType>
     <circuitSwitchType>0</circuitSwitchType>
     <sensor1Millivolts>54</sensor1Millivolts>
     <sensor2Millivolts>55</sensor2Millivolts>
     <sensor3Millivolts>54</sensor3Millivolts>
     <batteryVoltage>1.52</batteryVoltage>
     <tank0pressurePSI>0</tank0pressurePSI>
     <tank1pressurePSI>0</tank1pressurePSI>
     <gasTime>0</gasTime>
     <sac>0</sac>
</diveLogRecord>

There are millivolt values, but no corresponding ppO2 values. So I can
double check the millivolt values, but we have nothing to compare our ppO2
values against.

Hummm...
If I enable the average pO2 display on Subsurface even that values are
higher than the average calculated by Shearwater Desktop (SD).
Of course if the input data have an offset, even the resulting average will
be biased.
You wrote:

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.

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?

Anton implemented the conversion for the Petrel. It's a simple multiplication:

   ppO2 = millivolt * calibration / 100000.0;

So very straightforward to guess and then check whether the result is close to the average value (which is stored in the data as ppO2 value).

The Predator needed an extra scaling factor of 2.2. I found the scaling factor by doing the ppO2 conversion above, then average the three values and doing a linear regression against the average ppO2 from the data.

I think I still have that code lying around somewhere. I'll have a look again, but my weekend is fully booked, so that will probably be something for next week.

SD optionally shows the individual mv values against the average pO2. Is
this sufficient?

No, because both values are available in the data.

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.

Well, the easiest and most reliable solution would be if Shearwater would tell us how to do the conversion :-)

Jef
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to