Issue with OSTC sport data

33 views
Skip to first unread message

hatzenweiher

unread,
Jun 1, 2020, 2:49:34 AM6/1/20
to Subsurface Divelog
When posting questions you can help us answer you more quickly if you make sure you include some basic information:
  • Which version are you using (hint: look at the About screen)?
  • Which OS are you running?
  • (if applicable) which dive computer are you using?
Feel free to delete this text when posting your question.

When posting questions you can help us answer you more quickly if you make sure you include some basic information:
  • Which version are you using (hint: look at the About screen)? 4.9.3
  • Which OS are you running?
  • (if applicable) which dive computer are you using? HeinrichWeihkamp OSTC sport, v10.66
Hi, when downloading my dives from my OSTC sport, I see different depth information on Subsurface than on my TC. It is not only rounding, last dive difference was 2,2 meters more on subsurface. 

Any ideas? Thanks, Uli

Linus Torvalds

unread,
Jun 1, 2020, 3:43:47 PM6/1/20
to Subsurface Divelog, Jef Driesen
On Sun, May 31, 2020 at 11:49 PM hatzenweiher <u...@koester-im-web.de> wrote:
>
> Hi, when downloading my dives from my OSTC sport, I see different depth information on Subsurface than on my TC. It is not only rounding, last dive difference was 2,2 meters more on subsurface.

TC? (Is that perhaps just the German shorthand for Tauchcomputer?)

Anyway, I think the OSTC dive computers actually internally log
everything as pressure (mbar relative to surface).

libdivecomputer than converts that into a depth using the weight of
water. But it *should* use the same algorithm that the OSTC itself
uses internally:

// Get the salinity factor.
unsigned int salinity = data[layout->salinity];
if (version == 0x23 || version == 0x24)
salinity += 100;
if (salinity < 100 || salinity > 104)
salinity = 100;
double hydrostatic = GRAVITY * salinity * 10.0;

and then it has

// Depth (mbar).
unsigned int depth = array_uint16_le (data + offset);
sample.depth = (depth * BAR / 1000.0) / hydrostatic;

but I wonder if you have set salinity to something very high (the
above restricts it to between 1.0 and 1.04, I wonder if the salinity
can be set to something more extreme - higher salinities certainly
exists in odd places...

2.2 meters is a big difference, unless it was perhaps a dive to some
extreme depths? Or very extreme salinities.

Adding Jef, since this would all be internal to libdivecomputer. Maybe
the Sport has the salinity field somewhere else?

Linus

Grey Wolf

unread,
Jun 1, 2020, 11:41:13 PM6/1/20
to subsurfac...@googlegroups.com
hi  hatzenweiher
please at first check your salinty- setting on your device and in subsurface.
than take a look at this:

and update your dc.


martin

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/CAHk-%3Dwii93ku9GdtTvg9ZcfPqK5aTr%2B%2B6g28wKq9vaY5GigEww%40mail.gmail.com.

Jef Driesen

unread,
Jun 2, 2020, 3:54:33 AM6/2/20
to subsurfac...@googlegroups.com, hatzenweiher, Matthias Heinrichs
I checked the ostc documentation again. The problem is not the location of the
salinity field, but maybe the range of the value. The range for the old ostc is
100 to 104, but for the newer hwos based models, it's 0-5%. Note that elsewhere
in the same document (in the section describing the settings), the salinity
setting (0x30) is documented as 0-4%. So I'm not really sure which of the two is
correct.

Assuming the valid range is actually 0-5%, that could indeed be the problem here.

@Matthias: Can you confirm the valid range for the salinity?

@Uli: I would like to check the value of the salinity field. Can you download
your OSTC again, with the "Save libdivecomputer logfile" checkbox enabled? When
done send me this log file. You may need to enable the "Force download of all
dives" checkbox as well. Or just create a dummy logbook file that you can
discard again after the download.

Jef

hatzenweiher

unread,
Jun 2, 2020, 1:34:31 PM6/2/20
to Subsurface Divelog
Hi, here is the log file from the dive.
I checked the box to download the respective data from the DC, but can not check if it worked...

Few remarks, smaller correction:
DC shows 42.9m eepth (as before, did not change any settings in the DC), not 41,9 which led me to the statement deviation of 2+ meters. In the ssrf file, I see the deepest point shown as 43,7 (?), thus rounded up to 44m (?). Still a difference...

I can also add screenshots from the dive computer if needed.

regards,
Uli
OSTC_sport_subsurface_depth_issue.ssrf

Jef Driesen

unread,
Jun 2, 2020, 2:00:44 PM6/2/20
to subsurfac...@googlegroups.com, hatzenweiher
On 2/06/2020 19:34, hatzenweiher wrote:
> Hi, here is the log file from the dive.
> I checked the box to download the respective data from the DC, but can not check
> if it worked...
>
> Few remarks, smaller correction:
> DC shows 42.9m eepth (as before, did not change any settings in the DC), not
> 41,9 which led me to the statement deviation of 2+ meters. In the ssrf file, I
> see the deepest point shown as 43,7 (?), thus rounded up to 44m (?). Still a
> difference...
>
> I can also add screenshots from the dive computer if needed.

You attached the subsurface logbook file. That's not what I need. I need the
libdivecomputer logfile that is created during the download when you enable the
"Save libdivecomputer logfile" checkbox.

Jef

hatzenweiher

unread,
Jun 2, 2020, 4:02:30 PM6/2/20
to Subsurface Divelog
Ok, I guess it might be the .log file.

#enduser
20200602 ostc sport depth issue.log

Jef Driesen

unread,
Jun 3, 2020, 6:10:32 AM6/3/20
to subsurfac...@googlegroups.com, hatzenweiher
On 2/06/2020 19:34, hatzenweiher wrote:
> Hi, here is the log file from the dive.
> I checked the box to download the respective data from the DC, but can not check
> if it worked...
>
> Few remarks, smaller correction:
> DC shows 42.9m eepth (as before, did not change any settings in the DC), not
> 41,9 which led me to the statement deviation of 2+ meters. In the ssrf file, I
> see the deepest point shown as 43,7 (?), thus rounded up to 44m (?). Still a
> difference...

I checked the salinity settings. Your dives have values 0, 3 and 4. So
definitely no out of range values. I also checked my own ostc, and it's not
possible to configure values outside the range 0-4%.

For your dive on 2020-05-31 09:29:00, the maximum depth stored in the dive
header is 42.94m. So this matches the value you see on your dive computer.

The maximum depth in the samples is a bit larger, with 43.76m. Subsurface seems
to prefer this value as the maximum depth instead of the value from the dive
header. So that's already one reason why you see a different value. Note that
it's not very unusual that the maximum depth in the samples is a bit different
from the maximum depth in the dive header. This is the case for many dive computers.

Another reason is that for the ostc, the maxdepth in the dive header already
takes into account the salinity, while the depth in the samples does not include
it. The code takes that into account, but I just noticed that for the samples we
also take into account gravity (9.80665 m/s^2), while for the maximum (and
average) depth in the header we don't. If I fix that, then the maximum depth
becomes 43.79m, which is very close to the maxdepth in the samples.

So I guess that means the value displayed by the ostc does not include the
gravity factor.

Jef

hatzenweiher

unread,
Jun 3, 2020, 11:01:54 AM6/3/20
to Subsurface Divelog
Thanks Jef,
I guess I understand the explanation. What is now the final recommendation? Know about it and ignore it as might not ruin my diving?

regards,
Uli

Jef Driesen

unread,
Jun 4, 2020, 4:53:41 AM6/4/20
to subsurfac...@googlegroups.com, hatzenweiher
On 3/06/2020 17:01, hatzenweiher wrote:
> I guess I understand the explanation. What is now the final recommendation? Know
> about it and ignore it as might not ruin my diving?

I checked with Matthias, and apparently the depth is no longer stored as
pressure (in millibar), but directly as depth (in meters) with the salinity and
gravity factor already applied.

I wasn't aware of this change, but I'll fix it. Thus in the next subsurface
release, the depths will match again with the values you see on your ostc!

Jef
Reply all
Reply to author
Forward
0 new messages