|
FM/DM threads Everything about FM/DM in CoD |
|
Thread Tools | Display Modes |
#41
|
||||
|
||||
Just got home and thought I would do a quick ROC TTC test..
In this test I set the Altimeter_set to 1025mB.. And note in the TTC you can see the I_Altitude changes (red) as I change mB. Anyway, not a formal test, so don't draw any conclusions from these results.
__________________
Theres a reason for instrumenting a plane for test..
That being a pilots's 'perception' of what is going on can be very different from what is 'actually' going on. Last edited by ACE-OF-ACES; 07-20-2012 at 05:16 AM. |
#42
|
||||
|
||||
Quote:
Rethinking what I said about: if ( 15 - Pressure_Alt_ft*0.0019812 < -56.5) <--- determines the Tropopause altitude { TropAlt = PressureAlt - 56.5/0.0019812 <--- calculates altitude element above Tropopause TempStd = 288.15 - 56.5; Density_Alt_ft = Pressure_Alt_ft + (TempStd/0.0019812 + TropAlt) * (1 - Math.Pow((TempStd / I_AmbientAirTemperature),0.2349690)); else TempLapse= Pressure_Alt_ft*0.0019812; TempStd = 288.15 - Templapse; Density_Alt_ft = Pressure_Alt_ft + (TempStd/0.0019812) * (1 - Math.Pow((TempStd / I_AmbientAirTemperature),0.2349690)); } TempStd = 288.15 - TempLapse; Density_Alt_ft = Pressure_Alt_ft + (TempStd/0.0019812) * (1 - Math.Pow((TempStd / I_AmbientAirTemperature),0.2349690)); I'm not sure about the part: Density_Alt_ft = Pressure_Alt_ft + (TempStd/0.0019812 + TropAlt) * (1 - Math.Pow((TempStd / I_AmbientAirTemperature),0.2349690)); TempStd/0.0019812 is the correction of Pressure_Alt_ft within the Troposphere, beyond which there is no/negligible further Temperature Lapse so no correction seems to be required for that so I think the original formula applies, just Density_Alt_ft = Pressure_Alt_ft + (TempStd/0.0019812) * (1 - Math.Pow((TempStd / I_AmbientAirTemperature),0.2349690)); EDIT 2: OK, regarding I_AmbientAirTemp, as you say it is only present where the gauge is fitted and it isn't in the Spitfire or Hurricane and returns zero. so, how about this to get I_AmbientAirTemperature ? if (I_Altitude / Z_AltitudeMSL_m > 2.5) //is I_Altitude in feet? { Z_TempLapse = (Z_AmbientAirTemp - 288.15) / Z_AltitudeMSL_ft; else Z_TempLapse = (Z_AmbientAirTemp - 288.15) / Z_AltitudeMSL_m; } I_AmbientAirTemperature = I_Altitude * Z_TempLapse; Also, what are you using to create your charts? I tried plotting the Y axis as Altitude (as is often done for these tests) but Excel threw a wobbly when the Level Speeds or ROC reversed with altitude. PS Further apologies to Felipe for turning his Spitfire thread into a general "Aircraft Performance Measurement" thread but I think it is just about On Topic
__________________
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-20-2012 at 09:49 AM. Reason: Woke Up! |
#43
|
||||
|
||||
Hey klem
Im at work right now.. But Ill take a look at your Java code when I get home tonight.. I don't want to rush it and make a silly mistake like I did with T_slr vs TLR As for the units, The variables that start with 'I_' as in indicated as in the cockpit guages will change betwen IMPERIAL and SI units depending on the country of origin. For example, when test the Spit the I_Altitude will display 'feet' but when testing the 109 it will display 'meters'. Where as the 'Z_' values are allways in SI units. As for what I use to graph, I use matlab. As for excel, you can flip the axis, simply right-mouse-click on the graph and select 'Source Data' at which point it will display the data for the X and Y axis.. You just have to flip the X and Y sources.. You can type it in, which can be messy, or cut-in-paste swap, or simply click on the button and drag-n-drop the columns of data.. Which can be messy if you have alot of data. See attached for excel examples
__________________
Theres a reason for instrumenting a plane for test..
That being a pilots's 'perception' of what is going on can be very different from what is 'actually' going on. Last edited by ACE-OF-ACES; 07-20-2012 at 05:03 PM. |
#44
|
||||
|
||||
Hey klem..
Have not had a chance to work on it yet, got home friday night and the girl friend had 'other ideas' as to how I was going to spend my time this weekend! I am hoping to get some time tonight to work on it! S!
__________________
Theres a reason for instrumenting a plane for test..
That being a pilots's 'perception' of what is going on can be very different from what is 'actually' going on. |
#45
|
||||
|
||||
Hey klem
Sorry this reply took so long.. I have been busy with some of my own stuff.. On that note I still have not writen the C# code for you yet, but wanted to share with you my matlab code, i.e. Code:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % ISA Standard Alt_Tropopause_m = 11000.0; % ISA Altitude of Tropopause in meters Tmp_Tropopause_K = 216.65; % ISA Temperature of Tropopause in Kelvin To_K = 288.15; % ISA Temperature @ SL in Kelvin [288.15(°K) = 15(°C) = 59(°F)] Po_mB = 1013.25; % ISA Pressure @ SL in millibar [1013.250(mB) = 29.92126("Hg) = 101325.0(Pa) = 2116.2166(lbs/ft^2) = 760.0(mmHg) = 14.69595(psi) = 1.0(atm)] Po_Hg = 29.92126; % ISA Pressure @ SL in inch of mercury [1013.250(mB) = 29.92126("Hg) = 101325.0(Pa) = 2116.2166(lbs/ft^2) = 760.0(mmHg) = 14.69595(psi) = 1.0(atm)] TLR_Cpm = 0.0019812; % ISA Temperature Lapse Rate in Celsius/meter [6.5(°C)/1,000(m) = 1.9812(°C)/1,000(ft)] TLR_Kpm = 0.0019812; % ISA Temperature Lapse Rate in Celsius/meter [6.5(°K)/1,000(m) = 1.9812(°K)/1,000(ft)] PLR_ftpHg = 1000; % ISA Pressure Lapse Rate in feet/inch of mercury [1,000ft/"Hg] % Where % 29.92000 "Hg = 1013.207489 millibar % 29.92126 "Hg = 1013.250158 millibar if (units_si == 1) To = To_K; Po = Po_mB; PLR = 1; TLR = TLR_Cpm; else Po = Po_Hg; To = To_K; PLR = PLR_ftpHg; TLR = TLR_Cpm; end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % STEP 1) Find the PRESSURE DIFFERENCE % % Pdif = Po - Altimeter_Set Pdif = Po - Altimeter_Set; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % STEP 2) Find the ALTITUDE CORRECTION due to the PRESSURE DIFFERENCE @ SL % % Alt_pcorr = (To/TLR) × [1 - (Altimeter_Set/Po)^0.190261] % % Or you can use the following simple approximation % % Alt_pcorr = Pdif × PLR % % Where: % Altimeter_Set = Is the altimeter set/offset (CoD: Altimeter Pinion) Alt_pcorr = (To./TLR) .* (1 - power((Altimeter_Set./Po),0.190261)); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % STEP 3) Find the PRESSURE ALTITUDE due to the ALTITUDE CORRECTION % % Alt_pressure = Alt_ind + Alt_pcorr % % Where: % Alt_ind = The Indicated Altitude % To/TLR = 44330.77(m) = 145442.15(ft) Alt_pressure = Alt_indicated + Alt_pcorr; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % STEP 4) Find STANDARD TEMPERATURE due to the TEMPERATURE DIFFERENCE @ SL % % Tstd = To - TLR × Alt_pressure % % Tstd = 15(°C) - 0.0019812(°C/ft) × 8,000(ft) % Tstd = 15(°C) - 15.8496(°C) % Tstd = -0.8496(°C) = 272.30(°K) % % or in Kelvin % % Tstd = 288.15(°K) - 0.0019812(°K/ft) × 8,000(ft) % Tstd = 288.15(°K) - 15.8496(°C) % Tstd = 272.30(°K) Tstd = To - TLR .* Alt_pressure; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % STEP 5) Find DENSITY ALTITUDE % % NOTE: TLR, Tstd, and OAT must be in units of Kelvin for this formula to work!! % % Alt_denisty = Alt_pressure + (Tstd/TLR) × [1 - (Tstd/OAT)^0.2349690] Alt_density = Alt_pressure + (Tstd. / TLR) .* (1 - power((Tstd ./ Temp_indicated),0.2349690)); Code:
cat = dog + 100; Code:
for (ii=0; ii<dog.Lenght-1;ii++) { cat(ii) = dog(ii) + 100; } Code:
cat = dog .* 100; cat = dog ./ 100; Feel free to contact me if you have any questions PS still debating on wether we can use the ingame temp, or not, ill keep you posted
__________________
Theres a reason for instrumenting a plane for test..
That being a pilots's 'perception' of what is going on can be very different from what is 'actually' going on. Last edited by ACE-OF-ACES; 08-05-2012 at 05:41 PM. |
#46
|
||||
|
||||
You'll understand if I don't take up matlab, C# is enough of a challenge!
Those formulas are generally what I am using. btw I assume our TLR_Cpm is for altitude in feet not metres (TLR_Cpf?). The problem we have for calculating Density Altitude is that there is no OAT indicator. Then there is the question of whether Z_AmbientTemp relates to the cockpit altitude. I did calculate a lapse rate from Z_Temp and Z_AltMSL and assuming 288.15 at SL but that gave daft results. So I have assumed Z_AmbientTemp as OAT. I crashed at SL and it returned 290.1K or ~17C. At 15000ft it gave 260.2, a lapse rate of 0.0019933 for the CoD environment so I guess its OK for our purposes.
__________________
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 |
|
|