Jump to content
Sign in to follow this  
WarpD

Acceleration question

Recommended Posts

Guest Ron Freimuth

>I gave you the name of three variables and the methodology to>use them. I'm not certain what more you need. Those three>velocity variables are far more accurate than TAS. I think TAS = SQRT (Vx^2 + Vy^2 + Vz^2). However, FS9 uses Vz for 'TAS'. An error; it appears at higher AoA's. Seems I had to get TAS from Mach. Mach is a scalar, and I wanted a 'V' (TAS) so q = 1/2 rho TAS^2. That gave me a dynamic pressure, q, which resulted in a very accurate Drag = q * CD*S. Where CD = Cdp + Cdi. When parameters were carfully checked for validity I could get results on the order of 0.2% error. More error in dynamic conditions, sometimes less for basic calculations. Herve' Sors and I went though stuff like this to get his AFSD to be accurate. However, he was able to read AIR file tables. I had to put my own Mach Drag table in my Jet Test gauge to account for Mach Drag. Herve' was able to account for flaps drag, that was too much for my XML test gauge. However, my gauges did update more rapidly than AFSD. ;) Warning: AFSD is accurate only when the FS atmosphere is set to standard. 'Fair Weather'. I was able to get at current pressure, density, etc. so my Jet Test is correct for non-standard atmosphere. Ron

Share this post


Link to post
Share on other sites
Guest Ron Freimuth

>Good day!>>Ron>>I'm using a factor of .01 for L:Airspeed diference and .99 for>L:Airspeedfiltered, Do you think that's why I see the delay in>the final value?. Do you use a factor .5 for each var? Since I>messure TAS every second I don't have to multiply for nothing>the filtreted value, I suppose 18.2 times Airspeedfiltered is>the value of dv/dt for one second using tick 18.2 . Note I sample every 1/18.2 seconds, that value is known exactly. For a longer TC, the multiplier for the current value is small, and the multiplier for the 'old value' is large. That means it takes some time for the LP filter to get to the current value (assuming all values are constant). Seems the delay of a LP filter is approximately the TC. So, a 0.2 sec TC gives a delay of about 0.2 seconds (though, it takes forever to get to the final value). Digital filters have an additional delay due to time quantization of the sampling. For the 18.2 samples per second XML rate, it comes to 180 deg in 55 ms. 18 deg is 550 ms. This limits performance of PID FB systems. However, Pitch Hold, etc. may have a BW of only 1/2 Hz, so the sampling delay may be acceptable.>I think calculating acceleration using the F=ma equation could>be some how better if i don't have to filter, but ofcourse>it requires to caclulate the net force along the flight path,>that's why i posted the F=T cos(alpha)-D-W sin(gamma), but i'm>not sure if that's the right one.>Javier I calculated Vdot long ago. Later, I made use of the fact that part of the thrust is accelerating a jet transport (mainly below the constant Mach climb). I just calculated that acceleration thrust from F = m Vdot. That may take a few seconds to stabilize when subtracted from other components, but that's better than a lot of jitter. While I calculated the part of thrust that increased AC height from some simple relationship. In the end, Fn (Thrust) = Drag - m Vdot - m VSdot)<?>. Useful to watch the different components during a climb to further ones understanding. I've resolved 0.01 deg/sec in roll, pitch and yaw by differentiating and filtering roll, pitch, and yaw samples. Of course, the readings are only stable to 0.01 deg/sec in smooth air and steady flight. However, I've become dependent on my Jet Test engineering readings, and lose facility in flying jets as pilots do. ;) OTOH, I don't need a FM to fly an AC efficiently. Ron

Share this post


Link to post
Share on other sites

This is the code I use to calculate de difference between current and previous values for velocity. I replaced the ~1 sec lap to get the difference but the delay continues, It

Share this post


Link to post
Share on other sites

>Hello Ed!>>What about a numeric example?>>Javier>I already offered a great deal of information without physically writing the code for you:There are three values:VELOCITY BODY XVELOCITY BODY YVELOCITY BODY ZThese are returnable in feet per second. To convert the values to acceleration you simply need to measure the time between each set of readings.As example, let delta_x1, delta_y1 and delta_z1 be your prior reading. When you obtain your next values let them be delta_x2, delta_y2 and delta_z2. Variable time1 is the time value for the prior reading and time2 is the time value for the current reading. A variable, total_time is (time2-time1).Your resulting acceleration values of accel_x,accel_y and accel_z would be derived from an equation like accel_x = (delta_x2-delta_x1)/total_time.So for the very first pass through the code you need to retrieve the values for delta_x1,delta_y1,delta_z1 and time1.On all subsequent passes you would retrieve the values for delta_x2,delta_y2,delta_z2 and time2.The value of total_time is time2-time1.Your acceleration values are:accel_x = (delta_x2-delta_x1)/total_timeaccel_y = (delta_y2-delta_y1)/total_timeaccel_z = (delta_z2-delta_z1)/total_time


Ed Wilson

Mindstar Aviation
My Playland - I69

Share this post


Link to post
Share on other sites
Guest Ron Freimuth

>Hello Ron!>>Only two more questions, I don

Share this post


Link to post
Share on other sites

Hi!From your post I have clear that I want to get the change in V in a lap of time, derivative of velocity whit respect to time (dv/dt). For example (A:Velocity body Z) (quite similar to Ground speed or TAS whit no wind) when trying to make the differentiation at a rate of 1/18.2 seconds whit the code in reply 17 it still tremble when the sampling is done. I was wondering how you manage to avoid this problem and the delay. I think a numerical example could have been more understandable. Thank you for your example.Javier

Share this post


Link to post
Share on other sites

>Hi!>>From your post I have clear that I want to get the change in V>in a lap of time, derivative of velocity whit respect to time>(dv/dt). For example (A:Velocity body Z) (quite similar to>Ground speed or TAS whit no wind) when trying to make the>differentiation at a rate of 1/18.2 seconds whit the code in>reply 17 it still tremble when the sampling is done. I was>wondering how you manage to avoid this problem and the delay.>I think a numerical example could have been more>understandable. Thank you for your example.>>Javier>I'm not certain if this is in response to my post or not, but I think it is.As far as a numerical example, the only thing I have is physical code written. I use it for flight control calculations for upcoming Eaglesoft DG aircraft, thus as proprietary code I'm not willing to present it.My description of how to accomplish it is more than enough to write the code. If you're going to use the TICK18 time event then I should point out that you want to take your time equation (time2-time1) and multiply it by 18.2 to get the correct duration value.As for delay, the only delay I notice is on an order so low the user flying the aircraft is unlikely to notice it. As for the trembling... you can 'clip' values that are spiked... but it's not easy to decide if it's a spike or an actual acceleration change.


Ed Wilson

Mindstar Aviation
My Playland - I69

Share this post


Link to post
Share on other sites
Guest jonsberndt

> I was able to combine various parts of the calculations in>compact XML code. However, it gets tricky to understand what>is going on. >> This is a much better approaching than the 'running>averages', etc. used in market, etc. analysis.>> JSBSim source code has many kinds of filters written in C. >It's on the WEB at sourceforge.>> RonAnd I've recently added a sensor, and an actuator component (with hysteresis, bias, and lag).I've been considering modeling a Saturn 1B launch vehicle. :)Jon

Share this post


Link to post
Share on other sites
Guest jonsberndt

> I was able to combine various parts of the calculations in>compact XML code. However, it gets tricky to understand what>is going on. >> This is a much better approaching than the 'running>averages', etc. used in market, etc. analysis.>> JSBSim source code has many kinds of filters written in C. >It's on the WEB at sourceforge.>> RonAnd I've recently added a sensor, and an actuator component (with hysteresis, bias, and lag).I've been considering modeling a Saturn 1B launch vehicle. :)Jon

Share this post


Link to post
Share on other sites
Guest Ron Freimuth

>> JSBSim source code has many kinds of filters written in C.>>>It's on the WEB at sourceforge.>>>> Ron>And I've recently added a sensor, and an actuator component>(with hysteresis, bias, and lag).>>I've been considering modeling a Saturn 1B launch vehicle. :)>Jon Jon, You might find the pdf paper by a former Edwards Flight Test Engineer useful. It goes into all sorts of calculations, including how to calculate CAS subsonically and supersonically. The later is done by an iteration of the nested CAS subsonic formula. If you don't have that paper, it's at Herve' Sor's MSFS site. Herve' actually did the CAS iteration in his current AFSD. Thinking a bit about zero lift drag in aerospace vehicles, it appears one should account for Profile Drag, Skin Drag (function of R and wetted area), and Compressibility Drag. However, at high altitudes, there is that 'Frond<?> Number' which changes at least some of the Cdp components. Due to the 'hail of pellets' effect at low air pressures. I ran into some info on skin drag vs Reynold's Number recently. Seems it varies with V and pressure altitude. McCormick has a curve in his 1995 text that shows the effect vs Mach. I was suspicious of that since V, rather than M would appear to be appropriate. I'm not sure what V/l applies, it would seem one would use the MAC for wing skin friction, but fuselage length for fuselage skin friction. I may still have the paper by an Australian consultant that contained some info on how R affects skin drag. And, how it worked in to a C172 airframe. Another illustration compared the drags of different antennas on race cards. For a couple of years I've been increasing Cdm in FS AIR files at lower speeds to account for increased Cdp at lower speeds. It appears when only Cdo is given that it is for cruise speed. So, I increase Cdm below Mach 0.6 to approximate the increase in Cdp. I also made Cdm slightly negative in my Concorde FM at Mach 2.0 to account for a decrease in Cdp due to increasing R. Actually, A lower Cdo, then low Cdm at Mach 2 would be more appropriate, but the end effect is the same: Cdp = Cdo + Cdm. Where I set Cdm to account for both compressibility and skin drag changes. Essentially by cut and try. Ron

Share this post


Link to post
Share on other sites
Guest jonsberndt

>>And I've recently added a sensor, and an actuator component>>(with hysteresis, bias, and lag).>>>>I've been considering modeling a Saturn 1B launch vehicle.>:)>>Jon>> Jon, You might find the pdf paper by a former Edwards>Flight Test Engineer useful. It goes into all sorts of>calculations, including how to calculate CAS subsonically and>supersonically. The later is done by an iteration of the>nested CAS subsonic formula. >> If you don't have that paper, it's at Herve' Sor's MSFS>site. > >> Herve' actually did the CAS iteration in his current AFSD.Wow. This is a great reference. I'll have to add this one to the JSBSim Links page.Jon

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...