mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive planning for closed circuit rebreather
This misses a single issue to be used as a base for further discussion: The CC setpoint is used for the next segment, not the one specified for. I also have in mind to modify the existing code to use setpoints specified in mbar and plain integer instead of float values. Signed-off-by: Jan Schubert <Jan.Schubert@GMX.li> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
37282176d5
commit
9df9fc088d
3 changed files with 67 additions and 14 deletions
|
@ -763,7 +763,7 @@ static int calculate_otu(struct dive *dive, struct divecomputer *dc)
|
|||
struct sample *psample = sample - 1;
|
||||
t = sample->time.seconds - psample->time.seconds;
|
||||
if (sample->po2) {
|
||||
po2 = sample->po2;
|
||||
po2 = sample->po2 / 1000;
|
||||
} else {
|
||||
int o2 = active_o2(dive, dc, sample->time);
|
||||
po2 = o2 / 1000.0 * depth_to_mbar(sample->depth.mm, dive) / 1000.0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue