summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/dive.h b/dive.h
index d113e27f4..7927512b7 100644
--- a/dive.h
+++ b/dive.h
@@ -392,9 +392,32 @@ struct units {
enum { KG, LBS } weight;
};
+/*
+ * We're going to default to SI units for input. Yes,
+ * technically the SI unit for pressure is Pascal, but
+ * we default to bar (10^5 pascal), which people
+ * actually use. Similarly, C instead of Kelvin.
+ * And kg instead of g.
+ */
+#define SI_UNITS { \
+ .length = METERS, \
+ .volume = LITER, \
+ .pressure = BAR, \
+ .temperature = CELSIUS, \
+ .weight = KG \
+}
+
+#define IMPERIAL_UNITS { \
+ .length = FEET, \
+ .volume = CUFT, \
+ .pressure = PSI, \
+ .temperature = FAHRENHEIT, \
+ .weight = LBS \
+}
extern const struct units SI_units, IMPERIAL_units;
-extern struct units input_units, output_units;
+extern struct units input_units;
+extern struct units *get_output_units(void);
extern int verbose;
struct dive_table {