Sign in to follow this  
scott967

aircraft.cfg vs .air file

Recommended Posts

Could some one provide a pointer or quick overview of the relationship of the aircraft.cfg to the .air file? Is the idea that the aircraft.cfg is to override values in the .air file? Maybe to allow several aircraft.cfg to share a single .air file?While on the subject, is there a problem if contact points or other parameters don't match the .mdl that well? I have some aircraft where in particular the scrape points are no where near the .mdl, but often the gear aren't that close either.scott s..

Share this post


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

*Most* important variables are now contained in the aircraft.cfg file. To give you an idea, take an FS2000 aircraft, copy it to FS2002, and open it in FS2002. Then compare the "original" FS2000 aircraft.cfg and FS2002.cfg files. You will see that FS2002 has added lines to it, taking the values from the FS2000 air file. From that point on, aircraft.cfg values override the *.air file.Contact points, scrape points, etc., are come of those variables.It's good practice, though, to keep the *.air and aircraft.cfg files "in synch".Ideally, your aircraft.cfg scrape and contact points should match the visual model, otherwise you can have a model digging into the ground while still "flying" because it's points are set too high, etc. (exaggerated example..) If your tire contact points are set too far back, you might be "landing" before the visual tires are actually on the ground...:)

Share this post


Link to post
Share on other sites

Hi there:I agree with the above; most of my tweaking (all for AI purposes) I do in the aircraft.cfg files and it works fine in most cases.Along the same lines I have come across a riddle myself: does the .mdl file have a direct influence on aircraft flight behaviour? I was under the impression that the .air/.cfg file combination, while based on the aircraft model/specs, controls the flight behaviour whereas the .mdl file controls the visual model only. But here's what's happening:I have two aircraft with exactly the same .cfg/.ai file combinations, save for the fltsim and contact points sections. In AI mode, one flies differently (faster) than the other. Moreover, I used the same setup for more than a dozen different aircraft (it's a project for making helicopters usable as AI so they all need completely new .air/.cfg files) and the aircraft fall into two different groups with exactly the same flight behaviour; one climbs and cruises faster than the other.My only explanation is an "outside" influence from the .mdl file! Any ideas?Cheers, Holger

Share this post


Link to post
Share on other sites

Thanks. I have been looking at side-by-side of aircraft.cfg and .air files. Of course, there is a lot of stuff in the .air files that aren't visible in the aircraft.cfg. I guess if trying to fix flight dynamics, first play with the aircraft.cfg parameters.I see also in the amphibians that there is a static and "loaded" contacts for the floats. I guess that is to determine where the waterline will fall in the visual model when on the floats.scott s..

Share this post


Link to post
Share on other sites

"My only explanation is an "outside" influence from the .mdl file! Any ideas?"I am almost certain it does. I think the reason for this, is that the COG seems to be pulled from the model's point of origin. If you have one model where it's point of origin is 10-20 feet different than another, all sorts of weight and balance issues might arise, which could require more power at cruise and other quirky flight qualities.

Share this post


Link to post
Share on other sites

Though the relationship is not a complex one, the intricacies are.THE .AIR FILEThe .air file makes up the flight dynamics of the aircraft. It consists of many records types. Many records are for older sims and CFS variants and are unused in FS2002. Specifically which records are used in 2002 depends on which records exist.FS2002 added new records to the .air file which if present, supercedes other 2002 used records or data elements in some records.There can be multiple .air files defined in one Aircraft folder. This is useful especially if you have multiple .mdl files in one folder representing 2 similar models that share textures, panels, sounds, but have different visual characteristics. (i.e. an aircraft with and without armaments for the visual model, and has different weights and flight dynamics as a result of the added weight.)THE AIRCRAFT.CFG FILEThe aircraft.cfg file is used primarily to provide easy overrides to certain .air file records or specific data elements in records. If, for example, the contact points are defined in both, the .cfg file overrides the .air file record.The relationship therefore seems clear that the .cfg file parameters override the .air file parameters.There can be only one .cfg file in the Aircraft Folder.THE .MDL FILEThe .mdl file simply provides a visual model for the sim. However, the sim must interact with it for animations, lights, effects, etc. to work correctly.Of course if the .mdl and .cfg files aren't matched, then the effect will be improper animations, incorrect crash points, misaligned lights, possibly improper flight characteristics for the visual model.A good example of how things can go wrong, even on matched .mdl/.cfg files is as follows. The nose wheel is defined and animated in the .mdl file as having 6' of total suspension compression. On the other hand, the .cfg file shows the nose wheel to to have 6" static compression and another 6" to max compression. As the sim tries to go toward 12' of compression, the visual model bottoms out at 6", the wheel then goes 6" into the ground to accommodate the .air file parameters.Similarly, if the nose wheel is 70" forward of the CoG, yet the contact points show 90", the nose wheel suspension compression will not work correctly.If crash points are defined for the wings at 60 feet, and the visual model wing is only 20 feet, you will run into buildings with a 40 feet clearance.If the CoG in the .cfg does not match the .mdl, you will see suspension compression while the aircraft is still above ground, or the wheels will settle underground. Another example is the aircraft sits with wheels above the ground or below ground.The .mdl and .cfg files always work best when they are matched especially from the visual model reaction to the .cfg file parameters.Milton

Share this post


Link to post
Share on other sites

The visual model location and behavior is really controlled by the how it is defined in the .air/.cfg files.The idea is that the designer must define the visual model characteristics in these files so that it appears and reacts correctly in the sim. Mismatches will make it appear unrealistically.The way I think about the sim is this.The sim engine is the hub of a spoked wheel interconnecting all the other sim functions through these spokes.In each of the functions there are triggers and there are reactions.In the panel/gauge function, click the flap lever (trigger), the sim recognizes this, alerts the sound function, the audio is heard, alerts the visual model function, the flaps deploy, alerts the flight dynamics function, lift and drag are "felt", in turn, affects to speed, altitude change, in turn, gauges change, etc.I see the sim engine at the hub as the communicator among all functions, triggers, actions, reactions.So, the model is primarily passive, or a reactor to triggers. The sound function I believe to be the same, a reactor to triggers. Most all other functions can trigger and react to triggers.The .mdl visual model is told what to do based on all the other triggers from other functions. Things like crashes actually occur from the .air/.cfg definition of where the visual model is(flight dynamics function).Hope this helps as my general understanding of how it may work. :-)Milton

Share this post


Link to post
Share on other sites

Hi John and Milton:thank you very much for the concise and helpful explanations! Milton, you should place your message in the Tips and Tricks forum because I'm sure this topic will come up over and over again ;-)In your words, Milton, the model reacts to the input from the .air/.cfg files and other sources. In our case, there appears to be an input from the model that overrides, or at least alters, the input from the .cfg file. John's idea of the COG being responsible makes a lot of sense to me; are there other possible reasons?Milton, it's funny to hear from you today as I just worked on setting up your wonderful Dash-7 as AI. After many trials, I finally decided to abandon the original Dash7 .air file and substituted with the KingAir 350 files - the cheap way out, sigh. It flies very nicely but still has troubles on the ground; the main gear is very bouncy (soft springs?) and makes the aircraft wobble quite a bit ;-) I tried different spring loading factors (using Tom Goodricks formulae) which helped with achieving a smooth landing but didn't stop the wobbling. Your example of the suspension compression made me smile - perhaps another case of trying to make the model do what it can't do. But I'll keep trying ;-)Thanks again. Cheers, Holger

Share this post


Link to post
Share on other sites

John,Regarding AI:I don't use AI aircraft on this 350mhz due to frame rates, but I do know that they are treated differently in performance and takeoff and landings. Generally they are faster at cruise it seems and landing characteristics seem to be amplified. This is not the .mdl influence, rather the AI engine compensations to the .air/.cfg I believe to manage them with less precision and frame rate requirements.I've been working with a gentleman in Australia on the AI Dash 7 and it should be released any day now. He found the Dash 7 landed great, all animations worked, except on certain airports.I suggested certain changes to the drag and thrust scalars and it corrected the problem of landing short and being a little wobbly. He has done all the AI work, I simply helped him a bit with minor issues.BTW, I used Tom's formulas too for the .air file setup, but you should know that the contact points 0-2 override these numbers with the static compression, max-to-static, and damping numbers.I also optimized the Dash 7 for AI and MP removing over 40,000 poly's. You are welcome to that model if you like, or you can await release of the AI Dash 7. The AI unit will continue to use all the available add-on textures (over 40 I think.)Regarding CoG:The FlightSim really just flies the .air/.cfg or flight dynamics. The only real relationship of .mdl CoG and FD's is to make the visual model look realistic and place the visual model exactly where the FD's say it is. The CoG in the model is therefore carried over to the .cfg.The FD's must describe the visual model precisely for realism. I get my measurements from gmax so the model geometry is stated precisely in the .air/.cfg file. This ensures the two are in synch. If I animate 10" of movement in the suspension, then the .cfg contact points must show 10".I hope this helps.Milton

Share this post


Link to post
Share on other sites

>I have two aircraft with exactly the same .cfg/.ai file>combinations, save for the fltsim and contact points sections.>In AI mode, one flies differently (faster) than the other.I think it has already been said here that the .mdl does not affect actual flight characteristics, but that if the .mdl and .cfg don't match up properly, then you will find that the scrape/contact points don't appear to work properly, plus animations might not match up. To test this, try taking all the scrape points out of the .cfg, and then watch as you can now fly your aircraft underground (at least above sea level).Your observation about AI aircraft having identical .cfg/.air files and yet they operate at different speeds is interesting. When you set up AI aircraft, one of the parameters you set is the cruise speed, which is used to calculate how long it takes the aircraft to fly a flightplan. You can play with this number a lot - if you give the Cessna a cruise speed of 2000 knots, it will actually fly that fast on flightplans - BUT not while it is in the simulation (makes sense?). However, FS might take this number into account when the aircraft are actually flying in the simulation.So, if you have one aircraft with a cruise speed of 100 knots, and another with one of 120 knots, FS tries to make them fly at this cruise speed when they are actually in the simulation. The idea is that FS doesn't necessarily know what the ideal cruise speed for an aircraft is, and it doesn't just fly them all around at top speed. Also, AI aircraft do not take into account fuel weight, so there's one part of your .cfg file that is ignored already. Well, it's not exactly like this, and some of it is conjecture from other postings in the forum, but it does illustrate that AI performance may not reflect the actual aircraft performance sometimes. - Martin

Share this post


Link to post
Share on other sites

Thanks Milton, that helps a lot. So I guess you could set up multiple .air files, say for P&W vice GE engines, and leave the turbine engine data section of the aircraft.cfg out and the sim would use the data(say from record 1501) of the respective .air files?I've been looking at the contact points, scrape points, and basic geometry (CG, ref point) of various aircraft, default andaddon. Some appear really offset. From just a little playing around I see that getting gear to work right is a real pain. Some designers have wheel radius much different from the .mdl. Is there some reason for this?scott s..

Share this post


Link to post
Share on other sites

That's correct on the multiple .air files.The reference point is typically found at or near the CoG in FS .cfg's. However, the engineering drawings I have seen usually have the reference point at the nose of the aircraft. The AC520 shows it at the first rib station of the aircraft nose.If you have an engineering drawing with measurements, the reference point in the aircraft.cfg allows you to use them rather than basing everything from the CoG.Getting gear to work well is challenging even if you have the model measurements with animation movements. FS makes it more confusing the way the compression numbers are stated.You will find that many folks will adjust the wheel radius to place the aircraft properly on the ground because they lack the other precise information. Ya gotta do what ya gotta do. :-)Unfortunately it takes the correct combination to get the suspension right, while keeping the tires from sinking into the runway. I think you'll find some take measurements from the CoG to the hub of the wheel (correctly) but forget to do this when the model is at a keyframe representing static compression. If done correctly, adding the correct wheel radius will put the wheels on the tarmac (assuming the CoG is stated correctly).Regarding other contact points, it is very easy to forget them. I forgot to adjust crash points (I think) on my recent release that had a longer fuselage by 12+ inches.A little well known trick to help verify these points is to use the Lights section of the aircraft.cfg. Choose a strobe or recognition light, set its coordinates to the nose wheel hub and see where the FD's think it is versus where the visual model shows it. This will help with proper adjustment of the FD's to the visual model for any contact points.Milton

Share this post


Link to post
Share on other sites

thanks. That is a nice tip on using lights! I'm still at the stage of looking at various visual .mdl vs the .cfg/.air files to see what is going on. I see getting the gear right is more complicated than it seems at first blush. scott s..

Share this post


Link to post
Share on other sites

One thing you guys are forgetting, is that the COG & Ref points specified in the .air/.cfg are RELATIVE to the .mdl's reference (0,0,0), which can have a BIG impact on flight dynamics if you try to use two different models with the same .air/.cfg files as JohnCi did above.John, this is why you observed to different cruise speeds. The one model "felt" additional drag due to improper CG envelope. Further, the thrust vector of the engine.0 var was probably off.cheers,Stick

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