new Uemis downloader

Dirk Hohndel dirk at hohndel.org
Sat Dec 1 19:18:58 PST 2012


On Dec 1, 2012, at 6:52 PM, Linus Torvalds wrote:

> On Sat, Dec 1, 2012 at 6:40 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
>> 
>> But please only use on test files. It creates an INSANE amount of events. I am still working on the code to store the NDL/deco information in the samples instead and have no intention of writing a converter to convert the events into the new sample data.
> 
> Hmm. I don't have any such events, apparently. But comparing the new
> importer with the old, I did find something that looks odd:
> 
> Old:
> 
> -  <divecomputer model='Uemis Zurich'>
> -  <event time='18:25 min' type='4' flags='1' value='5070' name='ceiling' />
> -  <event time='18:25 min' type='1' value='60' name='deco' />
> -  <event time='18:30 min' type='4' flags='2' name='ceiling' />
>   <event time='19:10 min' name='Tank Pressure Info' />
> -  <event time='19:31 min' type='4' flags='1' value='3090' name='ceiling' />
> -  <event time='19:31 min' type='1' value='60' name='deco' />
>   <event time='21:55 min' name='Speed Alarm' />
> -  <event time='23:20 min' type='4' flags='2' name='ceiling' />
> 
> New:
> 
> +  <divecomputer model='Uemis Zurich' deviceid='e0484cf9' diveid='00000009'>
> +  <event time='18:25 min' type='1' value='3932165' name='deco stop' />
>   <event time='19:10 min' name='Tank Pressure Info' />
> +  <event time='19:31 min' type='1' value='3932163' name='deco stop' />
>   <event time='21:55 min' name='Speed Alarm' />
> 
> So the "ceiling" and "deco" events have gone away, and replaced with
> "deco stop" events that have some insane - and unexplained - value
> associated with them. It looks like it's two 16-bit values encoded
> into one 32-bit number. Ugly. Not that the old events were any
> prettier. What does the value mean there? Who knows..

It's the design that Jef wanted for libdivecomputer and for consistency I implemented the same for Uemis. Lower  16 bits are the stop depth in m, upper 16 bits the stop duration in seconds.

But I'll replace all of those events (for both Uemis and libdivecomputer based dive computers (so far only OSTC creates these events in libdivecomputer)) with an IMHO much more sane implementation that stores NDL / deco ceiling and deco stop time in the samples instead. Much cleaner. I just haven't found the time to finish and test this (it's mostly done for Uemis and works as far as I can tell).

> Anyway, apart from some changes like that, the main change is just
> that the new importer adds the deviceid and diveid fields. nd
> apparently we round the duration up to even minutes these days.

We do? Hmm. Why? I wasn't aware of an intentional change here. Something to investigate.

> Interestingly, the dive starting time seems to fluctuate by one second
> too when I compare the old and the new import. Is the uemis also doing
> some odd "relative date" thing where the time of the importing
> computer will affect the dive time?

Oh, there are three (no kidding. THREE) different start times that the Uemis records and they tend to be within a second or two of each other. I guess I must have unintentionally picked a different one of those values in this implementation. I need to go back and check.

/D


More information about the subsurface mailing list