• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

AP VS errors

Messages
47
Country
us-california
Hi experts,
I am hoping someone can guide me in the right direction. I have tested the default C172, Baron, Mooney and all have the same problem as well as the Light Sport aircraft model I am building. The problem is that the VS rate drops off after passing through 3000' and continous to deminish and then overshoots the selected altitude by around 20 to 40 feet. I had 8000' selected altitude and VS set to 500 fpm. The VSI indicates the 500' and continues yet the mouse flag shows the value to continue deminishing. I have tested my Navion, Challenger 300 and Global Express XRS and they do not have this problem. I also tested the default Cessna C208 and it tests normal. So it appears the problem has something to do with recipricating aircraft.
Can anyone help with some advice as I am no expert in FDE?

Richie1935
 

Attachments

  • VS Indication Problem.jpg
    VS Indication Problem.jpg
    146.1 KB · Views: 579
If you are not that experienced, here's the easy solution. Try all the similar weight/speed planes in your fleet and find one with the autopilot you like the most, then compare and copy all the fields in table 1199 Secondary that have 'AP ALT' or 'pitch' in the title.



Back up your original air file first or write down every thing you change. You will most likely have to make some tweaks here and there, but be aware that it is possible the settings that worked great in one plane can totally suck in another.


Long story short, the person who made that airfile didn't take the time to fine tune the alt capture function. It starts reducing a long ways before it should. All of the default aircraft have those issues.


Good luck.
 
Two points that might help.

First all non-supercharged or non-turbocharged piston (normally aspirated) engines produce less power as altitude is increased, so you would expect either a reduced climb rate or a reduced speed at a fixed climb rate. The power reduction is due to density reduction with altitude and is modelled that way in FS.

Second, I believe that the FS autopilot, like a good real pilot, reduces rate of climb as a set altitude is approached so as to level out smoothly.

Roy
 
Joe,
1199 is for AI airplanes only. Says so in the ESP document I referenced. Also the only entries in the file apply to the AI heading hold and airspeed hold PID controllers

Check the last entry in the pistonsample.asm file

Roy
 
Last edited:
Roy and others,
Thanks for your comments and are well taken. I realised that after submitting the post that I remembered that you have to apply more throttle as the altitude increases inorder to maintain the climb rate. The one thing that I have a problem with and that is with most aircraft in FS is that they tend to overshoot the intended altitude but atleast 20 or more feet and then gradually reduce back to the desired altitude. If I remember correctly from my flight training days the rule of thumb on level out is 10% of the climb rate start to level off in other words if the climb rate is 500 fpm then start to level at 50' prior to reaching or descending to the desired target altitude.
I have not flown in real life for over 20 years so a person tends to forget some of the basic elements of flying.
I really appreciate the time taken to respond to the post.
Have a great weekend to all,

Richie
 
Joe,
1199 is for AI airplanes only. Says so in the ESP document I referenced. Also the only entries in the file apply to the AI heading hold and airspeed hold PID controllers

Check the last entry in the pistonsample.asm file

Roy

=)

Roy,

Have you not learned from our interactions to trust but verify? ;) 1199 is the only thing I ever use to tweak my autopilot. It is by far the best way to tweak the autopilot because it contains the parameters that the cfg file doesn't. Contrary to popular belief, there is only one autopilot system in FS and it controls both the user and AI autopilots. The AI will react to changes in the aircraft cfg [autopilot] section as well.

(Have not verified if they changed it in FSX, but both SDKs make the same claim. It is doubtful that they did. It is also possible that AirEd is doing something different than AAM.)


As a general rule with concerns to the sim engine, whenever I find something in FS that seems like it is wrong I first assume it is a bad input on my part, but when it comes to the documentation, I would recommend you confirm everything yourself. There are many mistakes, misstatements, and omissions.
 
Joe,
I was talking about its use in FSX and I should have made that clear

The .ini file for AAM says
1199=PID controllers for AI,record
1199h= The following PID controllers are utilized only by computer controlled (AI) aircraft system for heading and airspeed control||Formerly decoded as autopilot gain constants||FSX 15 sets of 7, previous FS version 16 sets of 7

The .ini file I have for AirEd says
[1199]

; 1199 as defined by FSX SDK - only used by FSX to assist in handling AI-controlled airplanes.

I lost interest in FS9 as soon as FSX came out so I tend to foget that some people still use FS9

Roy
 
Try playing with those values and let me know if they are in fact disabled. I have not seen a set of replacement entries anywhere in the new SDK which leads me to suspect it is not accurate.
 
Joe,

I found an earlier version of AirEd.ini
1199=*Autopilot/Secondary Aerodynamics,record
1199h= Not used after FS2K|Autopilot gain constants|FS2K has 112 elements, FS98 and CFS|16 sect, 7 param ea?

"Not used after FS2K" means that stock models after FS2K did not use 1199. It does not mean that you can not use them in FS9, because FS has built-in backward compatibility. I believe that means you could import a FS2K model into FS9 and it would still work, but in native FS2K mode in some areas.

In FSX most of 1199 contains zeros and the two sections with data (heading hold PID constants and speed hold PID constants) do appear to be in about the same places in the table as that in the FS2K table.

I prefer, since I only work with FSX/FSXA, to only have air file entries that the stock models have, but that is just me.

Roy
 
A lot of the stock models omit entries or have blatant errors. It's like they assigned an intern to make the air files.


stock models after FS2K did not use 1199.

That's just not true. The stock airfiles are populated with controller inputs, although inputs that lead to bad performance. Editing them affects how a stock aircraft's autopilot behaves.

Additionally, these fields cannot be edited anywhere else:

HDG roll rate
HDG hold gain
HDG rollout
HDG feedback rate
ALT hold pitch rate
ALT hold tolerance
ALT feedback rate
ALT capture damping
VERTICAL SPEED rate
NAV/ILS/GS lock gain/feedback/offset

and all the autothrottle entries as well.

Pretty much everything you need to tweak the default autopilot is in 1199. The autopilot section in the config file is barely useful.
 
...one more note...

I used to do the flight dynamics for AI Aardvark's MD80/DC9 series as well as some of there re-released versions of the 757/767 back in 2002-2005. They asked me to do them because my AI seemed more natural than anything they had previously. I was able to get that performance by treating AI and user files alike. The AI and the user aircraft share the exact same aero details in the airfiles, but can only utilize the autopilot and have a set profile for takeoff, climb, and descent...that's the extent of the difference

Realizing this, I fudged the weight and thrust numbers to match normal operational conditions and force the autopilot to set thrust and pitch similar to the real world aircraft and achieve pitch-to-climb rates that matched the real world equivalent. It is very rare for a commercial jet in the real world to use 100% of it's available power for takeoff, and as for weights, they are more likely to be climb weight or temperature restricted than to takeoff at MTOW.

This was all in light of the fact that the SDK stated that certain parameters were for user aircraft only and others were for AI only. The SDK is flat out wrong in this regard. Everything from the AI's ability to navigate, climb, and capture the LOC realistically, all the way to the final approach pitch and speed and float in the flare are set in the same manner as a user aircraft. Takeoff roll distance, rotation rate...you name it.

The reason we see AI that fly like crap using user .air files is because the autopilot is setting the power differently than the user, or extending flaps on a different schedule etc. User takeoff power might be 93% while AI takeoff power might be 120%. As long as these things are accounted for, the same air file entries apply to the performance of both.
 
Joe,
My statement about stock aircraft was incorrect at least where FSX aircraft are concerned and I apologize for my error.

I had a look at 1199 in the FSX Learjet and it had what looked like the entries you mentioned. So it does not seem to have been changed for FSX.

However the statement that 1199 in FSX is only there for AI heading and speed control could well be true. If it is true, the FSX does not need 1199 for control of the autopilot.

So I got airborne in the Learjet, selected autopilot and checked out the speed, altitude and heading hold modes. Then I opened its air file in AAM, deleted 1199 and saved the file. Back in FSX I reloaded the aircraft and checked out the autopilot again. Worked like it did before. So, FSX does not need 1199 for control of the autopilot.

Based on the statement in the older AirED.ini that 1199 was not used after FS2K, I'm inclined to think that FS9 does not need it either. You might like to do the same test in FS9.

The phrase "not used" should probably be "not required". My reason for saying this is that many "not required" air file entries have an effect in FSX, most likely for backward compatibility reasons.

Another reason for keeping 1199 even though it is not required by FSX could be to have data that can be used to reconstruct a config file autopilot section that has been corrupted or has missing entries.

To prove this point, I deleted the nav and GS PID entries in the Lear config file autopilot section so that there was nothing between max_throttle_rate and yaw_damper_gain. Then I renamed the air files such that the original one (with 1199) would be in use. in FS I reloaded the aircraft and then had a look at the config file. I now had new nav and GS entries, but after yaw_damper_gain. FS had written necesssary parameters in the config file and, presumably got them from 1199 or so I thought at the time.

To check that theory, I saved the config file that that had the nav and GS entries deleted and renamed the air files so that the one with no 1199 was in use. Reloaded the aircraft and had a look at the config file. The nav and GS entries were again written by FS and had the same values as before. They obviously had not come from 1199, so my conclusion is that FS has default values that it uses to fix corrupted or missing config file entries.

In Zyskowski's paper under Backwards Compatibility he says, in the context of what happens when an aircraft, developed in an older version of FS is used in a new version, "we quietly upgrade their old aircraft behind the scenes". I believe that means FS will add config file entries, required by the new version, that are missing in the old aircraft. In the same way, it will add back required config file entries that are missing because they have been deleted. The values in these entries must come from defaults in FS.

The ESP document about air files says that the AI PID controller table (1199) is "optional" and my test proved that.

However, I do not know whether it has any effect on the autopilot if it is present and has been edited. The ESP document was the first official statement from Microsoft on the subject of air files. It contained details about 1199 only for two sections, so there is no official description of the other sections which had zero values in that document. The AirEd.ini file I have splits 1199 into sections and indicates which lines apply to the various PID control values for the proportional, integral and derivative constants and their boundaries. I'll have a look at what AAM does, and study it before I do any experiments.

Thanks for prodding me again into looking below the surface

Roy
 
Another thread discussed the effects of changing the aircraft ge0metry in the .cfg file. If some lines are omitted FSX adds them back with meaningless values of 0.0, but the aircraft still continues to fly OK.
 
Last edited:
Joe,
I thought it would be interesting to lay out the Lear 1199 in the same format that was used in the ESP document, it makes it easier to see which values relate to the individual PID constants I then filled in the values from the Lear.
;**** PID CONTROLLERS *******************************************************
;The following PID controllers are utilized only by computer controlled (AI) aircraft system for heading and airspeed control
TOKEN_BEGIN AIR_AP_PID_CONTROLLERSF
AIRFILE_PID <0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000> ; UNUSED
AIRFILE_PID <1.8, 0.0, 0.0, 1.5, 2.0, 0.0, 20.0> ; head_hold pid_p, i, i2, d, i_boundary, i2_boundary,d_boundary
AIRFILE_PID <0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000> ; UNUSED
AIRFILE_PID <0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000> ; UNUSED
AIRFILE_PID <0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000> ; UNUSED
AIRFILE_PID <0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000> ; UNUSED
AIRFILE_PID <0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000> ; UNUSED
AIRFILE_PID <0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000> ; UNUSED
AIRFILE_PID <0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000> ; UNUSED
AIRFILE_PID <0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000> ; UNUSED
AIRFILE_PID <0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000> ; UNUSED
AIRFILE_PID <0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000> ; UNUSED
AIRFILE_PID <0.35, 0.002, 0.0, 8.5, 10.0, 0.0, 80.0> ; airspeed_hold pid_p, i, i2, d, i_boundary, i2_boundary, d_boundary
AIRFILE_PID <0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000> ; UNUSED
AIRFILE_PID <0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000> ; UNUSED
TOKEN_END
Translating the AAM format into the above format and using AAM numbers and comments we would get this for the LEAR 1199, though it has an extra set (16 vs 15 above). The columns appear to relate to PID constants: p, i, i2, d, i_boundary,i2 boundary and d_boundary

LEAR 45
TOKEN_BEGIN AIR_AP_PID_CONTROLLERSF ;AAM comments except for sets 2, 6 and 13.
AIRFILE_PID <800.0000, 0.000000, 0.000000, 4.000000, 30.00000, 0.000000, 30.00000> ; Hdg hold rate?
AIRFILE_PID <1.800000, 0.000000, 0.00000, 1.500000, 2.00000, 0.00000, 20.00000> ; head_hold pid_p, i, i2, d, i_boundary, i2_boundary, d_boundary
AIRFILE_PID <5 E-5 , 0.000000, 0.000000, 0.000200, 1000.000, 0.000000, 1000.000> ; Alt hold
AIRFILE_PID <40.00000, 0.000000, 0.000000, 10.00000, 10.00000, 0.000000, 10.00000> ; Alt Rate FB?
AIRFILE_PID <1.4.0000 0.100000, 0.000000, 0.400000, 5.000000, 0.000000, 2.000000> ; Nav lock
AIRFILE_PID <0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000> ; UNUSED
AIRFILE_PID <3.900000, 0.000000, 0.500000, 0.000000, 0.700000, 0.350000, 0.700000> ; Gs Lock/gain/Offset
AIRFILE_PID <110.0000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 200.0000> ; Pitch rate FB
AIRFILE_PID <30.00000, 0.000000, 0.000000, 0.000000, 40.00000, 0.000000, 40.000000> ; set 9 Unknown
AIRFILE_PID <0.00000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000> ; set 10 Unknown
AIRFILE_PID <0.00000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000> ; set 11 Unknown
AIRFILE_PID <700.000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000> ; Set 12 Unknown
AIRFILE_PID <0.350000, 0.002000, 0.000000, 8.500000, 10.00000, 0.00000, 80.0000> ; airspeed_hold pid_p, i, i2, d, i_boundary, i2_boundary, d_boundary
AIRFILE_PID <4.5E-5 , 0.000000, 0.000000, 0.000200, 1000.000, 0.000000, 1000.000> ; Set 14 Unknown
AIRFILE_PID <0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000> ; Set 15 TOGA? BUT UNUSED
AIRFILE_PID <1.0000, 0.025000, 0.090000, 30.00000, 1.000000, 0.000000, 25.00000> ; Set 16 Unknown
TOKEN_END

It is difficult to get the columns lined up, but I'll try and edit it after posting

I understand PID theory to some extent and the layout makes things clearer. For example set 3 with boundaries of 1000 is clearly altitude related and so is set 14.

I would appreciate your comments,
Roy
 
Last edited:
I love MS Flight Sim... partly because it's pretty good, and the rest because it's the world's most mysterious software package. lol


I agree totally with everything you stated above. 1199 is not needed, and the sim has a default built in airfile (probably based on Cessna, B737, B777, Concorde... the basic aircraft container types) that will insert missing entries, but the goal is to tune the autopilot to work with your airfile. Basic things like the first entry in your list "HDG HOLD RATE" are no where else to be found. That's a very important entry (number of degrees the autopilot will target within 2 minutes...2 minute turn heading rate, shouldn't exceed 360...) Altitude capture, pitch overshoot/hunting, bank angle, throttle hunting, etc, is all tunable in 1199.


If you are like most people who hate the default autopilot, 1199 contains much more detail than the config file does, and once you get the hang of the cryptic layout you know where to go to fix things. I made a reference document that outlines what everything actually does and will send it to you if/when I ever find it again.

Also, the 1199 entries affect the aircraft config entries, not meaning they trump the config (config is always King!), but meaning the PID entries in the [autopilot] section use 1199 as Constants if 1199 is available.


I will try to get familiar with the text format you posted and see if I can decipher it.
 
Slightly off topic, but FS9 has matching pairs of generic .air and .cfg files in FS9|Aircraft|Templates for a range of aircraft types. They include supersonic .cfg and .air files. It even includes a NOMODEL.mdl file, whatever that might be!

I can't find any equivalent files in FSX.
 
MGH
FS9 had an editor for config and air files and what you referenced was used by the editor. I forget the name of the editor, but I do remember it could REALLY screw up flight dynamics!

The editor was not included in later versions of FS

Now I remember, it was called FSEdit

Roy
 
Last edited:
Ed
I will try to get familiar with the text format you posted and see if I can decipher it.

I constructed a table using Excel a.jpg of which is attached. It makes the data easier to understand. For each set of entries there are columns for the PID constants and boundaries.

I also included the comments in AAM associated with the air file entry for the Proportional Constant to help you identify them.

Some of the sets are strange. For example Set 9 has 0 for Integral and Derivative constants yet has 40 for their boundaries. This makes no sense at all.
Set 7 looks a bit like the glide slope PID values in the config file, if so the config file should override the air file

The ESP Flight Models document has a nice description of what PID controllers do

PID stands for Proportional-Derivative-Integral controller, and is a feedback controller that takes an error for a controlled state and outputs a correction. For example, on an airspeed controller, the error would be the desired airspeed minus the current airspeed. The output is then determined by the sum of three factors using the error and the P, I, and D constants. The "P" factor is simply a factor proportional to the error. The "I" factor is an accumulated factor scaled by the error. The "D" factor is a factor based on the rate of change of the error.

"P factor" = P * error

"Accumulated I factor" = "Accumulated I factor" + (I * error * deltaTime), in Calculus terms, this is simply an integral. The error must reverse its sign to drive this accumulated factor to 0. This is characterized as oscillations, but drives the error to zero.

"D factor" = D * error/deltaTime. As the error gets smaller, this drives the output to be asymptotic towards the desired value.


Roy
 

Attachments

  • 1199 PID.jpg
    1199 PID.jpg
    172.3 KB · Views: 602
Last edited:
Back
Top