Sign in to follow this  
WarpD

Acceleration question

Recommended Posts

Help AVSIM continue to serve you!
Please donate today!

Acceleration is nothing more than velocity change for a given moment.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.

Share this post


Link to post
Share on other sites

Each of the two formulas for calculating drag is specific to a different flight regime.Precisely, the first formula ( D = W * sin(gamma) ) is valid only for a = 0 ( steady flight ) and T = 0 ( no thrust ). In other words, it is valid for steady gliding.The second formula instead ( D = T cos (alpha) ) is valid under the hypotheses of, again, a = 0 ( steady flight ) and gamma = 0 ( zero vertical speed ). In other words, it is valid for steady horizontal flight.Marco

Share this post


Link to post
Share on other sites

Hello!Thank you guys for your replays.EdI've trayed mesuring change in TAS using the low pass filtering Ron kindly posted in this forum, but realized the final value has a delay (unless I'm making a mistake), I take the value of TAS twice one second apart each other and then filter that diference to avoid the jumps betwen changes, where I suppose the delay is added. Do you have another method to messure the diferential equation you posted?MarcoDo you know what equation can be used to calculate accelration no matter the flight conditions?, I've being serching but that formula is the only one I could find so far, and some documents say it can be used for any flight condition, no matter if there's constant TAS or not, let me check, maybe I'm mistranslating.RegardsJavier

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

>................>Ed>>I've trayed mesuring change in TAS using the low pass>filtering Ron kindly posted in this forum, but realized the>final value has a delay (unless I'm making a mistake), I take>the value of TAS twice one second apart each other and then>filter that diference to avoid the jumps betwen changes, where>I suppose the delay is added. Do you have another method to>messure the diferential equation you posted? In my XML code, I gather 'V', etc. every tick (1/18.2 sec), then divide successive differences by delta t (=1/18.2) to get an unfiltered 'Vdot'. That variable has sampling errors in Magnitude and Phase. Mainly in Phase. Since there is an average delay of (1/18.2)/2 in the sampled datums. To smooth Vdot, I added a low pass filter set with a Time Constant of typically 0.5 seconds. That adds a further delay to the Vdot variable, but the result is still very useful. I display Vdot as something like "5.25 ft/s". Note 32.17 ft/sec^2 is "1 G", so I can easily estimate acceleration in G's during TO, in flight, or landing. In fact, Vdot is negative if power is cut on the ground, and the value gives a direct indication of 'rolling coefficient of friction', mu. In FS9 (and earlier), Vdot will display about 32.2*0.05 = -1.6 ft/sec^2 if the thrust is cut to zero at lower runway speeds (where only rolling drag is significant). A more reasonable value for mu, consistent with actual hard surface drag, is indicated when the 'fixed for rolling friction' sim1.dll is being used.>Marco>>Do you know what equation can be used to calculate accelration>no matter the flight conditions?, I've being serching but that>formula is the only one I could find so far, and some>documents say it can be used for any flight condition, no>matter if there's constant TAS or not, let me check, maybe I'm>mistranslating.>>Regards>Javier I eventually calculated Fnx, Excess Thrust, in my Jet Test gauge. Fnx = Fn - Fdrag, and is 0 in unaccelerated, level flight. Later, I resolved Fnx (in lbs) into Fvs (vertical speed) and Fac (acceleration), so I could see how much of the excess was available for climb, and how much was used to accelerate the AC. Fac is simply (W/g)*Vdot, while Fvs involves no more than a basic consideration of forces on a frictionless, inclined plane. A screen shot of my Jet Test" Window taken on a Concorde test flight gives some details. 60% down the window, in 'light blue' I see: Fnx 29.67% 15887 lb Fvs 3602 Fac 12001 lb | 0.6% The last '0.6%' is a calculation of the error, which can be over 10% in dynamic conditions. Ron

Share this post


Link to post
Share on other sites

Good day!RonI'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 .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

Share this post


Link to post
Share on other sites

>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. I'm not sure what "L:Airspeed diference" and "L:Airspeedfiltered" relate to. My XML code is based on simple minded intuition and verification. Displayed values are consistent with Newton! You can't get FS variables over time differences of exactly one second. However, the DOS Tick, close to 1/18.2 seconds, is the time difference between XML Parameter. Note FSX appears to make accelerations directly available. >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 calculate 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 think I simply used gamma(in radians)~sin(gamma) to approximate the vertical component of thrust; saving the overhead of a sin(gamma) calculation. So, if 'flight slope' is 11.46 deg (0.20 rad), the vertical component of thrust increases mgh (potential energy due to height) by 0.20*Fn*VS ft-lb/sec. I display the vertical component of Fn (thrust) as Fvs. Ron

Share this post


Link to post
Share on other sites

Well, if acceleration is going to be available in the next version of FS this is very good news, that parameter and alpha channels on 0,0,0 areas have been on my whishing list.Javier

Share this post


Link to post
Share on other sites

Hello!Regarding the alternative method to find the acceleration value I don

Share this post


Link to post
Share on other sites

Hello Ed!Sorry, but I can't see the diference betwen yours and what Ron's Low pass filter does. Or am I ignoring something in your first reply?Javier

Share this post


Link to post
Share on other sites

Let's put it this way... I can calculate drag accurately with it. I'm taking the velocity values and quantizing them based on time between samples. It gives a fairly accurate value for the 3 acceleration axes. I'm not using TAS, I'm using velocities.I have no idea what Ron's doing, to be honest. The only 'low-pass filter' I've ever had knowledge of is in electronics.

Share this post


Link to post
Share on other sites

>Hello!>>Regarding the alternative method to find the acceleration>value I don

Share this post


Link to post
Share on other sites

>Let's put it this way... I can calculate drag accurately with>it. I'm taking the velocity values and quantizing them based>on time between samples. It gives a fairly accurate value for>the 3 acceleration axes. I'm not using TAS, I'm using>velocities.>>I have no idea what Ron's doing, to be honest. The only>'low-pass filter' I've ever had knowledge of is in>electronics. I'm an EE and am quite familiar with RC LP filters. The challenge was to come up with an algorithm that did the same thing, but digitally. All previous values of a variable are in the current reading, but the farther back in time they are, the less they add to the total. 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. Ron

Share this post


Link to post
Share on other sites

>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

>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

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

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