summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
authorGravatar willem ferguson <willemferguson@zoology.up.ac.za>2014-10-12 20:46:41 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-10-12 15:23:49 -0400
commitbc9df4652ffe0cc9d6f579bfd66a4857be57d3b2 (patch)
treeea89826fbdda45b4d44aab07d83481dbf34633cb /dive.h
parent6d65e45787cd29c60153d9db0745cdc7bd088f1d (diff)
downloadsubsurface-bc9df4652ffe0cc9d6f579bfd66a4857be57d3b2.tar.gz
CCR patch: Calculate the correct partial gas pressures for CCR dives
This patch adds code to the function fillpressures() in dive.c to allow calculating o2 pressures, based on the data from the po2 sensors in the system. The following changes were made: 1) add code to perform po2 calculations for CCR with 1, 2 or 3 oxygen sesnors. 2) Add four fields to the gas_pressures structure in dive.h. This allows communication of data between the function that calls get_pressures() and the return of partail pressure values to the calling function. 3) Delete the fields for setpoint and gas partial pressures from the structure plot_info. All partial pressures (from instruments as well as calculated) now reside in the pressures structure that forms part of plot_info. 4) Perform changes in several parts of profile.c to make use of the pressures structure in plot_info. [Dirk Hohndel: yet again massive whitespace cleanup] Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/dive.h b/dive.h
index 68421fec1..af5049fab 100644
--- a/dive.h
+++ b/dive.h
@@ -135,6 +135,8 @@ static inline int get_he(const struct gasmix *mix)
struct gas_pressures {
double o2, n2, he;
+ double sensor[3];
+ double setpoint;
};
extern void sanitize_gasmix(struct gasmix *mix);