[PATCH] Correctly determine pre-saturation

Robert Helling helling at atdotde.de
Wed Jun 8 13:00:26 PDT 2016


As pointed out in the user forum, we did not properly take into account tissue saturation from previous dives. Turns out, there were two problems:

When determining which dives to consider, we went back in the dive list to the first dive in the past of the presently considered dive and then further back in time until there was a 48h break. Then we added the saturation from there on. In the case of a planned dive (which at the planning stage has number -1), this added also dives in the future of the to be planned dive. Plus a very long desaturation.

Second, when adding the dive, it then added the surface interval from before that dive (rather than the other way around).

Please people (Rick?), could you have a look at the code and check if this makes sense. It does so at least in my test case.

Best
Robert

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Fix-logic-for-presaturation.txt
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20160608/da255d6a/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20160608/da255d6a/attachment.sig>


More information about the subsurface mailing list