04-25-2011, 10:36 PM
Can an Air Density Calculator be made with QM?
Like this: http://www.longacreracing.com/instructi ... ?instid=24
Found this below in the source code...
<!-- Hide this script from older browsers
function calc_airdensity() {
var temp , pressure , humidity , altitude , spm ;
spm_calc = 0;
temp = eval(document.airdensity_form.Tf.value);
humidity = eval(document.airdensity_form.Rh.value);
pressure = eval(document.airdensity_form.Bp.value);
altitude = eval(document.airdensity_form.Af.value)
Am = altitude * 12 * 2.54 / 100
Tc = (( temp - 32) * 5/9)
Tk = Tc + 273
Bmb = pressure / (29.92 / 1013)
BSmb = 1013 * Math.exp(-Am / 7000)
BSin = BSmb * (29.92 / 1013)
MSkg = 3.884266*10^((7.5*Tc) / (237.7 + Tc))
Mkg = MSkg * humidity / 100
Tvc = ((1 + 1.609 * Mkg) / (1 + Mkg)) * Tc
Es = 6.11 * 10^(7.5 * Tc / (237.7 + Tc))
E = (humidity * Es) / 100
Tdc = ( -430.22 + 237.7 * Math.log(E) ) / (-Math.log(E) + 19.08)
Tdf = Tdc * 9 / 5 + 32
Baro = Bmb * Math.exp(-Am / 7000)
Dad = (Baro * 100) / (Tk * 287)
Dvad = (Baro * 100) / ((Tvc + 273) * 287)
StdDen = 1.22556
Cd1 = Dad / StdDen * 100
Cd2 = Dvad / StdDen * 100
document.airdensity_form.cor_air_den.value = Cd2;
}
// End hiding script from older browsers -->
</script>
Like this: http://www.longacreracing.com/instructi ... ?instid=24
Found this below in the source code...
<!-- Hide this script from older browsers
function calc_airdensity() {
var temp , pressure , humidity , altitude , spm ;
spm_calc = 0;
temp = eval(document.airdensity_form.Tf.value);
humidity = eval(document.airdensity_form.Rh.value);
pressure = eval(document.airdensity_form.Bp.value);
altitude = eval(document.airdensity_form.Af.value)
Am = altitude * 12 * 2.54 / 100
Tc = (( temp - 32) * 5/9)
Tk = Tc + 273
Bmb = pressure / (29.92 / 1013)
BSmb = 1013 * Math.exp(-Am / 7000)
BSin = BSmb * (29.92 / 1013)
MSkg = 3.884266*10^((7.5*Tc) / (237.7 + Tc))
Mkg = MSkg * humidity / 100
Tvc = ((1 + 1.609 * Mkg) / (1 + Mkg)) * Tc
Es = 6.11 * 10^(7.5 * Tc / (237.7 + Tc))
E = (humidity * Es) / 100
Tdc = ( -430.22 + 237.7 * Math.log(E) ) / (-Math.log(E) + 19.08)
Tdf = Tdc * 9 / 5 + 32
Baro = Bmb * Math.exp(-Am / 7000)
Dad = (Baro * 100) / (Tk * 287)
Dvad = (Baro * 100) / ((Tvc + 273) * 287)
StdDen = 1.22556
Cd1 = Dad / StdDen * 100
Cd2 = Dvad / StdDen * 100
document.airdensity_form.cor_air_den.value = Cd2;
}
// End hiding script from older browsers -->
</script>