Limited support for Suunto DM4

Miika Turkia miika.turkia at gmail.com
Tue Mar 5 10:44:33 PST 2013


On Tue, Mar 5, 2013 at 8:32 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
> Miika Turkia <miika.turkia at gmail.com> writes:
>
>> On Tue, Mar 5, 2013 at 8:00 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
>>> Miika Turkia <miika.turkia at gmail.com> writes:
>>>>> I've just noticed your interesting work on DM4. Thanks for the user-manual
>>>>> additions; they allowed me to locate the file on my Mac and to query the
>>>>> database schema.
>>>>>
>>>>> I've not had a proper play but it looks to me like the code to query the
>>>>> database is skeleton only at this stage.  I don't see any calls to step
>>>>> through the results of the selections.  Have I got the wrong end of the
>>>>> stick here?
>>>>
>>>> The sqlite3_exec registeres a callback (function: dm4_events) that is
>>>> called for every row returned by the sql query. So the results are
>>>> processed already. For the events there is another callback that
>>>> processes them.
>>>>
>>>> As far as I have tested the import, it works for all the basic stuff.
>>>> So it is quite usable already.
>>>
>>> I still need to get a DM4 data file that we can add to the sources.
>>
>> I just sent one. And realized while preparing it that you can actually
>> export dives in XML format from DM4. You just need to first select a
>> dive (or more) and the menu item appears.
>
> So we should make sure that we support that format as well (is it UDDF
> or something else?) - but of course the ability to read their native
> file format is a great feature.

Their own format with the profile, temperature and pressure blobs in
base64 encoded binary blob. I have one sample attached. SOB if you
want to include that.

I would guess that XSLT cannot be used to handle the blobs. So we
should include those in blob elements and implement the parsing in C.
(Base64 decode, and read floats, chars or ints from the buffer,
depending on the blob.)

miika
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Dive_2013-02-02-1614.xml
Type: text/xml
Size: 4248 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130305/fe07ae6e/attachment.xml>


More information about the subsurface mailing list