summaryrefslogtreecommitdiffstats
path: root/units.h
diff options
context:
space:
mode:
authorGravatar Willem Ferguson <willemferguson@zoology.up.ac.za>2014-06-03 19:21:41 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-03 17:05:25 -0700
commiteaf6d564874ac838dc4f3cca7a781034ae60ef7f (patch)
treed214c58bdc33f6dbd058afe715de357dd14d4114 /units.h
parent1fec6453a2b7b6dcd34901a4e92dd11aae38879c (diff)
downloadsubsurface-eaf6d564874ac838dc4f3cca7a781034ae60ef7f.tar.gz
CCR code: Change to sample structure
1) All the variables in the sample structures are strongly typed 2) Two additional types were declared in units.h: o2pressure_t bearing_t 3) The following variables were added: diluentpressure o2setpoint o2sensor[3] 4) Changes to a number of files were made to chanf sample->po2 to sample->po2.mbar bearing to bearring.degrees Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'units.h')
-rw-r--r--units.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/units.h b/units.h
index 0a9e44b79..4b32d5237 100644
--- a/units.h
+++ b/units.h
@@ -59,22 +59,32 @@ typedef int64_t timestamp_t;
typedef struct
{
- int seconds;
+ uint32_t seconds; // durations up to 68 yrs
} duration_t;
typedef struct
{
- int mm;
-} depth_t;
+ int32_t mm;
+} depth_t; // depth to 2000 km
typedef struct
{
- int mbar;
+ int32_t mbar; // pressure up to 2000 bar
} pressure_t;
typedef struct
{
- int mkelvin;
+ uint16_t mbar;
+} o2pressure_t; // pressure up to 65 bar
+
+typedef struct
+{
+ int16_t degrees;
+} bearing_t; // compass bearing
+
+typedef struct
+{
+ int32_t mkelvin; // up to 1750 degrees K
} temperature_t;
typedef struct
@@ -242,4 +252,4 @@ struct units {
}
#endif
-#endif \ No newline at end of file
+#endif