Dealing with Poseidon MkVI dive logs.

Dirk Hohndel dirk at hohndel.org
Tue Apr 22 10:26:00 PDT 2014


On Tue, 2014-04-22 at 19:23 +0300, Miika Turkia wrote:
> Hi Willem,
> 
> 
> I'll include the mailing list, as this should really be discussed
> there, especially since we are talking about functionality me and
> Tomaz are not familiar with.

Yes, unless there is something that's truly personal I really prefer if
people discuss things on the mailing list. Even when discussions happen
on IRC, if something important was discussed, please send a summary to
the list so the other key developers know what's going on (remember,
many of the core people are never on IRC... Linus and Lubomir for
example).

> On Sun, Apr 20, 2014 at 10:08 PM, Willem Ferguson
> <willemferguson at zoology.up.ac.za> wrote:
>         Tomaz, Miika,
>         
>         The good news after the last email is that I discovered that
>         Linus had already built in a facility to use po2-values
>         directly from the dive log file. For demo purposes I add four
>         source code files that I changed over the weekend. I clearly
>         marked all places where I did editing.
> 
> 
> It is actually easier to see the changes if you send a normally
> formatted patch. Just commit it to git and user "git format-patch
> origin" to produce a patch file that shows quickly what has changed
> and can be easily included in our own git clones with "git am".

Yes. git diffs are the way to communicate code changes. Totally agree.
We did in fact have some simplistic and insufficient CCR support. Then
the key driver behind this went on his final dive and things haven't
really continued. So this was all in the Gtk version. I'm not sure how
complete it is and if it's still in working condition. Actually, I doubt
that which is why "adding CCR support" was one of the GSoC projects I
suggested :-)

>         1) Profile.c was changed to accept the first tank which in the
>         dive log file has EAN100 and then to use the po2 data from the
>         log file. I attach a screen shot to show that this is done
>         correctly.
>         The other three files were changed as follows:
>         2) Three attributes (o2sensor1,o2sensor2,ccrsetpoint) were
>         added to the sample structure (defined in dive.h).

Without having seen your changes, please look what I responded to your
other email regarding changes to the data structures

>         3) An attribute of "isrebreather" was added to the
>         divecomputer structure. (see dive.h as well as parse-xml). At
>         the moment this is an integer. It is an internal number that
>         indicates whether a particular dive computer is a rebreather
>         or not.

I wonder how this can be a "per divecomputer" flag. One of the typical
scenarios for CCR divers is "bail out to OC" and then the dive continues
as open circuit dive. And my guess is you can also switch back to CCR if
you so chose (I'd have to verify this with our CCR divers).

>         The three sample attributes above as well as the isrebreather
>         attribute are read in correctly. I added printf statements at
>         places in divelist.c to show that these items are stored
>         correctly from the dive log file.
>         So, now we have the o2sensor1, o2sensor2 and ccrsetpoint data
>         stored correctly (I hope!) and we have an attribute that
>         indicates whether the dive computer is a rebreather or not.
>         4) There is already a po2 attribute of sample that Linus
>         created when writing the code. Remember po2 is the mean of
>         o2sensor1 and o2sensor2.

IIRC from my discussions with Jan there was "pO₂" as the "consensus
value" and then the individual sensors - but this may be very different
for different computers, though.

>         I hope this provides sufficient infrastructure to be able to
>         add the additional graphs in Qt.
>         
>         There is one unclarity. I defined the isrebreather attribute
>         to the dc structure in line 112 of parse-xml.c. This is the
>         one that is used, as far as I can see. There is another
>         structure called "divecomputer" defined in dive.h. I added an
>         "isrebreather" attribute to it, but as far as I can see it is
>         not used in any of the four files that I worked with. Would
>         you be prepared to check, please? Looks like a dubious
>         duplication in variables and I probably do not read the C code
>         correctly.
> 
> 
> I think Dirk will be able to answer this one easily. I have not looked
> into this part of the code before... 

I would have to see the patches to comment :-)
>         
>         An important part of this adaptation of the code is to deal
>         with the cylinders in an appropriate way, since rebreathers
>         use two cylinders simultaneously, the first of which is
>         EAN100.
>         
>         I attach the xml dive log as an example. It has been improved
>         from the previous xml that I sent you.
> 
> 
> I wonder if there is a bug in the battery reading. Value seems to be
> missing the first 15+ minutes. Or is it only reported when it drops
> below certain value?

Again, I think each DC will have different oddities here. This will be
one of our biggest challenges. To model all this in a sane way.

/D




More information about the subsurface mailing list