new MacDive format

Dirk Hohndel dirk at hohndel.org
Wed Feb 6 12:21:20 PST 2013


Miika Turkia <miika.turkia at gmail.com> writes:

> On Wed, Feb 6, 2013 at 11:56 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
>>
>> Nick Shore (the author of MacDive) was kind enough to alert me to an upcoming change in the file format for the MacDive XML. Here's an example file that should show all the relevant elements.
>
> Good, I'll update the XSLT accordingly. Something I have already
> noticed is, that the root tag is dives, thus it might collide easily
> with other divelog files.
>
> Does anyone know whether the stored information varies between metric
> and imperial units. Or is it only a matter of displaying the data?

The stored information varies. While we always store metric, Nick has US
users who want to easily parse that XML to then display the dive info on
web pages, etc, and they asked him for storing in the "local" system,
i.e. imperial, so they didn't need to do any conversions to display the
data.

>> We already import much of this correctly; we don't import the gear of
>> course, and we appear not to parse the ppo2 and the alarms in the
>> samples. It would be neat if we could match the dive computers by
>> serial :-)
>
> The tank information was something that I probably do want to import
> from the logs and match with gases information. Or actually when
> looking at the new format it is easier than I thought as I only need
> info from the gases sections as the tank size is available there now.

I noticed that.

> I have also considered importing the gear information and storing it
> to the notes field - do you guys think this makes sense or should it
> just be ignored?

See my other email. I don't think it belongs in the notes, but wanted to
introduce (post 3.0) an extras section that has XML inside it so the
random data can be somewhat structured.

> And one big consideration is how to import the information of the dive
> computer used. Currently the Model and serial number are available,
> but where should I "copy" the serial number to in the subsurface log
> format?

We store that in the settings:

<settings>
<divecomputerid model='Suunto HelO2' deviceid='995dd566' serial='23500027' firmware='1.0.4'/>


/D


More information about the subsurface mailing list