[Fwd: [Subsurface-trac] #486: Manually entered profile not transferred correctly to divelogs.de]

Dirk Hohndel dirk at hohndel.org
Sun Apr 6 14:41:00 PDT 2014


Interesting bug. So the default dive created when simply doing "Add
Dive" and then saving the dive looks like this in Subsurface:

<divelog program='subsurface' version='2'>
<settings>
</settings>
<dives>
<dive number='1' date='2014-04-06' time='14:33:25' duration='46:06 min'>
  <cylinder />
  <divecomputer model='manually added dive'>
  <depth max='15.0 m' mean='13.671 m' />
  <sample time='0:00 min' depth='0.0 m' />
  <sample time='1:00 min' depth='15.0 m' />
  <sample time='40:00 min' depth='15.0 m' />
  <sample time='42:00 min' depth='5.0 m' />
  <sample time='45:00 min' depth='5.0 m' />
  <sample time='46:06 min' depth='0.0 m' />
  </divecomputer>
</dive>
</dives>
</divelog>

When I then export to divelogs.de I get the following xml in a zip file:

<?xml version="1.0" encoding="UTF-8"?>
<DIVELOGSDATA>
<DIVELOGSNUMBER>1</DIVELOGSNUMBER>
<DATE>06.04.2014</DATE>
<TIME>14:29:37</TIME>
<DIVETIMESEC>2766</DIVETIMESEC>
<LOCATION/><WATERVIZIBILITY/>
<PARTNER/>
<CYLINDERDESCRIPTION/><CYLINDERSIZE/><CYLINDERSTARTPRESSURE/><CYLINDERENDPRESSURE/>
<WEIGHT/>
<O2PCT/>
<LOGNOTES/>
<LAT/>
<LNG/>
<MAXDEPTH>15.0</MAXDEPTH>
<MEANDEPTH>13.671</MEANDEPTH>
<AIRTEMP/>
<WATERTEMPMAXDEPTH/>
<SAMPLEINTERVAL>60</SAMPLEINTERVAL>
<SAMPLE><DEPTH>0.0</DEPTH></SAMPLE>
<SAMPLE><DEPTH>15.0</DEPTH></SAMPLE>
<SAMPLE><DEPTH>15.0</DEPTH></SAMPLE>
<SAMPLE><DEPTH>5.0</DEPTH></SAMPLE>
<SAMPLE><DEPTH>5.0</DEPTH></SAMPLE>
<SAMPLE><DEPTH>0.0</DEPTH></SAMPLE>
</DIVELOGSDATA>

Linebreaks are mine for readability :-)
So what we encode clearly assumes a fixed sample interval which isn't
there in the manually added dive. Which results in a completely crap
dive being uploaded.

Rainer - is that fixed sample interval format the only format
divelogs.de understands? Or is there another format where we could give
the time stamp in the sample as we do in Subsurface?

If not, I guess we'd have to create synthetic samples to try to get
"reasonably close" (in this case we could get it nearly perfectly).
Miika, would that be doable in your xslt or would we need to pre-process
things to have the correct samples?

Either way, definitely a bug.

/D

-------- Forwarded Message --------
From: Subsurface Bug Tracking System <trac at hohndel.org>
Reply-to: trac at hohndel.org
Cc: subsurface-trac at hohndel.org
Subject: [Subsurface-trac] [Subsurface] #486: Manually entered profile
not transferred correctly to divelogs.de
Date: Sun, 06 Apr 2014 19:32:37 -0000

#486: Manually entered profile not transferred correctly to divelogs.de
-------------------------------------+-------------------------------------
                                            Reporter:|      Owner:  tcanabrava
  martinlong1978                     |     Status:  new
                                                Type:|  Component:  Qt-UI
  defect                             |   Keywords:
                                            Priority:|
  minor                              |
                                             Version:|
  4.0.3                              |
Plattform (please give specifics in  |
  the ticket text):  All             |
-------------------------------------+-------------------------------------
\
\
 I created a profile manually, based on a printout passed to me by my
 buddy. The XML for this dive in my subsurface file is:

 <dive number='6' rating='4' visibility='1' tags='fresh' date='2014-03-16'
 time='12:08:17' duration='35:06 min'>
   <location gps='52.541865 -1.272842'>Stoney Cove</location>
   <divemaster>Steve Priestley</divemaster>
   <buddy>Steve Priestley</buddy>
   <notes>Improved bouyancy with weight
 Lowered Cylinder
 More air in BCD
 Less air in suit</notes>
   <suit>Oceanic membrane</suit>
   <cylinder size='12.0 l' workpressure='232.0 bar' description='12L 232
 bar' start='240.0 bar' end='110.0 bar' />
   <weightsystem weight='13.0 kg' />
   <divecomputer model='manually added dive'>
   <depth max='15.0 m' mean='5.591 m' />
   <temperature air='15.0 C' water='7.0 C' />
   <sample time='0:00 min' depth='0.0 m' />
   <sample time='1:00 min' depth='3.0 m' />
   <sample time='5:00 min' depth='6.0 m' />
   <sample time='27:00 min' depth='6.0 m' />
   <sample time='29:00 min' depth='8.0 m' />
   <sample time='31:00 min' depth='5.0 m' />
   <sample time='34:00 min' depth='5.0 m' />
   <sample time='35:06 min' depth='0.0 m' />
   </divecomputer>
 </dive>


 You can see there are points a 0min 1min 5min etc.

 However, when I upload the profile to divelogs.de, the data points are all
 evenly spaced, 1 min apart. 0 min, 1min, 2min, 3min etc. The times of the
 points has been ignored.

 https://en.divelogs.de/dive/831324&sort=depth

 Guess: I suspect that divelogs.de uses a uniform sample rate, which most
 computers generate, however, manually entered profile are not presenting
 the data in the correct way. They should be interpolating the points.
\
\
\

--
Ticket URL: <http://trac.hohndel.org/ticket/486>
Subsurface <http://subsurface.hohndel.org>
Subsurface Dive Log
_______________________________________________
Subsurface-trac mailing list
Subsurface-trac at hohndel.org
http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface-trac




More information about the subsurface mailing list