www/includes/formulas.php

changeset 328
019736440468
parent 243
b43214d218c0
child 392
544d7d0183b2
--- a/www/includes/formulas.php	Sun Mar 10 21:07:11 2019 +0100
+++ b/www/includes/formulas.php	Mon Mar 11 16:22:01 2019 +0100
@@ -173,9 +173,11 @@
 
 
 function abvol($og, $fg) {
-	if ((4.749804 - $fg) <> 0)
-		return 486.8693 * ($og - $fg) / (4.749804 - $fg);
-	return 0;
+	$factor = $og * 3157 * pow(10, -5) + 9.716 * pow(10, -2);
+	return ($og * 1000 - $fg * 1000) * $factor;
+	//if ((4.749804 - $fg) <> 0)
+	//	return 486.8693 * ($og - $fg) / (4.749804 - $fg);
+	//return 0;
 }
 
 

mercurial