Q regarding sampling time

Please register or login

Welcome to ScubaBoard, the world's largest scuba diving community. Registration is not required to read the forums, but we encourage you to join. Joining has its benefits and enables you to participate in the discussions.

Benefits of registering include

  • Ability to post and comment on topics and discussions.
  • A Free photo gallery to share your dive photos with the world.
  • You can make this box go away

Joining is quick and easy. Log in or Register now!

Blackwood

Contributor
Messages
5,535
Reaction score
334
Location
Southern California
# of dives
None - Not Certified
Do computers record average depth over the sample period, maximum depth over the sample period or actual depth at the start of the cycle?

I imagine it's the third, but average depth would seem to be a better way of doing it.
 
Sampling time is actually a misnomer. The sampling rate used by the dive computer for measuring depth and calculating N2 and O2 loading isn't affected by any user setting. The frequency with which data is logged does change.

On most computers the actual rate of measuring depth (or at least updating the depth display) seems to be 1 or 2 times per second, independent of the "sample time" or "sample rate" setting. You can see this by watching how fast the depth display is updated while ascending or descending.

On my Pelagic/Oceanic the logged data appears to be the instantaneous reading of depth, with the logged ascent rate being the max ascent rate since the last sample.
 
But isn't the log what it uses to do gas loading computations?
 
Different logs, I would think.

There's probably a "current dive" log in the computer that is used for gas loading calculations and then a "downloadable log" that gets written to every x seconds based on your preferences.
 
Blackwood:
But isn't the log what it uses to do gas loading computations?
Only in the desktop software that you use to review your dive. That's why sometimes there are small descrepancies between what you noted during the dive for NDL and what the PC-based program shows for NDL at that same point in the dive.

Think of it this way. Your computer repeatedly measures depth. It uses those depths to calculate N2 and O2 loading (actually, I think that the computer that I have only updates the faster tissues with each 2-per-second sample, and only does the slow tissues every couple of seconds).

Every once in a while, depending upon what you have set for the "sample rate" on the datalog, it store off a bunch of data. This is an independent action, pretty much separate from the operational side of the computer.

------------------
As strange as it may seem at first, the computer doesn't have to keep a history of the dive in order to have a complete picture of the loading of all compartments. That's probably why it's a bit confusing to you.


I haven't had any contact with the software side of dive computer companies, but there are some pretty standard ways of doing realtime exponential functions like in the neo-Haldanian algorithm. They don't require one to keep a log of the previous data. Nor do they require anything other than simple addition and subtraction.

At each update point, you just compare the compartment loading depth/pressure with current inspired N2 pressure and add or subtract a small fraction of the difference between the two. For example, once every second you compare this running average to the current N2 pressure. Make a new average = 255/256 of the old average + 1/256 of the current N2 pressure. Repeat each second. Or use the equivalent computation of NewAverage = OldAverage + 1/256 of (Current N2 - OldAverage). Repeat ad infinitum, with the "NewAverage" becoming the OldAverage for the next caculation.

The "average" will be the compartment loading of a certain time constant or halflife. The smaller the fraction of new info in each calculation, the longer the effective time constant / half life. (leaving it as an exercise for the reader to figure out what the actual halflife will be --- in this case it would be just a few minutes).

Charlie Allen

p.s. You can see another recursive calculation trick along this line in most scientific calculators. The normal way of writing the formula for standard deviation would make you think that you'd have to store every number in a series to calculate it's standard deviation. But you can rejigger the equation so that you just keep the running totals of "sum of squares" and "square of sums" instead of each datapoint. That's why calculators don't have any limit on the number of points in the statistical mode.
 
Charlie99:
Only in the desktop software that you use to review your dive. That's why sometimes there are small descrepancies between what you noted during the dive for NDL and what the PC-based program shows for NDL at that same point in the dive.....

Excellent post - thanks.
 
Charlie

Interesting... thanks. That makes sense. I suppose they can save space that way.
 

Back
Top Bottom