View Single Post
  #10  
Old 07-19-2012, 08:16 PM
klem's Avatar
klem klem is offline
Approved Member
 
Join Date: Nov 2007
Posts: 1,653
Default

Quote:
Originally Posted by ACE-OF-ACES View Post
I think so.. In that I found and error in your Density Altitude calculation

See the following REVIEW of your Java code.
...............................................
Where:
T_std = T_o - Alt_ind × TLR = Standard Temperature in Kelvin
T_o = ISA Standard Temperature @ SL
TLR = ISA Standard Temperature Lapse Rate
OAT = Outside Temperature in Kelvin[/code]

Now lets review your Java implementation of Williams formulas

Here is the Java code you want to use

Code:
Density_Alt = Pressure_Alt + (T_std/TLR) * (1 - Math.Pow((T_std / Z_AmbientAirTemperature),0.2349690));
OK I get the Constant versus T_std/TLR error, I made the mistake of taking it directly from his example

Quote:
Where:
T_std = 288.15 - Alt_ind × TLR
TLR = 0.0065
OK
Quote:
If you plan on doing any testing above 36Kft than you will want to adjust TLR as follows

Code:
if ( height < tropopause ) then
   TLR = 6.49(°C/1,000m) = 1.98(°C/1,000ft) = 3.56(°F)/1,000ft
else
   TLR = -56.5(°C) = 216.65(°K)
Where:
tropopause starts at 11.0km (36089.24ft) and ends at 20km (65,616.78ft)
I don't but I might build that into the code in case anyone else wants to use it.

Quote:
Also not sure if you can use Z_AmbientAirTemperature directly in that it is not realitve to I_Altitude.. And as you know small temp differences can have a big effect on Density Altitude calculations, so hopefully these are small differences. Might be better of using the ISA Standard Temp formulas adjusted for temp.
The Z_AmbeintAirTemperature appears to be the OAT at the altitude, it decreases with alt at around 0.0021C/ft

Quote:
Hope this helps! S!
It does, thanks. Also learning from Robo that the BCO doesn't work unless I wiggle the throttle.
__________________
klem
56 Squadron RAF "Firebirds"
http://firebirds.2ndtaf.org.uk/



ASUS Sabertooth X58 /i7 950 @ 4GHz / 6Gb DDR3 1600 CAS8 / EVGA GTX570 GPU 1.28Gb superclocked / Crucial 128Gb SSD SATA III 6Gb/s, 355Mb-215Mb Read-Write / 850W PSU
Windows 7 64 bit Home Premium / Samsung 22" 226BW @ 1680 x 1050 / TrackIR4 with TrackIR5 software / Saitek X52 Pro & Rudders
Reply With Quote