March 3, 200620 yr Is there a way in XML to determine which version of a specific aircraft you have chosen, when the aircraft.cfg contains several variations of the same machine?I was thinking about perhaps using the ATC ID as a way of determining, but that would mean I would have to "interpret" a string and compare it to a known, which I have no idea how to do.Any thoughts will be appreciated.Steve
March 3, 200620 yr I guess my question is why would you want to do that?I'm a bit absent minded myself and every once in a while I'll wonder whether I'm flying that Pan American or Eastern DC-4, but a quick cycling to and from the spot view solves that.But I think that you have some "ulterior motive" .... ??
March 3, 200620 yr I have different helicopter models, some with doors on and some with doors off. When the doors are off, the VNE and certain parameters change due to the radically different airflow over the fuselage. I need to be able to determine which model is loaded so that I can make "adjustments" to control responses depending upon which model is loaded.Steve
March 4, 200620 yr Hi Steve,I'm not aware that you can use something like "version numbers".So you need to differentiate between aircraft variants by something that you define in the aircraft.cfg and that you can read in XML code.ATC ID is one option, but you could also use things like max_weight (so each aircraft model has a specific max_weigth you can test, which differs lets say 1 pound per model)If you are using ATC ID, you can easily test for that like:(A:ATC ID,string) 'your_string' scmp if{ }Note that (if I remember correctly): scmp returns 0 if the string are equal, and 1 if not equal.Cheers, Rob
March 4, 200620 yr Greetings Steve,Although your question relates to the two helicopter flight models hard coded within FS9 the following has generic application.Even if you determine which MDL is loaded within FS9 it won't solve your problem. Within any flight simulator everything revolves around the flight dynamics, and within recent versions of MSFS increasingly around the aircraft.cfg component of its flight dynamics. Many MDLs, textures, panels, sounds etc., can be aliased from a single aircraft.cfg, but not vice-versa.This problem is compounded by Microsoft's decision to move an ever increasing proportion of the flight dynamics data from the filename.air to the aircraft.cfg.Within FS8 you could have solved your problem by coding one never exceed IAS within doors_on.air and a different value within doors_off.air. Then you could alias each status by matching model= and sim= from different [fltsim.n] headers of a single aircraft.cfg.However within FS9 structural limit data is read only from the loaded aircraft.cfg and never from the loaded filename.air. This is one of the reasons that FS8, CFS2 etc., flight dynamics must be rewritten before they become compatible with FS9. Within FS9 legacy flight dynamics will load but they will exhibit errors due to assorted missing data that was not read into memory. Much of the data still being included in uploaded air files said to be for use in FS9 is just legacy code from earlier versions. Such legacy code does no harm, but it won
March 4, 200620 yr >Is there a way in XML to determine which version of a>specific aircraft you have chosen, when the aircraft.cfg>contains several variations of the same machine?>>I was thinking about perhaps using the ATC ID as a way of>determining, but that would mean I would have to "interpret" a>string and compare it to a known, which I have no idea how to>do.>Steve There are several strings which are obtained from the particular AC situation currently running from aircraft.cfg. Here are two of them: %((A:TITLE,string))%!s! %((A:ATC ID,string))%!s! I see all these variations apply to 'ATC' alone:"ATC MODEL" "ATC ID" "ATC TYPE" "ATC AIRLINE" "ATC FLIGHT NUMBER" 'TITLE' might be appropriate, though there are others than can be used to define which version is running. Note different AIR files can be used to set different drags, etc., though anything in aircraft.cfg takes precedence. Cdo is not set in aircraft.cfg, so a variation in the AIR file (REC 1101) setting would make a difference. Ron
March 4, 200620 yr Steve,""I was thinking about perhaps using the ATC ID as a way of determining, but that would mean I would have to "interpret" a string and compare it to a known, which I have no idea how to do.""Maybe this thread could give you some help:http://forums.avsim.net/dcboard.php?az=sho...d=25696&page=13Tom
March 4, 200620 yr I used Robs example and it worked great. Just comapring the ATC ID is all I needed.Thanks guysSteve
Create an account or sign in to comment