![]() |
|
|||||||
| FM/DM threads Everything about FM/DM in CoD |
|
|
Thread Tools | Display Modes |
|
#17
|
||||
|
||||
|
Quote:
//calculate TrueAirspeeds and MACH //Pressure Altitude P_alt=Ind_Alt+145442.2*(1- (alt_set/1013.25)^0.190261) Pressure_Alt = I_Altitude+145442.2*(1- Math.Pow((C_AltimeterPinion/1013.25),0.190261)); //Density altitude (D_Alt) = P_Alt +(StdTemp0/.0019812)*(1-(StdTemp0/OAT)^0.2349690) ; = P_Alt +(273.15/.0019812)*(1-(273.15/OAT)^0.2349690) Density_Alt = Pressure_Alt + 137870.9872804361 * (1 - Math.Pow((273.15 / Z_AmbientAirTemperature),0.2349690)); //TrueAirspeed_mph = CS/(1-6.8755856*10^-6 * ''DA'')^2.12794 (NB assume IAS = CS) TrueAirspeed_mph = I_VelocityIAS / Math.Pow((1 - 6.8755856 * Math.Pow(10, -6) * Density_Alt), 2.12794); TrueAirspeed_kph = TrueAirspeed_mph / 0.621371192; TrueAirspeed_kt = TrueAirspeed_mph / 0.868976242; //Mach Number (M) = TAS/CS; CS = sound speed= 38.967854*sqrt(T+273.15) where T is the OAT in celsius; TAS is true airspeed in knots. MACH = TrueAirspeed_kt / (38.967854 * Math.Sqrt(Z_AmbientAirTemperature + 273.15)); There is no CoD C# parameter for Pressure to set the Altimeter by so I have to measure it and/or set it by reference to True Height. I am assuming 'True Height' is from Mean Sea Level. Can't think what else it would be. I set the Altimeter to read as near as possible to True Height when on the runway so I won't hit the sea on low level tests and I'll have near-correct Altitude reading on he Altimeter. Having said that, at a setting of 992mb its about 4 feet out at sea level but its about 2,000 feet out at 20,000 ft. something wrong somewhere. I don't thionk it matters at the moment as he performance is so far off but I'll include some mB vs Altitude error checks after the next patch. EDIT: Did some tests. Max Alt setting available is 1045mB. At True Height 20,000 ft, Alt reading ~19,900. Closest I could get. Alt setting 1045mB at TH 15,000ft, Alt reading ~15,500. Alt setting for correct TH reading 1027mB Alt setting 1027mB at TH 10,000ft, Alt reading ~10,500. Alt setting for correct TH reading 1007mB Alt setting 1007mB at TH 5,000ft, Alt reading ~5,800. Alt setting for correct TH reading 998mB Am I missing something?
__________________
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 Last edited by klem; 07-11-2012 at 09:53 AM. |
|
|