mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Even more places with pressure and volume conversions
Amazing at how many spots we are re-implementing the wheel. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5698057951
commit
485b02937d
5 changed files with 16 additions and 16 deletions
|
@ -223,7 +223,6 @@ static void sac_data_func(GtkTreeViewColumn *col,
|
|||
gpointer data)
|
||||
{
|
||||
int value;
|
||||
const double liters_per_cuft = 28.317;
|
||||
const char *fmt;
|
||||
char buffer[16];
|
||||
double sac;
|
||||
|
@ -242,7 +241,7 @@ static void sac_data_func(GtkTreeViewColumn *col,
|
|||
break;
|
||||
case CUFT:
|
||||
fmt = "%4.2f";
|
||||
sac /= liters_per_cuft;
|
||||
sac = ml_to_cuft(sac * 1000);
|
||||
break;
|
||||
}
|
||||
snprintf(buffer, sizeof(buffer), fmt, sac);
|
||||
|
@ -307,7 +306,7 @@ static double calculate_airuse(struct dive *dive)
|
|||
if (!size)
|
||||
continue;
|
||||
|
||||
kilo_atm = (cyl->start.mbar - cyl->end.mbar) / 1013250.0;
|
||||
kilo_atm = (to_ATM(cyl->start) - to_ATM(cyl->end)) / 1000.0;
|
||||
|
||||
/* Liters of air at 1 atm == milliliters at 1k atm*/
|
||||
airuse += kilo_atm * size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue