[PATCH] Correct bug: setpoint handling of Poseidon CCR dive logs

Willem Ferguson willemferguson at zoology.up.ac.za
Wed Oct 29 12:06:20 PDT 2014


On 29/10/2014 21:05, Willem Ferguson wrote:
> On 29/10/2014 20:36, Dirk Hohndel wrote:
>> On Wed, Oct 29, 2014 at 07:57:38PM +0200, Willem Ferguson wrote:
>>> @@ -1178,6 +1178,10 @@ static void fixup_dive_dc(struct dive *dive, 
>>> struct divecomputer *dc)
>>>                   mintemp = temp;
>>>           }
>>>   +        // If there are consecutive identical O2 setpoint 
>>> readings, throw away the redundant ones.
>>> +        if (sample->setpoint.mbar == lastsetpoint)
>>> +                sample->setpoint.mbar = 0;
>> I believe we came to the conclusion that this was the wrong thing to do
>> A setpoint of 0 indicates an OC dive...
>>
>> Can you explain why you need this?
>>
>> /D
>> _______________________________________________
>> subsurface mailing list
>> subsurface at subsurface-divelog.org
>> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>
> An excellent question. In dive.c the criterion was whether a po2 
> partial pressure is specified or not. If not, an OC dive is assumed. 
> For instance see function fill_pressures() in dive.c. Clearly there is 
> some care required here when zeroing out all the duplicate values. The 
> setpoint values are highly repetitive and, if not zeroed out, will 
> really create a lot of additional space requirement. On the other hand 
> the pressures.o2 values are not zeroed out since it is calculated much 
> later in the process, after the plotdata structures have been 
> initialised. On the other hand, the raw sensor values (from which 
> pressures.o2 is calculated) are zeroed out. Hope this argument sounds 
> half-logical??
> Kind regards,
> willem
>


-- 
Willem Ferguson
Director: Centre for Environmental Studies,
University of Pretoria
Tel: 012-4202017 / 012-4204048
e-mail: willemferguson at zoology.up.ac.za



More information about the subsurface mailing list