[PATCH] Visualisation of individual oxygen sensor data for CCR dives
Jef Driesen
jef at libdivecomputer.org
Fri Apr 28 05:58:24 PDT 2017
On 2017-04-17 22:34, Anton Lundin wrote:
> On 17 April, 2017 - Jef Driesen wrote:
>
>> On 14-04-17 21:57, Anton Lundin wrote:
>> >On 13 April, 2017 - Jef Driesen wrote:
>> >
>> >>On 2017-04-12 10:47, Anton Lundin wrote:
>> >>>
>> >>>The issue with current libdivecomputer DC_SAMPLE_PPO2 is that you cant
>> >>>distinguish between ha "real" "voted" pO2 and the raw sensor value.
>> >>>
>> >>>I would like to see a option to export both, and be able to handle them
>> >>>differently
>> >>
>> >>We could introduce a new structure that carries a sensor index
>> >>(similar to DC_SAMPLE_PRESSURE):
>> >>
>> >>struct ppo2 {
>> >> unsigned int sensor;
>> >> double value;
>> >>};
>> >>
>> >>That way we can easily report multiple DC_SAMPLE_PPO2 values, each
>> >>with a
>> >>different sensor id. And for the voted/calculated ppO2, we can use
>> >>some magic value, like:
>> >>
>> >>#define DC_SENSOR_NONE 0xFFFFFFFF
>> >>
>> >>(Just like we already have DC_GASMIX_UNKNOWN).
>> >
>> >That would be great.
>> >
>> >Another thing would be to expose the voting information. Seeing when the
>> >sensor was voted out and the sensors performance after, is quite
>> >relevant for trying to diagnose what happened.
>>
>> Unless I missed something, the voting info isn't stored in the
>> sample data, only in the dive header. I'm not a CCR diver, but isn't
>> the voting done for each sample? If that's correct, then the voting
>> bits in the dive header aren't very useful, right? So I don't think
>> we can report voting info.
>>
>> I assume the voting bits in the dive header indicate the sensor has
>> been voted out one or more times during the dive, but not necessary
>> for the entire dive?
>
> I guess that the voting is evaluated in each sample, but when a sensor
> is voted out, its out for good.
>
>
> If the voting information won't be exposed via mainline
> libdivecomputer,
> its a simple patch to add a DC_FIELD_STRING as a Subsurface patch.
>
>
> Anyway, I think its really important information that should be
> exposed.
I was referring to the voting per sample. That's info that isn't stored
anywhere. Thus you can only observe it indirectly. (The ppO2 value from
a sensor that is voted out will be significant different from the other
two and the average ppO2 over the three sensors won't match the stored
average. But the exact voting algorithm is probably not published.)
Jef
More information about the subsurface
mailing list