]> git.tdb.fi Git - ext/subsurface.git/blobdiff - dive.h
Start "output unit management" support
[ext/subsurface.git] / dive.h
diff --git a/dive.h b/dive.h
index 82b336e5356cadaaf447060ec1d7c51d756e3956..ea8fceec1863dc41479d448912998f9a4156a642 100644 (file)
--- a/dive.h
+++ b/dive.h
@@ -126,6 +126,22 @@ struct dive {
        struct sample sample[];
 };
 
+/*
+ * We keep our internal data in well-specified units, but
+ * the input and output may come in some random format. This
+ * keeps track of those units.
+ */
+struct units {
+       enum { METERS, FEET } length;
+       enum { LITER, CUFT } volume;
+       enum { BAR, PSI, PASCAL } pressure;
+       enum { CELSIUS, FAHRENHEIT, KELVIN } temperature;
+       enum { KG, LBS } weight;
+};
+
+extern const struct units SI_units, IMPERIAL_units;
+extern struct units input_units, output_units;
+
 extern int verbose;
 
 struct dive_table {