www/js/global.js

changeset 713
8dae8479d5e8
parent 697
367ae7ff52f0
child 717
aad750d942df
--- a/www/js/global.js	Mon Aug 24 10:28:29 2020 +0200
+++ b/www/js/global.js	Tue Aug 25 22:12:06 2020 +0200
@@ -1091,7 +1091,7 @@
  var FGbh = Round(1.0031 - 0.002318474 * OBrix - 0.000007775 * (OBrix * OBrix) - 0.000000034 * Math.pow(OBrix, 3) +
             0.00574 * (FBrix) + 0.00003344 * (FBrix * FBrix) + 0.000000086 * Math.pow(FBrix, 3), 4);
 
- // from http://seanterrill.com   FGoc = old cubix, FGnc = new cubic, FGnl = new linear
+ // from http://seanterrill.com   FGoc = old cubic, FGnc = new cubic, FGnl = new linear
  var OBc = OBrix / my_brix_correction;
  var FBc = FBrix / my_brix_correction;
 
@@ -1107,7 +1107,10 @@
  // New linear, results are pretty much too high and way off for heavy beers.
  var FGnl = Round(1 - 0.000856829 * OBc + 0.00349412 * FBc, 4);
 
- console.log('brix_to_fg(' + Round(OBrix, 2) + ', ' + FBrix + ') FGbh:' + FGbh + ' FGoc:' + FGoc + ' FGnc:' + FGnc + ' FGnl:' + FGnl);
+ // Petr Novotny, Zymurgy July/August 2017. Used by Brewers Friend.
+ var FGbf = Round(1 + 0.006276 * FBc - 0.002349 * OBc, 4);
+
+ console.log('brix_to_fg(' + Round(OBrix, 2) + ', ' + FBrix + ') FGbh:' + FGbh + ' FGoc:' + FGoc + ' FGnc:' + FGnc + ' FGnl:' + FGnl + ' FGbf:' + FGbf);
  return FGnc;
 }
 

mercurial