aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatar Tim Segers <tsegers@pm.me>2023-01-04 14:29:05 +0100
committerGravatar Tim Segers <tsegers@pm.me>2023-01-07 15:24:51 +0100
commitde20bd3bfddb44f8259b9a708db2700517ff498a (patch)
tree71c46330e26c89ae3e10b64f0d688c6703c22e7c
parentc2ee99e9a2c34cafdacf7b24a9b413ed5846214c (diff)
downloadopendeco-de20bd3bfddb44f8259b9a708db2700517ff498a.tar.gz
Clarify that Imperial mode only affects depth units
References: https://todo.sr.ht/~tsegers/opendeco/1
-rw-r--r--README.md21
-rw-r--r--src/opendeco-cli.c40
2 files changed, 33 insertions, 28 deletions
diff --git a/README.md b/README.md
index 9a1864b..e350604 100644
--- a/README.md
+++ b/README.md
@@ -7,17 +7,20 @@ Usage: opendeco [OPTION...]
Implementation of Buhlmann ZH-L16 with Gradient Factors:
Dive options:
- -d, --depth=NUMBER Set the depth of the dive in meters
+ -d, --depth=NUMBER Set the depth of the dive in meters (or feet in
+ imperial mode)
-t, --time=NUMBER Set the time of the dive in minutes
-g, --gas=STRING Set the bottom gas used during the dive, defaults
to Air
- -p, --pressure=NUMBER Set the surface air pressure, defaults to
- 1.01325bar or 1atm
+ -p, --pressure=NUMBER Set the surface air pressure in bar, defaults to
+ 1.01325bar
- -r, --rmv=NUMBER Set the RMV during the dive portion of the dive,
- defaults to 20
+ -r, --rmv=NUMBER Set the RMV during the dive portion of the dive in
+ l/min, defaults to 20
+
+ -i, --imperial Use imperial depth units (fsw)
Deco options:
-L, --gflow=NUMBER Set the gradient factor at the first stop,
@@ -30,14 +33,16 @@ Implementation of Buhlmann ZH-L16 with Gradient Factors:
-S Only switch gas at deco stops
- -6 Perform last deco stop at 6m
+ -6 Perform last deco stop at 6m (or 20ft in imperial
+ mode)
- -R, --decormv=NUMBER Set the RMV during the deco portion of the dive,
- defaults to 15
+ -R, --decormv=NUMBER Set the RMV during the deco portion of the dive in
+ l/min, defaults to 15
-T, --showtravel Show travel segments in deco plan
Informational options:
+ --licenses Show third-party licenses
-?, --help Give this help list
--usage Give a short usage message
diff --git a/src/opendeco-cli.c b/src/opendeco-cli.c
index d8da388..42e3398 100644
--- a/src/opendeco-cli.c
+++ b/src/opendeco-cli.c
@@ -20,26 +20,26 @@ const char *argp_program_bug_address = "<~tsegers/opendeco@lists.sr.ht> or https
const char *argp_program_version = "opendeco " VERSION;
static struct argp_option options[] = {
- {0, 0, 0, 0, "Dive options:", 0 },
- {"depth", 'd', "NUMBER", 0, "Set the depth of the dive in meters", 0 },
- {"time", 't', "NUMBER", 0, "Set the time of the dive in minutes", 1 },
- {"gas", 'g', "STRING", 0, "Set the bottom gas used during the dive, defaults to Air", 2 },
- {"pressure", 'p', "NUMBER", 0, "Set the surface air pressure, defaults to 1.01325bar or 1atm", 3 },
- {"rmv", 'r', "NUMBER", 0, "Set the RMV during the dive portion of the dive, defaults to 20", 4 },
- {"imperial", 'i', 0, 0, "Use imperial units (fsw)", 5 },
-
- {0, 0, 0, 0, "Deco options:", 0 },
- {"gflow", 'L', "NUMBER", 0, "Set the gradient factor at the first stop, defaults to 30", 5 },
- {"gfhigh", 'H', "NUMBER", 0, "Set the gradient factor at the surface, defaults to 75", 6 },
- {"decogasses", 'G', "LIST", 0, "Set the gasses available for deco", 7 },
- {0, 'S', 0, OPTION_ARG_OPTIONAL, "Only switch gas at deco stops", 8 },
- {0, '6', 0, OPTION_ARG_OPTIONAL, "Perform last deco stop at 6m", 9 },
- {"decormv", 'R', "NUMBER", 0, "Set the RMV during the deco portion of the dive, defaults to 15", 10},
- {"showtravel", 'T', 0, 0, "Show travel segments in deco plan", 11},
-
- {0, 0, 0, 0, "Informational options:", 0 },
- {"licenses", -1, 0, 0, "Show third-party licenses", 0 },
- {0, 0, 0, 0, 0, 0 }
+ {0, 0, 0, 0, "Dive options:", 0 },
+ {"depth", 'd', "NUMBER", 0, "Set the depth of the dive in meters (or feet in imperial mode)", 0 },
+ {"time", 't', "NUMBER", 0, "Set the time of the dive in minutes", 1 },
+ {"gas", 'g', "STRING", 0, "Set the bottom gas used during the dive, defaults to Air", 2 },
+ {"pressure", 'p', "NUMBER", 0, "Set the surface air pressure in bar, defaults to 1.01325bar", 3 },
+ {"rmv", 'r', "NUMBER", 0, "Set the RMV during the dive portion of the dive in l/min, defaults to 20", 4 },
+ {"imperial", 'i', 0, 0, "Use imperial depth units (fsw)", 5 },
+
+ {0, 0, 0, 0, "Deco options:", 0 },
+ {"gflow", 'L', "NUMBER", 0, "Set the gradient factor at the first stop, defaults to 30", 6 },
+ {"gfhigh", 'H', "NUMBER", 0, "Set the gradient factor at the surface, defaults to 75", 7 },
+ {"decogasses", 'G', "LIST", 0, "Set the gasses available for deco", 8 },
+ {0, 'S', 0, OPTION_ARG_OPTIONAL, "Only switch gas at deco stops", 9 },
+ {0, '6', 0, OPTION_ARG_OPTIONAL, "Perform last deco stop at 6m (or 20ft in imperial mode)", 10},
+ {"decormv", 'R', "NUMBER", 0, "Set the RMV during the deco portion of the dive in l/min, defaults to 15", 11},
+ {"showtravel", 'T', 0, 0, "Show travel segments in deco plan", 12},
+
+ {0, 0, 0, 0, "Informational options:", 0 },
+ {"licenses", -1, 0, 0, "Show third-party licenses", 0 },
+ {0, 0, 0, 0, 0, 0 }
};
static void print_xxd_arr(char *name, unsigned char *content, unsigned int len)