summaryrefslogtreecommitdiffstats
path: root/subsurface.bmp
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2013-01-06 23:33:42 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-07 07:33:22 -0800
commit1ee0101b280d582bbdea87ae9ae9c67314ea6fb1 (patch)
tree092bc05d215ab85471b80a2e0b5d788a00954113 /subsurface.bmp
parentd85d8421e08583a8132cc3e0c5dd2b9415a8e091 (diff)
downloadsubsurface-1ee0101b280d582bbdea87ae9ae9c67314ea6fb1.tar.gz
Don't bother with "correct" units for the pressure_time calculation
I fixed the pressure-time calculations to use "proper" units, but thinking about it some more, it turns out that units don't really matter. As long as we use the *same* unit for calculating the integral, and then re-calculating the step-wise entries, the units will cancel out. So we can simplify the "pressure_time()" function a bit, and use whatever units are most natural for our internal representation. So instead of using atm, use "mbar". Now, since the units don't matter, this patch doesn't really make much of a difference conceptually. Sure, it's a slightly simpler function, but maybe using more "natural" units for it would be worth it. But it turns out that using milli-bar and seconds has an advantage: we could do all the pressure_time integral using 32-bit integers, and we'd still be able to represent values that would be equivalent to staying at 24 bar for a whole day. This patch doesn't actually change the code to use integers, but with this unit choice, we at least have that possibility. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface.bmp')
0 files changed, 0 insertions, 0 deletions