Import from JDiveLog misses deco ceiling

Linus Torvalds torvalds at linux-foundation.org
Fri Dec 14 09:36:33 PST 2012


On Fri, Dec 14, 2012 at 8:52 AM, Jan Schubert <Jan.Schubert at gmx.li> wrote:
>
> OK, attached two samples to Ticket #38:

Ugh. I'd forgotten how nasty the jdivelog xml is.

Doing

    sed 's/></>\n  </g'< ostc.jlb > readable.jlb

makes it a bit better, and then you have beauties like

  <T>60.0</T>
  <TEMPERATURE>288.54999999999995</TEMPERATURE>

That's sample time in tenths of a second, and temperatures in
femto-degrees. That's readable.

Anyway, the deco information seems to be these things:

  <DECOINFO tfs="170.0">0.0</DECOINFO>
  <DECOINFO tfs="170.0">0.0</DECOINFO>
  <DECOINFO tfs="170.0">0.0</DECOINFO>
  <DECOINFO tfs="60.0">0.0</DECOINFO>
  <DECOINFO tfs="26.0">0.0</DECOINFO>
  <DECOINFO tfs="13.0">0.0</DECOINFO>
  <DECOINFO tfs="8.0">0.0</DECOINFO>
  <DECOINFO tfs="5.0">0.0</DECOINFO>
  <DECOINFO tfs="3.0">0.0</DECOINFO>
  <DECOINFO tfs="1.0">6.0</DECOINFO>
  <DECOINFO tfs="0.0">0.0</DECOINFO>
  <DECOINFO tfs="1.0">3.0</DECOINFO>
  <DECOINFO tfs="1.0">9.0</DECOINFO>
  <DECOINFO tfs="1.0">15.0</DECOINFO>
  <DECOINFO tfs="1.0">18.0</DECOINFO>
  <DECOINFO tfs="1.0">21.0</DECOINFO>
  <DECOINFO tfs="1.0">27.0</DECOINFO>
  <DECOINFO tfs="1.0">24.0</DECOINFO>
  <DECOINFO tfs="1.0">27.0</DECOINFO>
  <DECOINFO tfs="1.0">27.0</DECOINFO>

The "tfs" seems to be the NDL time if the decoinfo value is zero, and
presumably the stop time if it's non-zero (when it's the ceiling).
"Time For Stop"?

I dunno. I despise bad XML, and the #1 sign of bad XML is "not
human-readable". The above is neither human-readable *nor* sane for a
computer (ie the whole "tfs means NDL _or_ stop time" is a f*cking
joke. Why not use "ndl" if that's what you mean?)

I'm hoping somebody else will fix the xslt, though. The translation
into subsurface *should* translate

  <T>40.0</T>
  <D>5.21</D>
  <DECOINFO tfs="170.0">0.0</DECOINFO>

into

  <sample time='0:40 min' depth='5.21 m' ndl='170:00 min' />

and something like

  <T>560.0</T>
  <D>83.83</D>
  <TEMPERATURE>279.84999999999997</TEMPERATURE>
  <DECOINFO tfs="1.0">15.0</DECOINFO>

into

  <sample time='9:20 min' depth='83.83 m' temp='6.7 C' stoptime='1:00
min' stopdepth='15 m' \>

(Seriously - why is subsurface the only project I've *ever* seen that
tries to make the xml readable? Even if it ends up being bigger -
which it doesn't in this case - it's worth it)

And why the f*ck does jdivelog apparently give stop times and ndl
times in *decimal* minutes? Christ. What unbelievable crap.

But apart from the crazy jdivelog stuff, that does seem to be a very
manly dive. Christ, and here I think going down to 200ft is going
really deep.

               Linus


More information about the subsurface mailing list