.air file creation

For topics related to the creation of simulation objects (SimObjects). This includes development of aircraft, ground, and maritime vehicles.
Locked
sxa1376
Posts: 73
Joined: Sun May 01, 2011 8:44 pm

Post by sxa1376 »

Hellow guys i was reading the p3d sdk and i want to ask a question. If i have create an aircraft.cfg how i can use the " asm2air " in order to create a .airfile? Many thanks in advance.
beatle
Posts: 88
Joined: Thu Sep 16, 2010 8:34 pm

Post by beatle »

Hi sxa,



As to creating .AIR files, they aren't created from the aircraft.cfg file, that is a seperate file required for a valid SimObject. There are some data items that can exist in either the .AIR file or the aircraft.cfg file (the .cfg file will take precedence if both available). To create an .AIR file, you need to create an .ASM input source file (there should be a sample one of these in the SDK) and then run that through the ASM2AIR program. Most of the data in the AIR file is in interpolation tables (torque curves, throttle response curves, etc).



Tim
sxa1376
Posts: 73
Joined: Sun May 01, 2011 8:44 pm

Post by sxa1376 »

Hello Tim and thanks for your responce. A couple of days ago i discovered in web a utility called " Airwrench " which i think it must be very helpfull. Now using this utillity i have created my first edited airbus. I have create an empty .air file and then i modified the aircraft.cfg of the visual model i am using ( ifdg a320 epr ) and then with the help of airwrench i have created a new aircraft.cfg and an .air file.
sxa1376
Posts: 73
Joined: Sun May 01, 2011 8:44 pm

Post by sxa1376 »

Also i want to ask one more thing. I have start to build an a320 and i need to know a few things. I check the .air file of the commercial aircraft you have inside airplanes ( the a321 ) and it has only 58 records. In order for my a320 i need only these 58 values to create or i must create all 130 values for the aircraft to fly fine? And for last in fuel and weight and ballance section of the aircraft.cfg that i will create i have the values in kgs and i will convert them in pounds so for each kgs how many pounds the p3d is reading ( for weight and for fuel if the fuel is Ajet 2 )? Many thanks in advance.
Legacy Support
Posts: 474
Joined: Mon Aug 16, 2010 7:22 pm

Post by Legacy Support »

Hi,



We do not ship the A321 with Prepar3D as a flyable model. I am unable to answer your specific question, but hopefully someone else will be able to jump in.



Regards,

John
FSMP
Posts: 678
Joined: Sat Sep 25, 2010 9:38 am

Post by FSMP »

Ref: Airwrench. Neat utility for editing .air files --- but



Air files are created by addon developers, and tend to be Copyright, and their content typically contain proprietory , copyright tables & data.

They are created from the developers original .asm file. (in an ideal world !! )



If you take someone elses .air file, amd modify it with AIrWrench, for your own product, then you are potentially violating their copyright.

There have been quite a few heated cases where one developer has been accused of using another developer's .air file data. even if the developer who copied it, made a few changes.



This may not appy to what you intend to do, but you should be aware of the potential issues when using a program like Airwrench, to modify someone elses .air file.



In the extreme, its like taking a proram file (an .exe), hexediting a few bytes in it, and then calling it YOUR program. If you then try to sell it, you can easily run into legal issues etc etc.



If you generate your own .air file, from your own .asm file, then at least you have the .air file (SOURCE file), to help prove that the resulting .air file was your own creation.



Geoff
fanavion
Posts: 10
Joined: Sun Jan 23, 2011 4:36 pm

Post by fanavion »

Air Wrench is not an editor. It creates new .air files from input data like geometry, weight, engine data etc. and some qualitative handling characteristics. Main feature is that it computes stability and control coefficients (derivatives) used in the .air file. Naturally .cfg files will be rather edited as they contain mostly these data mentioned above (some exceptions like MOI, though).



So theoretically one could use any .cfg and .air files without infringe copyrights , if one modifies or checks ALL input data from one´s own non-simulator sources.



If one wants to edit an .air-file one can use the freeware Aircraft Airfile Manager (AAM). That would be helpful if one does not like the results from Air Wrench. Make shure not to run Air Wrench again as the computed records will be written over again.



An idea may be to set ALL records from any .air file at hand to zero with AAM and use it then copyright- free with Air Wrench.



These programs are written for Microsoft FSX or earlier versions and I´m not sure if these programs run properly with Prepar3D without some workaround because of a different file structures /names.



@Geoff



Is the usage of sample .cfg and .air files from the Prepar3D SDK free to use as templates for commercial products ? If not, at least for freeware ?



Carl

Legacy Support
Posts: 474
Joined: Mon Aug 16, 2010 7:22 pm

Post by Legacy Support »



Quote:
Quote from fanavion on October 7, 2011, 13:42

Is the usage of sample .cfg and .air files from the Prepar3D SDK free to use as templates for commercial products ? If not, at least for freeware ?



Yes to both.
fanavion
Posts: 10
Joined: Sun Jan 23, 2011 4:36 pm

Post by fanavion »

Thanks John,



but to be 100% sure: Free to use applies to both?



Going further: Is asm2air.exe free to be shipped together with an editor, commercial or freeware ?



Carl
N4GIX
Posts: 617
Joined: Wed Dec 08, 2010 6:52 pm

Post by N4GIX »

I have noticed that every one of the sample .asm files has the same three include statements, but curiously none of the three .inc files seem to be actualy provided:

Quote:
include asm.inc ; include this in ALL .asm files!

include airtoken.inc ; definitions of token macros

include sim1.inc ; definitions of token values

Bill Leaming
Modeler and Programmer
Military Visualizations
Legacy Support
Posts: 474
Joined: Mon Aug 16, 2010 7:22 pm

Post by Legacy Support »



Quote:
Quote from fanavion on October 11, 2011, 17:53

but to be 100% sure: Free to use applies to both?



Yes. You could use those files in commercial and freeware.



Quote:
Going further: Is asm2air.exe free to be shipped together with an editor, commercial or freeware ?



No. But if there is a specific circumstance in a commercial setting, you can PM me and we can discuss.
fanavion
Posts: 10
Joined: Sun Jan 23, 2011 4:36 pm

Post by fanavion »

Thanks. I´m in a very early stage of a feasibilty-study so this information is sufficient for now. I will come back to your offer should such a circumstance arise.



sxa1376
Posts: 73
Joined: Sun May 01, 2011 8:44 pm

Post by sxa1376 »

Hello i was reading the jetsample.asm file and i have some questions. Inside there i have recognise some sections, for example this section :



;Elevator effectiveness scaling table (max 7 entries)

; IN: Elevator angle (radians)

; OUT: Effectiveness scalar

TOKEN_BEGIN AIR_ELEVATOR_SCALING

UINT32 7 ;NUMBER OF ENTRIES



REAL8 -0.349, 1.0 ;-20 DEG

REAL8 -0.262, 1.0 ;-15 DEG

REAL8 -0.175, 1.0 ;-10 DEG

REAL8 0.0, 1.0

REAL8 0.175, 1.0 ;10 DEG

REAL8 0.262, 1.0 ;15 DEG

REAL8 0.296, 1.0 ;17 DEG



i think this must be the " 341 "? but about the most of them i can not recognise them. I saw that the result jetsample.air file had 71 records but the record "1101" is missing so this is not recuired any more in order to create a new .air files? Maybe if i want to create an a320 i can use this airfile and only add the missing " 1101 " record? Can you please provide a manual about how someone can create or edit an .asm file in order to create an .air file for his needs? For example i want to edit the jetsample.asm to use it for my a320 project so which records i must need in order to do that? And inside .asm file can you provide an explanation of each section what is the corresponding record inside the .air file and how this section is working and how i can estimate the values in each section? Any detailed explanation would be very appreciated. Now i want to ask something else. For my project i currently using a payware a320 which is acting very well but it has the following error. When in flight in cruise level with the auto pilot on the nose pitch is always to 5 degrees up but this is wrong because in reallity the nose pitch of the a320 when in flight level with the auto pilot on is always about 2.5 degrees up no matter the weight load so i want to ask in order to fix this which records are responsible inside the air file or the aircraft.cfg? Any help would be really greatfull. Many thanks in advance.
User avatar
aeronauta
Posts: 1661
Joined: Sun Oct 23, 2011 1:56 am
Location: Melbourne, Australia

Post by aeronauta »

From the P3D docs Air file format....



"the include files are part of Asm2Air.exe so they are not needed as separate files."



regards Jorge
Jorge Roldan
OZx Developer (aero) - Hovercontrol Helicopter Certified Pilot - Spad.Next Beta Tester - VATPAC Pilot PR
System i9-9990 4.7Ghz 32GB W11 Nvidia GeForce RTX 2080 8GB
N4GIX
Posts: 617
Joined: Wed Dec 08, 2010 6:52 pm

Post by N4GIX »



Quote:
Quote from aeronauta on October 27, 2011, 00:54

From the P3D docs Air file format....



Thanks. Somehow I managed to miss that when I read the docs... :o
Bill Leaming
Modeler and Programmer
Military Visualizations
Locked