Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

The trim bug in MSFlight Simulator

Featured Replies

  • Author
I think we're on the same page.Just to be sure, the three conditions would 'look' the same if you happened to be looking for the wrong affect.IMO the above won't affect your pitch attitude at all - only the aircraft’s total lift (no rotation about the CG).The elevator’s contribution to total lift would be relatively small…but not insignificant.Using AFSD you could read this....maybe even the VSI would show it.But it would not show up on the attitude indicator.The aircraft will simply rise and fall with no attitude change.For your modified FDE…I’d expect the aircraft attitude to be identical for all 3 elev positionsI’d expect the aircraft total lift to be x, x--, then x++
Hi you all,First of all, concerning the experiments I am trying on MSFS, I put "AP on and Altitude Hold on" in order to have at all stages of the experiment an automatically trimmed situation (Lifts sum = 0, and Pitching moments sum = 0).I insist once more that even though Cm_de = 0 (besides all the multipliers and factors) , the elevator deflection (Cl_de not zero of course) still produces pitching moment when there is a distance (x) between cg point and model visual centre.On the contrary, the same experiment performed on flaps ( that is Cm_df =0, and Cl_df different from 0) shows that at all cg locations, and from flaps 1 ° to full flaps, flaps do not produce any pitching moment unless Cm_df is not zero. More, I did the same thing on spoilers ( Cm_ds = 0 and Cl_ds not zero) and the results were the same as for the flaps. Then the elevator seems to behave differently, its lift seems to apply at a different point, as compared to flaps and spoilers.I use AFSD to monitore the different values. You can try these experiments. Use the keyboard (instead of a joystick), and for the case of elevator, try a full up then a full down. You will notice that the trimming moment( Cm_dt* trim tab deflection) shows each time a different value. As for the cases of flaps and spoilers, the trimming moment remains constant whatever the flaps or spoiler status are.
  • Replies 182
  • Views 31.4k
  • Created
  • Last Reply

Top Posters In This Topic

Reverting to the previous didcussion, I carried out further tests changing various variables in aircraft.cfg using the FSX default C127SP as shown in the table.These confirm that wing_pos_apex_lon seems to have no discernable effect.The C172 flies with htail_area = 0, h_tail_span = 0, htail_pos_lon = 0, and elevator_area = 0.0. This suggests that the pitching moment due to elevator arises only from CM_de and not from CL_de. There's no moment arm to convert lift to a moment. wing_span and wing_area have an effect but wing_root_chord doesn't. FSX has a variable giving the cg position as fraction of the mean aerodynamic chord. This has a value even if the wing_root_chord = 0. This suggests that given wing_span and wing_area (both of which are needed) FSX calculates a chord. I was hoping to discover how FSX does that but my results so far are inconclusive. I am increasingly convinced that many of the items in the [airplane_geometry] section of aircraft.cfg don't seem have any discernable effect. I'm continuing to look into this.

Gerry Howard

  • Commercial Member

There is an assumption being made, repeatedly: The fact you eliminate a value or set it to zero and assume that FS accepts your changes. I suspect that rather FS is determining some of the changed values to be invalid and thus replacing them with 'default' values. It would need this 'protection' to avert code crashes due to missing data.Try moving only the main wing apex with an aircraft that has a supercritical swept wing.

Ed Wilson

Mindstar Aviation
My Playland - I69

  • Commercial Member

Ed these are both good points. Yeah, zeroing out an attribute may not be allowed in some circumstances…for instance to avoid a division by zero. If FS is substituting default values it should be easy to spot by looking for unexpected results. And true there is no reason to rule out the idea that wing apex is required for a swept wing aircraft. The same goes for any transonic aircraft – usually the same of course ;) I can only confirm the straight low speed wing I tested also did not respond to wing apex.mgh that is interesting. It’s possible an aircraft with no wing sweep could just use area/wingspan for its mean chord.So you may have trouble getting a wing with zero chord. Although playing with wingspan may have better results.GG position as fraction of the mean aerodynamic chord seems to fit in well. So I imagine you're close to a solution. Did you get my email/PM?

  • Moderator

What Ed is suggesting is that absent a value in the aircraft.cfg, FS will fallback on the .air file tables for it's calculations...IOW, you will need to edit both the .cfg and the .air file to obtain meaningful results.BTW, with regards to the "divide by zero" issue, Tim (ex-ACES) confirmed the other day that FS was coded to trap those exceptions and return NULL to the handler.

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
What Ed is suggesting is that absent a value in the aircraft.cfg, FS will fallback on the .air file tables for it's calculations...
As far as I can see the .air files need only contain aerodynamic derivatives and have no dimensional information relating to the aircraft. Also it doesn't explain why the effects of moving the wing apex can't be seen. That's equivalent to moving the cg aft and should result in instability but doesn'**'s late here but tomorrow I'll try compiling one of the default ESP .asm files and combine it with a stripped down aircraft.cfg file to see what happens.

Gerry Howard

  • Commercial Member

Moving the wing apex is not the same as moving the CG.They are two completely independant values in the .cfg file... both offset from the reference datum point... which is offset from the visual model center.

Ed Wilson

Mindstar Aviation
My Playland - I69

  • Author
Reverting to the previous didcussion, I carried out further tests changing various variables in aircraft.cfg using the FSX default C127SP as shown in the table.These confirm that wing_pos_apex_lon seems to have no discernable effect.The C172 flies with htail_area = 0, h_tail_span = 0, htail_pos_lon = 0, and elevator_area = 0.0. This suggests that the pitching moment due to elevator arises only from CM_de and not from CL_de. There's no moment arm to convert lift to a moment. wing_span and wing_area have an effect but wing_root_chord doesn't. FSX has a variable giving the cg position as fraction of the mean aerodynamic chord. This has a value even if the wing_root_chord = 0. This suggests that given wing_span and wing_area (both of which are needed) FSX calculates a chord. I was hoping to discover how FSX does that but my results so far are inconclusive. I am increasingly convinced that many of the items in the [airplane_geometry] section of aircraft.cfg don't seem have any discernable effect. I'm continuing to look into this.
Hi mgh ,As I have written it many times here, many data of the cfg files serve only to build the airfile and thus changing them has an effect only when building the airfile.Just try the FSEDIT ( of FS 2004). This MSFS utility permits to twick the airfile by changing entries in the cfg file. Once you have the airfile twicked, making a further change, for instance, in wing apex will just lead to a displacement of the mean chord. That is MSFS will just see the MAC displaced with respect to the cg location, and this is why we notice the cg gauge reading(% MAC) changing consequently. Then, by moving the Wing Apex, you can place the 25% MAC location wherever you want, but without changing the wing centre of lift. The wing centre of lift is already set by the airfile. The best thing to do then is to place, once and for all, the Wing apex at the right place (using the correct and real world data) then build the airfile ( manually or using any related software). To check that the MAC is really at the right place , have , for instance, your cg at , let's say, 3 feet forward of the Main Gear and look how much % MAC it reads. It must read the same % MAC as in real world. If not, change again the Wing apex position and rebuild the airfile.Now about the issue I rised about zeroing the coefficients Cm_de, Cm_df, and Cm_ds. As I wrote above, elevator continues producing pitching moment while flaps and spoilers not. I have thought so far that for elevator, the only source of pitchin moment in the coefficient Cm_de. Do you have an idea ?
Moving the wing apex is not the same as moving the CG.They are two completely independant values in the .cfg file... both offset from the reference datum point... which is offset from the visual model center.
I never said it was. If increasing wing_pos_apex-lon does anything it should move the wing forwards. That it turn should move the centre of lift forward. Aerodynamically this effectively moves the cg aft.
Hi mgh ,As I have written it many times here, many data of the cfg files serve only to build the airfile and thus changing them has an effect only when building the airfile.Just try the FSEDIT ( of FS 2004). This MSFS utility permits to twick the airfile by changing entries in the cfg file. an idea ?
FSX doesn't change the .air file following changes in the .cfg file. Despite all the changes I've recently made to the default FSX C172 .cfg file, its modified date is still 04 September 2006, 22:04:18.

Gerry Howard

  • Moderator
Hi mgh ,As I have written it many times here, many data of the cfg files serve only to build the airfile and thus changing them has an effect only when building the airfile.
Actually, that is quite incorrect. The values in the aircraft.cfg modify the values in the compiled .air file. Most parameters are "scalar operators," that is a "percentage" applied to the defaults. As each version was released, new scalar parameters were added to the aircraft.cfg file to allow easier access for "tweakers." :( If you were to download the free SDK for Prepar3D, you would find the actual compiler that ACES wrote (asm2air.exe) to create the .air files, along with some samples of the .asm source files used.For example:
	;Elevator trim elasticity on effectiveness scaling table  (max 5 entries)	; IN:  Aircraft dynamic pressure ( 1/2 Rho * V^2)  (psf)	; OUT: Effectiveness scalar        TOKEN_BEGIN     AIR_70_ELEVATOR_TRIM_ELASTICITY                dd      5       ; Number of Entries                REAL8           0.000000,       1.000000        ;                REAL8           135.000000,     0.800000        ;                REAL8           300.000000,     0.500000        ;                REAL8           500.000000,     0.200000        ;                REAL8           700.000000,     0.100000        ;               TOKEN_END

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Commercial Member
Now about the issue I rised about zeroing the coefficients Cm_de, Cm_df, and Cm_ds. As I wrote above, elevator continues producing pitching moment while flaps and spoilers not. I have thought so far that for elevator, the only source of pitchin moment in the coefficient Cm_de. Do you have an idea ?
Don't forget to zero CMih and CMdt....if you haven'tAs you know, the autopilot servo isn't connected to the elevator. (but using AP for this test would invalidate the results anyway)Also the reason this thread started was no one could confirm how CMih, CMdt, Cmde work together.We know...In an aircraft with a trim tab - the trim force acts on the elevator.In an aircraft with an adjustable hStab - the trim force acts on the airframe.In texts only CMih appears to describe all pitch trim.My contention was in the sim CMdt doesn't really act on the elevator at all...but no proof yet.
  • Author
I never said it was. If increasing wing_pos_apex-lon does anything it should move the wing forwards. That it turn should move the centre of lift forward. Aerodynamically this effectively moves the cg aft.FSX doesn't change the .air file following changes in the .cfg file. Despite all the changes I've recently made to the default FSX C172 .cfg file, its modified date is still 04 September 2006, 22:04:18.
Sure It does not. When loaded by MSFS, the data in the airfile remain inchanged whatever you put in cfg file. But some factors in the cfg file (like elevator effectiveness for instance) are used by MSFS to tune data coming from airfile (I agree then with n4gix).As I wrote before, changing data in the airfile is possible only by using the MS utility FsEdit ( and may be other softwares) . FsEdit works with FS9 airfiles but one can use it for fsx airfiles.
  • Author
Don't forget to zero CMih and CMdt....if you haven'tAs you know, the autopilot servo isn't connected to the elevator. (but using AP for this test would invalidate the results anyway)Also the reason this thread started was no one could confirm how CMih, CMdt, Cmde work together.We know...In an aircraft with a trim tab - the trim force acts on the elevator.In an aircraft with an adjustable hStab - the trim force acts on the airframe.In texts only CMih appears to describe all pitch trim.My contention was in the sim CMdt doesn't really act on the elevator at all...but no proof yet.
I am sure, I simplified the airfile and the cfg file so that the aircaft shows only 2 pitching moment sources : Cl(alpha). x (x being the distance between cg and model visual centre) and Cm_dt.Trim tab deflection . The AP then has only to adjust trim tab deflection for trim so that : Cl(alpha). x = Cm_dt.Trim tab deflection .I could check that when x = 0 (cg at the model visual centre), the trim tab deflection sets to zero . Further, the latter changes ( becoming positive or negative) as x changes (aft or fwd of visual centre) . This verifies well the former equation, Cl(alpha). x = Cm_dt.Trim tab deflection . Deploying flaps or spoilers (remember Cm_df =0 and Cm_ds =0) affects alpha but does not show any effect on the equation above, whatever x is.But as for the elevator (with Cm_de = 0 as well), when deflected, alpha is affected too, and a new pitching moment shows up when x is different from zero.How come the lifting component from elevator produces pitching moment (at x not zero) but the lifting components from flaps and spoilers do not ?

One lives and learns - FSX does modify the aircraft.cfg file, although not very helpfully.In anticipation of running some tests I stripped out all the dimensional information out of the default FSX C172SP file. I fould afteroading the aircraft the file was changed. FSX added wing_root_chord=4.819945, which is wing_span / wing_area It set oswald_efficiency_factor=0.700000, which is a typical value. Both those are resonable values.FSX sets wing_pos_apex_lon, htail_pos_lon, and vtail_pos_lon all to -3.600000, which puts the wing, horizontal stabiliser, and vertical stabilser all at the same point! Not that it matters because its sets the areas of the area of the horizontal stabiliser, vertical stabilser, elevator, and rudder all to zero. But the aircraft still flies and responds normally despites having no horizontal stabiliser, vertical stabilser, elevator, or rudder!! I am now convinced that FSX doesn't really need most of most of the values in the the [airplane_geometry] section

[airplane_geometry]wing_area   			= 174.0 				//Square feetwing_span   			= 36.1              	//Feetelevator_up_limit   	= 28.0              	//Degreeselevator_down_limit 	= 21.0              	//Degreesaileron_up_limit    	= 20.0              	//Degreesaileron_down_limit  	= 15.0              	//Degreesrudder_limit        	= 24.0              	//Degreeselevator_trim_limit 	= 19.5              	//Degreesspoiler_limit   		= 0.0   				//Degreesspoilerons_available	= 0 					//Spoilerons Available?aileron_to_spoileron_gain = 0   				//Aileron to spoileron gainmin_ailerons_for_spoilerons = 0 				//Degreesmin_flaps_for_spoilerons = 0                	//Minimum flap handle position when spoilerons activateauto_spoiler_available   = 0positive_g_limit_flaps_up  =  4.0   			//Design G load tolerance (positive, flaps up)positive_g_limit_flaps_down=  2.0   			//Design G load tolerance (positive, flaps down)negative_g_limit_flaps_up  = -1.5   			//Design G load tolerance (negative, flaps up)negative_g_limit_flaps_down= -1.5   			//Design G load tolerance (negative, flaps down)load_safety_factor 		=  1.5   			//Design G load safety factor ////////////////////////////// START OF ADDITIONS  ////////////////////////////////////////////////////////wing_root_chord=4.819945wing_dihedral=0.000000wing_incidence=0.000000wing_twist=0.000000oswald_efficiency_factor=0.700000wing_winglets_flag=0wing_sweep=0.000000wing_pos_apex_lon=-3.600000wing_pos_apex_vert=0.000000htail_area=0.000000htail_span=0.000000htail_pos_lon=-3.600000htail_pos_vert=0.000000htail_incidence=0.000000htail_sweep=0.000000vtail_area=0.000000vtail_span=0.000000vtail_sweep=0.000000vtail_pos_lon=-3.600000vtail_pos_vert=0.000000elevator_area=0.000000aileron_area=0.000000rudder_area=0.000000//////////////////////////// END OF ADDITIONS  ///////////////////////////////////////////////////

Gerry Howard

As I wrote before, changing data in the airfile is possible only by using the MS utility FsEdit ( and may be other softwares) . FsEdit works with FS9 airfiles but one can use it for fsx airfiles.
FSEdit only works with FS9 .cfg files . It doesn't work with FSX .cfg files.

Gerry Howard

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.