Discussion:
Change water type
tormento
2018-04-14 09:36:07 UTC
Permalink
I noticed that some of my old dives were imported with 1000g/l water.

Is there any way to edit, manually or automatically the salinity of those
ones?
Robert Helling
2018-04-14 11:40:44 UTC
Permalink
Hi,
Post by tormento
I noticed that some of my old dives were imported with 1000g/l water.
Is there any way to edit, manually or automatically the salinity of those ones?
it’s true that currently you cannot change the water type (was: salinity) of a dive downloaded from a computer, you can only use the value provided by the computer. This is a) because nobody has implemented a user interface to change it and b) (more importantly) because the water type is not so much about how salty the water tasted but how to convert ambient pressure (which is what the dive computer actually measures) to depths and back. But what the computer reports is depth and for the calculations (like SAC and the deco stuff) we again need the ambient pressure. So this is off if the dive computer and Subsurface do not agree on the conversion factor. So even if you were diving is sea water and your dive computer was set to fresh water (or missing that setting not set at all) it would still be better to log this as fresh water in Subsurface (to get the conversions right) than to manually set that to salt water (or we would have to correct the depths accordingly).

Best
Robert
tormento
2018-04-14 12:09:38 UTC
Permalink
Yes, I know very well the relation about salinity (density) and pressure
(depth). There is a delta between 2% and 3%. As a matter of fact is
pressure (even apparent one) to rule Henry’s Law and depth is only
determined by salinity.

Anyway some diving systems are really strict about max depth more than max
pressure :)

A way to fix salinity would be welcome, even hex editing configuration file.
Post by tormento
Hi,
I noticed that some of my old dives were imported with 1000g/l water.
Is there any way to edit, manually or automatically the salinity of those ones?
it’s true that currently you cannot change the water type (was: salinity)
of a dive downloaded from a computer, you can only use the value provided
by the computer. This is a) because nobody has implemented a user interface
to change it and b) (more importantly) because the water type is not so
much about how salty the water tasted but how to convert ambient pressure
(which is what the dive computer actually measures) to depths and back. But
what the computer reports is depth and for the calculations (like SAC and
the deco stuff) we again need the ambient pressure. So this is off if the
dive computer and Subsurface do not agree on the conversion factor. So even
if you were diving is sea water and your dive computer was set to fresh
water (or missing that setting not set at all) it would still be better to
log this as fresh water in Subsurface (to get the conversions right) than
to manually set that to salt water (or we would have to correct the depths
accordingly).
Best
Robert
Salvador Cuñat
2018-04-14 12:55:28 UTC
Permalink
Good afternoon.
Post by tormento
A way to fix salinity would be welcome, even hex editing configuration file.
I don't think there is a direct or easy way to change random values on a cloud
stored divelog.

A workaround for it could be (on desktop subsurface):

1.- Sync with cloud.
2.- Save the log to a local .xml or .ssrf file
3.- Edit the values:
a.- manually with your preferred editor
b.- on linux a sed command would do the job
4.- Open the modified file in subsurface
5.- Double or triple check the changes
6.- Select "Save to cloud storage"

This should do the trick. As a bonus you will have a local backup
file which can be useful if anything goes wild in the future.

Best regards.

Salva
tormento
2018-04-15 07:07:23 UTC
Permalink
This post might be inappropriate. Click to display it.
Linus Torvalds
2018-04-15 18:55:21 UTC
Permalink
Post by tormento
Henry's Law is based on (partial) pressures and not depths. I dunno how
diving computer talks to subsurface. If giving depths instead of pressures
it would be a pity.
Almost all dive computers only give depth.

Some give salinity, some don't. And some only give the flag (sweet vs
salt) rather than the salinity value they actually use to calculate
depth.

In other words: do not EVER play games with salinity. You don't know
what it was, and you will get it wrong.

The whole notion of "user should set salinity" is broken garbage. A
dive computer shouldn't even have that setting. Because that setting
cannot possibly matter, because the only thing that matters - and the
only thing the dive computer measures - is actual pressure, and all
you can do with salinity is make a "correction" to the depth
calculation that you can get wrong.

So in my not-so-humble opinion, a dive computer should always just
show depth as "salt water equivalent depth", with no way to screw up,
and no complications. If you dive in a lake, you'll get the depth
wrong by a few percent, but nobody cares since it's not a really
meaningful value anyway, it's just a user-friendly approximation for
the value that matters: pressure.

Giving the users just the absolute ambient water pressure migth be
*technically* the right thing to do, but it's such a user-hostile
datapoint that it's completely wrongheaded. It only moves the
possibility for error into another place (ie the UI during diving, or
the UI during later logging).

So what you should do is:

- set your dive computer to salt water (if it has a setting), and
forget about it. Don't ever touch the setting, all it can do is cause
confusion.

- think of "depth" as "equivalent depth in salt water" and be happy

- mark your lake dives as such in the dive log tags if you care, the
same way you mark boat dives and buddy names.

The sweet-vs-salt water thing has absolutely zero meaning outside of
informing yourself, and has exactly the same relevance as the name of
your dive buddy: nice to know, but not relevant for any other meaning.
Don't give it any relevance that will only confuse you and get things
wrong.

Because anything else is just a disaster waiting to happen. You *will*
get it wrong, and you will only confuse yourself. Trying to correct
things later is just going to make things worse.

Linus

PS. Yes, there are dive computers that don't report depth at all, and
report the actual hydrostatic pressure that their sensor gives. Before
you say "that's what everybody should do", let me just say that (a)
they are a tiny minority and (b) even they aren't consistent (ie is it
absolute pressure, or relative to surface pressure?)

So subsurface logs what the vast majority of dive computers give you:
depth. In fact, we don't even see the pressure, because the conversion
will have been done by libdivecomputer. So as far as we're concerned,
no dive computer gives us pressure, but technically you can get the
water pressure from the Atomic Aquatics Cobatl, from the
Heinrichs-Weicamp OSTC and from the Reefnet Sensus Ultra. (That last
one isn't actually a dive computer, it's just a data logging device.
tormento
2018-04-15 19:59:25 UTC
Permalink
Awesome explanation and great diving computer knowledge, thanks!

I asked as I have interest in physiology and I do my best to know how
things work under the water and inside body.

Your reasons are more than good for the average user.

Il giorno dom 15 apr 2018 alle 20:55 Linus Torvalds <
Post by tormento
Post by tormento
Henry's Law is based on (partial) pressures and not depths. I dunno how
diving computer talks to subsurface. If giving depths instead of
pressures
Post by tormento
it would be a pity.
Almost all dive computers only give depth.
Some give salinity, some don't. And some only give the flag (sweet vs
salt) rather than the salinity value they actually use to calculate
depth.
In other words: do not EVER play games with salinity. You don't know
what it was, and you will get it wrong.
The whole notion of "user should set salinity" is broken garbage. A
dive computer shouldn't even have that setting. Because that setting
cannot possibly matter, because the only thing that matters - and the
only thing the dive computer measures - is actual pressure, and all
you can do with salinity is make a "correction" to the depth
calculation that you can get wrong.
So in my not-so-humble opinion, a dive computer should always just
show depth as "salt water equivalent depth", with no way to screw up,
and no complications. If you dive in a lake, you'll get the depth
wrong by a few percent, but nobody cares since it's not a really
meaningful value anyway, it's just a user-friendly approximation for
the value that matters: pressure.
Giving the users just the absolute ambient water pressure migth be
*technically* the right thing to do, but it's such a user-hostile
datapoint that it's completely wrongheaded. It only moves the
possibility for error into another place (ie the UI during diving, or
the UI during later logging).
- set your dive computer to salt water (if it has a setting), and
forget about it. Don't ever touch the setting, all it can do is cause
confusion.
- think of "depth" as "equivalent depth in salt water" and be happy
- mark your lake dives as such in the dive log tags if you care, the
same way you mark boat dives and buddy names.
The sweet-vs-salt water thing has absolutely zero meaning outside of
informing yourself, and has exactly the same relevance as the name of
your dive buddy: nice to know, but not relevant for any other meaning.
Don't give it any relevance that will only confuse you and get things
wrong.
Because anything else is just a disaster waiting to happen. You *will*
get it wrong, and you will only confuse yourself. Trying to correct
things later is just going to make things worse.
Linus
PS. Yes, there are dive computers that don't report depth at all, and
report the actual hydrostatic pressure that their sensor gives. Before
you say "that's what everybody should do", let me just say that (a)
they are a tiny minority and (b) even they aren't consistent (ie is it
absolute pressure, or relative to surface pressure?)
depth. In fact, we don't even see the pressure, because the conversion
will have been done by libdivecomputer. So as far as we're concerned,
no dive computer gives us pressure, but technically you can get the
water pressure from the Atomic Aquatics Cobatl, from the
Heinrichs-Weicamp OSTC and from the Reefnet Sensus Ultra. (That last
one isn't actually a dive computer, it's just a data logging device.
Loading...