interpolating depth values

Linus Torvalds torvalds at linux-foundation.org
Mon Sep 25 12:47:19 PDT 2017


On Mon, Sep 25, 2017 at 12:11 PM, Jef Driesen <jef at libdivecomputer.org> wrote:
>
> The dive computers that produce negative depths are the ones that store the
> depth as absolute pressure (e.g. reefnet and uwatec/scubapro). In order to
> convert to a depth value in meters, you subtract the atmospheric pressure,
> which is also recorded with the same sensor. Now, for a common pressure
> sensor like the Intersema MS5541C (which is used by many dive computers),
> the accuracy is -50 to 20 mbar.

Looking at the data sheet, it would seem that that's the absolute
error, but relative errors at lower pressures (ie closer to the
surface) should be much lower.

But yes, even a -10 .. +10 mbar error gives a 0.2m error for the worst-case.

> Near the surface you subtract two nearly identical values, each with some
> error margin. The result will be close to zero, but not exactly. You end up
> with errors in both positive and negative direction with an order of
> magnitude of the accuracy of the sensor. So there is nothing special about
> those small negative values.

Right. Just the normal error bars.

> I assume most dive computers measure the atmospheric pressure by
> continuously sampling their pressure sensor while in surface mode (probably
> at a much lower frequency to save battery power).

At least some of them shut off entirely after some time, and take a
noticeable amount of time to wake up from the water contacts.

So I wouldn't depend on continuous sampling, and they probably just
default to 1atm surface pressure if they get woken up under water.

Of course, you should hopefully have woken up your dive computer
before the dive just to verify that it's working, and not just jump in
with a dive computer that has been turned off for days (or months)/

                  Linus


More information about the subsurface mailing list