summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
authorGravatar Salvador Cuñat <salvador.cunat@gmail.com>2015-07-22 17:02:33 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-30 07:43:16 -0700
commitcfac25626b209ee12201a30524d421d6a49a7b58 (patch)
treefa8557af47a88901d5c56c0730628396978cc722 /dive.h
parent59a18ab000453cdbbe8b6ae621e999ee74abcd4c (diff)
downloadsubsurface-cfac25626b209ee12201a30524d421d6a49a7b58.tar.gz
Add support for RBT reported sample value
RBT (Remaining Bottom Time) is a value calculated on the fly by some air integrated divecomputers, for example Uwatec devices. This value is an estimation based in some heuristic around time function pressure gradients. This way, RBT would be the time a diver can spend at actual depth without running out of gas (taking account of ascent, deco, if required, and rock bottom gas reserve, if set). Older Uwatec devices just made the calculus and only stored alarm events if this time value reached zero, but modern devices store the value each sample, in minutes. It seems that Suunto Eon Steel is storing RBT values too, in seconds. Libdivecomputer has supported RBT for a while, but Subsurface just printed it to stdout and dropped it. This adds support for RBT value on subsurface sample structure and shows it in the profile's info box, right under TTS(calc), if selected, where these two values can be easily compared by humans. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/dive.h b/dive.h
index e61d1e917..69a01125e 100644
--- a/dive.h
+++ b/dive.h
@@ -176,6 +176,7 @@ struct sample // BASE TYPE BYTES UNITS RANGE DE
duration_t stoptime; // uint32_t 4 seconds (0-18 h) time duration of next deco stop
duration_t ndl; // uint32_t 4 seconds (0-18 h) time duration before no-deco limit
duration_t tts; // uint32_t 4 seconds (0-18 h) time duration to reach the surface
+ duration_t rbt; // uint32_t 4 seconds (0-18 h) remaining bottom time
depth_t depth; // int32_t 4 mm (0-2000 km) dive depth of this sample
depth_t stopdepth; // int32_t 4 mm (0-2000 km) depth of next deco stop
temperature_t temperature; // int32_t 4 mdegrK (0-2 MdegK) ambient temperature
@@ -191,7 +192,7 @@ struct sample // BASE TYPE BYTES UNITS RANGE DE
bool in_deco; // bool 1 y/n y/n this sample is part of deco
bool manually_entered; // bool 1 y/n y/n this sample was entered by the user,
// not calculated when planning a dive
-}; // Total size of structure: 53 bytes, excluding padding at end
+}; // Total size of structure: 57 bytes, excluding padding at end
struct divetag {
/*