Changeset 6d548d2 in subsurface for dives


Ignore:
Timestamp:
Feb 24, 2013, 11:09:52 AM (5 years ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
Gtk, Mtest, Qt, addDiveGasFix, android_test, dcDownload, for-master, foratdotde, gitMerge, gitdebug, gitpictures, glib-removal-hack, ios, master, mergeKirigamiPort, pictimeshift, resolutionIndependence, spinner, test, testForTomaz, testTomaz, testing, v4.0-branch, v4.0.3-branch, v4.2-branch, v4.4-branch, v4.5-branch
Children:
b62e636
Parents:
f4bf16d
git-author:
Linus Torvalds <torvalds@…> (02/24/13 10:50:18)
git-committer:
Dirk Hohndel <dirk@…> (02/24/13 11:09:52)
Message:

Correctly calculate SAC rate in the presense of surface events

This assumes that you are not breathing your cylinders while at the
surface, which may or may not be correct, but is usually the right
thing. Regardless, we're better off giving a conservative (higher) SAC
rate estimate for a diver that breathes his cylinder at the surface too
than giving an artificially low one because the diver ended up using his
snorkel and we didn't take that into account.

NOTE! This basically calculates a better duration and average depth than
the ones we end up showing in the dive list. Maybe we should actually
show this "no-surface-time" duration and average depth instead of the
ones we do show?

That's a separate question, though.

Added a test-case for the surface case to the sac-test.xml dives.

Signed-off-by: Linus Torvalds <torvalds@…>
Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dives/sac-test.xml

    rf4bf16d r6d548d2  
    4747  </divecomputer>
    4848</dive>
     49<dive number='4' date='2013-02-24' time='12:26:04' duration='25:00 min'>
     50  <location>SAC test dive 3</location>
     51  <notes>SAC should be 20l/min (0.7063 cuft/min)
     52This adds a 5-minute surface time to the middle of the dive.
     53We have exactly 100 ATM of gas in 15l of cylinder, average 20m for 25min</notes>
     54  <cylinder size='10 l' description='10l' start='202.6 bar' end='101.3 bar' />
     55  <cylinder size='5 l' description='10l' start='202.6 bar' end='101.3 bar' />
     56  <divecomputer>
     57  <event time='22:00 min' name='gaschange' />
     58  <depth max='20.0 m' mean='10.0 m' />
     59  <sample time='0:00 min' depth='0.0 m' />
     60  <sample time='5:00 min' depth='20.0 m' />
     61  <sample time='10:00 min' depth='40.0 m' />
     62  <sample time='15:00 min' depth='0.0 m' />
     63  <sample time='20:00 min' depth='0.0 m' />
     64  <sample time='25:00 min' depth='40.0 m' />
     65  <sample time='30:00 min' depth='0.0 m' />
     66  </divecomputer>
     67</dive>
    4968</dives>
    5069</divelog>
Note: See TracChangeset for help on using the changeset viewer.