Archived

This topic is now archived and is closed to further replies.

n4gix

Flight Model SDK

Recommended Posts

Has anyone noticed this? http://msdn.microsoft.com/en-us/library/cc526961.aspxI am very hopeful that this will enter into the next MSFS SDK. It turns out I have access to ESP, so I think I'll give this a "go" and get a head start (crossing fingers that it'll find its way into MSFS). I have been somewhat irritated for quite a while that flight modeling (in a FLIGHT simulator) has remained an obfuscated black art. I think, on this matter, X-plane has the right approach: make tools for flight modeling a first-class part of the SDK. I'll admit I know VERY little about how to do a flight model, but if the tools will not be upfront, I can begin to learn.Anybody know more about this?

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hope you can code in Assembler... }( Currently that section is the only difference between the ESP SDK and the FSX SDK.-Dai

Share this post


Link to post
Share on other sites

Since there are good examples, "learning" ASM wouldn't be TOO different than what you described your C/C++ learning process was to get your EXCELLENT gauge programming tutorial together: you'll learn it if it is an obstacle to getting what you want. I might fail, but at least (I hope) the tools are there to try.I have "messed" with assembler in the past... very low level and concerned with moving things around in memory. If you study those examples carefully, it seems as though the extent of ASM knowledge required is to make variables and tables. I don't see any ASM "logic" required. In this sense, understanding the purpose of each variable is the challenge.

Share this post


Link to post
Share on other sites

I think it's still going to be a black art. Creating the .Asm file doesn't appear to need any knowledge of assembler programming. It's simply a way to organise the data.However, I looked at the example code for for the simple piston engined aircraft and found that the Cl vs Angle of Attack table gives the Cl in the range from -180 to +180 degrees of angle of Attack. Anyone any ideas what the Cl should be at an angle of attack of, say, 135deg? Microsoft thinks it's -0.5 and that it's +0.5 at -135deg. I have difficuklt visualising these cases and doubt that there are any reliable data for them.

Share this post


Link to post
Share on other sites

>I think it's still going to be a black art. >>Creating the .Asm file doesn't appear to need any knowledge of>assembler programming. It's simply a way to organise the>data.>>However, I looked at the example code for for the simple>piston engined aircraft and found that the Cl vs Angle of>Attack table gives the Cl in the range from -180 to +180>degrees of angle of Attack. Anyone any ideas what the Cl>should be at an angle of attack of, say, 135deg? Microsoft>thinks it's -0.5 and that it's +0.5 at -135deg. I have>difficuklt visualising these cases and doubt that there are>any reliable data for them.The ClvsAoA record has a single range that's utilized for the aircraft's lift performance... despite the fact the entries range from -180 to +180. It goes from Cl_min to Cl_max.

Share this post


Link to post
Share on other sites

The Cl vs alpha table is:;CL vs. Alpha ;The first entry defines the number of data points (maximum 47 entries) TOKEN_BEGIN AIR_CL_ALPHA dd 13 ; Number of Entries REAL8 -3.142, 0.000 REAL8 -2.356, 0.500 REAL8 -1.571, 0.000 REAL8 -0.366, -1.528 REAL8 -0.078, 0.000 REAL8 0.017, 0.590 REAL8 0.262, 2.096 REAL8 0.288, 2.183 REAL8 0.314, 2.096 REAL8 0.340, 1.528 REAL8 1.571, 0.000 REAL8 2.356, -0.500 REAL8 3.142, 0.000 TOKEN_ENDI assume that the second column is the Angle of Attack running from -3.142 radians to +3.142 radians (-180 deg to +180 deg.) The graph in degrees is:http://forums.avsim.net/user_files/194283.jpgThis shows that Cl is +0.5 at -135deg Angle of Attack and -0.5 at +135deg. I still ask what this means in reality? Think about the attitude of the aircraft.

Share this post


Link to post
Share on other sites

Explain how a negative angle of attack is physically possible... then we'll continue the discussion. ;)

Share this post


Link to post
Share on other sites

An aircraft pulling negative g - such as in steady inverted flight - will have a negative angle of attack.Continue!

Share this post


Link to post
Share on other sites

>An aircraft pulling negative g - such as in steady inverted>flight - will have a negative angle of attack.>>Continue!Incorrect.Once the aircraft is inverted, the angle of attack is referenced to the bottom surface of the wing.

Share this post


Link to post
Share on other sites

No it isn't. The Angle of Attack is the angle between a fixed datum line in the aircraft/wing and the relative airflow and can be negative. Consider an aircraft mounted in a wind tunnel at zro angle of attack. Rotating it nose up will give a positive angle of attack: rotating it nose down will give a negative angle of attack. Until you understrand that basic idea there is no point in discussion with you.

Share this post


Link to post
Share on other sites

>No it isn't. The Angle of Attack is the angle between a fixed>datum line in the aircraft/wing and the relative airflow and>can be negative. Consider an aircraft mounted in a wind tunnel>at zro angle of attack. Rotating it nose up will give a>positive angle of attack: rotating it nose down will give a>negative angle of attack. Until you understrand that basic>idea there is no point in discussion with you.Incorrect statement. However, you're correct... no point in discussion with you.

Share this post


Link to post
Share on other sites

AerodynamicsThe angle of attack of an aircraft is defined as the angle between the relative wind and the wing's chord line. Since drag is defined as the component of the resultant force parallel to the relative wind, angle of attack is also the angle between the drag and the chord line. In other words, since the relative wind is usually approximately horizontal, if the plane is climbing, the angle of attack is positive, and if it's in a dive, the angle of attack is negative.Angle of attack is often abbreviated as α or AOA. Forces and moments on a wing section generally1 vary as functions of angle of attack; airfoils are often identified by the way their coefficients of lift, drag, and moment vary according to angle of attack. All of NACA's voluminous airfoil data archives are presented as graphs in this form. The angle of attack when lift is zero is defined as the "zero-lift angle of attack" (duh), αL=0. αL=0 is different depending on the shape of the airfoil: for a cambered airfoil (eyebrow-shaped), it is negative, while for a perfectly symmetrical airfoil, αL=0 is identically zero. With the wing sitting at zero lift, a line can be drawn along the line of relative velocity, through the airfoil, and out its trailing edge. This is known as the "zero-lift line". As the airfoil then changes orientation relative to the wind, the angle between the zero-lift line and relative wind is known as absolute angle of attack, and is the sum of the zero-lift angle of attack and the geometric angle of attack.Angle of attack is often abbreviated as α or AOA. Forces and moments on a wing section generally1 vary as functions of angle of attack; airfoils are often identified by the way their coefficients of lift, drag, and moment vary according to angle of attack. All of NACA's voluminous airfoil data archives are presented as graphs in this form. The angle of attack when lift is zero is defined as the "zero-lift angle of attack" (duh), αL=0. αL=0 is different depending on the shape of the airfoil: for a cambered airfoil (eyebrow-shaped), it is negative, while for a perfectly symmetrical airfoil, αL=0 is identically zero. With the wing sitting at zero lift, a line can be drawn along the line of relative velocity, through the airfoil, and out its trailing edge. This is known as the "zero-lift line". As the airfoil then changes orientation relative to the wind, the angle between the zero-lift line and relative wind is known as absolute angle of attack, and is the sum of the zero-lift angle of attack and the geometric angle of attack: αa = α + αL=0.At some large value of α, the flow passing over the top of the airfoil will separate, and the sudden increase in drag will make the aircraft stall - i.e., don't try to fly straight up, 'cause it won't work.A twisted airfoil (see wing divergence, reversal) can cause the angle of attack to vary along the length of a wing.In practice, airfoils tend to shed vortices from the wingtip, which creates a downwash and deflects the local airflow in the vicinity of the wing downward by an angle of αi. This is the induced angle of attack. The airfoil section itself is then responding to an effective angle of attack equal to the geometric angle of attack minus the induced angle of attack: αeff = α - αi. This is related to finite wing theory.http://everything2.com/title/angle%2520of%2520attack

Share this post


Link to post
Share on other sites

I suspect that you are used to seeing windtunnel Cl vs alpha graphs with the two axes meeting at the bottom LH corner and with alpha not going beyond 25

Share this post


Link to post
Share on other sites

Bill... I asked him for an example of AoA going negative. He stated that inverted, level flight would result in a negative AoA. I stated he was incorrect, and thus ensued a translation of what defines AoA... I've never said AoA can't go negative... I've stated what he's saying is incorrect.However, since you brought up the correct answer.... I'll ask the next question... is it possible for an aircraft to exceed a climb or dive of 90 degrees?

Share this post


Link to post
Share on other sites

I'm not disagreeing with anything your wrote. It is barely possible that flying inverted, level flight might be reported as a negative AoA, but normally it would be slightly positive, just as it is in normal flight.Even a "dive" while inverted will display a negative AoA... ;)Without taking the time to look it up, my guess would be no...

Share this post


Link to post
Share on other sites

Correct.And as was stated previously, the data is in polar format. However, FS will never read values that exceed +/- 90 degrees.

Share this post


Link to post
Share on other sites

There can be no objection to your post. However, it doesn't address the specific point about negative angle of attack in inverted flight.The figure shows and aircraft in upright flight on the left and in inverted flight on the right in earth axes, i.e. relative to the earth. http://forums.avsim.net/user_files/194512.jpgIn inverted flight the lift force still has to be upwards to counter gravity and therefore airflow is also upwards, relative to earth. However, in inverted flight the lift force acts downwards and the airflow also is downwards relative to the aircraft. This is made clearer in the second figure in which the aircraft have been re-orientated into earth axes with the aircrafts' datum being horizontal. In inverted flight, the lift is negative and the angle of attack is negative. http://forums.avsim.net/user_files/194511.jpgRemember that lift is a vector and defined by its direction as well as its magnitude. If the aircraft is completely symmetrical aerodynamically in pitch and was flying at say +5 deg angle of attack in upright steady level flight at a given EAS then it would fly at -5deg angle of attack in steady level inverted flight at the same EAS because the magnitude of the lift force must be the same and equal to the weight. If the aircraft weren't symmetrical then it would fly inverted at the negative angle of attack that gave a negative lift coefficient with the same magnitude as for upright flight. To illustrate the point Lift Coefficient can be approximated by:Cl = Cl0 +ClAlpha * AlphaWhere Cl0 is the lift coefficient at zero Angle of Attack (Alpha) and can be about 0.2 for a cambered wing ClAlpha is the variation of Cl with Alpha, which has a typical value of about 0.1/degree away from the stall. In this case the variation of Alpha with Cl is:Alpha = (Cl-0.2)/0.1If the aircraft is in erect flight at a Cl of +0.7 then Alpha is (0.7 - 0.2)/0.1 or +5 deg. If it's in inverted flight at the same EAS and same magnitude of Cl to give the same magnitude of lift force, then Alpha becomes (-0.7 - 0.2)/0.1 or -9 deg.

Share this post


Link to post
Share on other sites

I will agree with your post.However, you have to agree that in inverted flight a higher angle of attack is physically impossible.The primary reason is because with regard to lift, the 'reference line' is straight through the center of the wing, between the upper and lower surface, not with relation to the aircraft's overall body. In inverted flight, the surfaces are inverted and thus the airfoil's curvature is also inverted and not producing as much airflow acceleration across the upper surface because of the airfoil's shape.Thus, back to your original question regarding the data curve in the table... in flight you can never exceed +/-90* and are going to see a faster drop in Cl during inverted flight.Given that, the table in FS makes perfect sense.

Share this post


Link to post
Share on other sites

"However, you have to agree that in inverted flight a higher angle of attack is physically impossible.The primary reason is because with regard to lift, the 'reference line' is straight through the center of the wing, between the upper and lower surface, not with relation to the aircraft's overall body. In inverted flight, the surfaces are inverted and thus the airfoil's curvature is also inverted and not producing as much airflow acceleration across the upper surface because of the airfoil's shape."I'm not sure what your point is. I showed that if the wing is cambered then a higher magnitude of angle of attack is needed for inverted flight than for upright flight. If the wing is symmetrical then the magnitudes will be the same. The reference line can be anything you want. For a wing it is normally taken as the chord line - the line connecting the leading and trailing edges - but for a complete aircraft it can be the fuselage horizontal datum. The choice will affect the value of Cl0The angle can exceed +90 deg. I've seen the so-called tail slide where an aircaft with a thrust/weight ratio of less than is put into a vertical climb. The speed diminishes until the aircraft stops climbing and then slides down backwards until the pilot takes control again. The angle of attack is close to 180 deg when the aircraft begins to slide backwards. I supect there can also be higher angles of attack in the spin also.Do you now agree that angle of attack is negative in inverted flight?

Share this post


Link to post
Share on other sites

"Do you now agree that angle of attack is negative in inverted flight?"If you have to ask that question, you clearly didn't actually read all of my post.As for exceeding 90*. Nope. When the aircraft is 'sliding' tail first, the nose of the aircraft is no longer traveling forward and thus the wing is quite literally moving through the air in a rearward direction, thus transforming the 'leading edge' to the rear of the wing.How FS handles this is perhaps a question better suited for ACES.Going back to your original post... you said the table makes no sense. I've proven it makes sense. Now... if you want to argue things... at this point you're on your own. :)

Share this post


Link to post
Share on other sites

I did read your post and still don't know what you mean by "However, you have to agree that in inverted flight a higher angle of attack is physically impossible."Higher than what?

Share this post


Link to post
Share on other sites

Than what is possible during normal flight.The design if the wing would prevent it. If you think I'm incorrect... go take a 747 in FS and fly it inverted. See how well you do. ;)

Share this post


Link to post
Share on other sites

"Than what is possible during normal flight."But i just showed that with an asymmetric, cambered wing the magnitude of the angle of attack in inverted flight is greater than in upright flight."The design if the wing would prevent it. If you think I'm incorrect... go take a 747 in FS and fly it inverted. See how well you do. ;)"I do think you are incorrect. Go take a Pitts Special in FS and fly it inverted.

Share this post


Link to post
Share on other sites

A few definitions:Relative wind - The airflow that is exactly opposite to the direction of flight, i.e. is exactly opposite to velocity.Angle of attack - The angle between the chord and the relative wind, expressed in degrees. It is negative if the chord line is below the relative wind.Angle of attack is commonly confused with pitch attitude. They are not one and the same.

Share this post


Link to post
Share on other sites