Pro Plus 2

Dirk Hohndel dirk at hohndel.org
Sun Jan 15 14:53:15 UTC 2012


On Sun, 15 Jan 2012 08:31:31 +0100, Jef Driesen <jefdriesen at telenet.be> wrote:
> On 01/14/2012 07:57 PM, Philip Balister wrote:
> > On 01/14/2012 01:25 AM, Jef Driesen wrote:
> >> On 01/13/2012 11:04 PM, Philip Balister wrote:
> >>> 1) I have six dives in the computer, but only the first 5 show in
> >>> subsurface.
> >>
> >> Depending on your (short) sample rate setting and (long) dive times,
> >> it's possible there is not enough memory to store profiles for all
> >> dives. In addition to the profile data, the oceanic dive computers
> >> maintain a summary for each dive stored in separate memory area. So it's
> >> possible the dive computer can show dives for which it doesn't have the
> >> profile data anymore.
> >
> > Sample rate looks like 15 seconds. It is the most recent dive that does
> > not show up.
> 
> I already found where it goes wrong. The dive is downloaded correctly, but the 
> parsing fails, and I guess subsurface doesn't import anything at all in that case.
> 
> The problem is that the vtpro compatible dive computers support a depth based 
> sample rate in addition to the time based sample rate. This means the dive 
> computer doesn't record at fixed time intervals, but whenever a change in depth 
> crosses a certain threshold. To be able to draw the profile graph, a timestamp 
> is recorded for each sample. This "feature" is a real pain in the ass because it 
> does break any application that assumes a fixed time interval between two 
> samples. To make things even worse, the timestamp only has a resolution of one 
> minute, which means there can be several samples with the same timestamp. 

Yikes. Subsurface would be rather unhappy with this. We definitely
assume that the time stamps are strictly monotone.

> Another potential problem because applications are likely to expect the 
> timestamps to be unique and increasing for each sample. To workaround this 
> issue, the libdivecomputer code counts the number of samples within the same 
> minute, and then spread them evenly.

So you give them an artificial 15 sec resolution?

> It's this timestamp that is causing the trouble in your case. Normally with a 
> time based sample rate, there is a fixed number of samples per time unit. For 
> example a 15s samplerate will always have 4 samples per minute. But that 
> assumption is violated in your problematic dive. There are 5 samples with a 
> timestamp of 37 minutes. I have absolutely no idea why the dive computer does 
> this. It's the first time I encounter this.

But that shouldn't be a problem, if you then spread those evenly and
give us an artificial 12 sec resolution. Subsurface makes no assumptions
that the sample rate has to be constant.

/D




More information about the Devel mailing list