Is anyone aware of a good script or library free/Open Source that can be used on a web page to calculate ABV, I'm not looking for a sites that will do the calculation for you, I want to add the javascript to my site to do the calculation.
I wrote a simple javascript but wasn't able to figure out the calculation that factored in temperature from the time it was measured. I was going to post my Javascript and html here but I cant figure out how to post my html so i'll just give the javascript below.
Also if someones know the mathematical equations to get ABV factoring in temperature I could write the JavaScript
function calcAbv() {
var og = document.frm.og.value;
var fg = document.frm.fg.value;
document.frm.oneabv.value = Math.round((og - fg) * 131.25,2);
document.frm.onealtabv.value = Math.round((76.08 * (og - fg) / (1.775 - og)) * (fg / 0.794),2);
document.frm.twoabv.value = Math.round((1.05/0.79) * (( og- fg )/fg) * 100,2);
document.frm.twobasabv.value = Math.round((og - fg) * 131,2);
document.frm.threeabv.value = Math.round(((76.08 * (og - fg) / (1.775 - og)) * (fg / 0.794)),2);
document.frm.threebasoneabv.value = Math.round(((og - fg) / .75) * 100,2);
document.frm.threebastwoabv.value = Math.round((og - fg) * 131,2);
document.frm.fourabv.value = Math.round((og - fg) * 131,2);
}