Add code to enter SAC rates for dive planning

This just provides the infrastructure to enter the data, nothing is
calculated, yet.

This adds a new get_thousandths() helper function so we can enter
information of the 'mili-' type as decimal values. So things like
"14.5 l/min" or "0.75 cuft/min" are parsed correctly and converted
into a ml value.

In the process of implementing that I also fixed a bug introduced in
commit ab7aecf16e ("Simplify dive planning code") which broke the
get_tenth() function.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-01-15 16:54:59 -08:00
parent 417391a801
commit 189cba7fd2
2 changed files with 94 additions and 8 deletions

4
dive.h
View file

@ -607,7 +607,9 @@ struct divedatapoint {
struct diveplan {
timestamp_t when;
int surface_pressure;
int surface_pressure; /* mbar */
int bottomsac; /* ml/min */
int decosac; /* ml/min */
struct divedatapoint *dp;
};