Rounding of figures

33 views
Skip to first unread message

Mark Davies

unread,
Oct 18, 2021, 5:59:08 PM10/18/21
to Subsurface Divelog
Evening,

I am currently using diving log 6, im considering switching to subsurface.

Diving log 6 annoys the hell of out me as it rounds time to the minute, a dive of 26 mins 55 seconds is rounded to 26 minutes. There is also discrepancies with DL6 on average depth v my suunto software

How does SS calculate sac and average depth., does it round figures or use time to the second?

Also how does it calculate average depth

Thanks

Robert C. Helling

unread,
Oct 19, 2021, 5:29:23 AM10/19/21
to Subsurface Divelog
Mark,

regarding the display of dive times: It's comlicated. If you want to look at the code: https://github.com/subsurface/subsurface/blob/540e4437d52814f95f58db9bbdaf2ff3d22643bc/core/qthelper.cpp#L933

For free dives, it shows minutes and seconds. For scuba dives, it rounds to full minutes (but it rounds correctly) and you can configure if you prefer to display a dive as 1:07 or as 67min. This is partly to declutter the display but also because the "dive time" is really quite ill defined: When exactly does a dive start? The moment you enter the water? The moment your dive computer gets wet? The first moment your computer measures more than 1m or 4ft of depth? All that taking into account that the depth measurements probably only have a precision at the order of 10-20cm or even 1ft. Similarly at the end of the dive. So we don't show a precision of seconds where that is actually an illusion. What we do though (and that can lead to different dive times as those recorded by the dive computer) is subtract extended times at the surface during the dive (like they happen for example when teaching).

For average depth we try to do the correct thing (and again neglect times at the surface).

To calculate SAC, we take into account the fact that the gas you are breathing is not an ideal gas but has varying compressibility at different cylinder pressures. This actually makes quite a difference (in particular compared to a naive calculation taking only into account the average depth and the initial and final cylinder pressures).

All rounding is done only at the final display stage. In internal calculations, all times are in seconds, depths in mm and pressures in mbar. This way, there is no accumulation of rounding errors.

I don't know if this is what you want but this is what we came up with after giving it quite some thought.

Best
Robert

PS: Please do not abbreviate Subsurface with two S's.

Mark Davies

unread,
Oct 19, 2021, 5:59:40 AM10/19/21
to Subsurface Divelog
Thanks for the comprehensive reply, im going to give Subsurface a go

Appreciate the time taken for support
Reply all
Reply to author
Forward
0 new messages