Changed sg to plato and plato to sg formulas to the ones from Brew by the Numbers.

Thu, 16 Apr 2020 16:08:24 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Thu, 16 Apr 2020 16:08:24 +0200
changeset 652
a5d9ec7e2239
parent 651
6e89cb158153
child 653
aa25efa1d629

Changed sg to plato and plato to sg formulas to the ones from Brew by the Numbers.

www/js/global.js file | annotate | diff | comparison | revisions
--- a/www/js/global.js	Wed Apr 15 20:18:00 2020 +0200
+++ b/www/js/global.js	Thu Apr 16 16:08:24 2020 +0200
@@ -1049,13 +1049,15 @@
 
 
 function sg_to_plato(sg) {
- return ((135.997 * sg - 630.272) * sg + 1111.14) * sg - 616.868;
+// return ((135.997 * sg - 630.272) * sg + 1111.14) * sg - 616.868;
+ return -668.962 + (1262.45 * sg) - (776.43 * sg * sg) + (182.94 * sg * sg * sg);
 }
 
 
 
 function plato_to_sg(plato) {
- return 1 + (plato / (258.6 - ((plato / 258.2) * 227.1)));
+// return 1 + (plato / (258.6 - ((plato / 258.2) * 227.1)));
+ return 1.00001 + (0.0038661 * plato) + (1.3488e-5 * plato * plato) + (4.3074e-8 * plato * plato * plato);
 }
 
 

mercurial