February 28, 200521 yr Hi@all,i am programming a small tool for FS2004, where i need to know whether an aircraft is flyable or only ai.I know it is listed in the airfile of the aircraft but it is a binary file.Does anybody know how to readout this data?Thanks a lot...
March 9, 200521 yr This is how I do it: aircraft file is broken into records, where the record itself contains the header, record length and actual data. First 4 bytes specifies header, and next 4 bytes is the length.I read the first eight byte to get the record type and length. If the type is &H0105 (261), then its "Aircraft Type" flag (0 is flyable, 1 is heli, and 2 not-flyable). If not, skip the record (we know the record length) and move into the next header. Loop till end of file, or value found.
March 10, 200521 yr Hi Rana,many thanks to your reply.I understood your algorythm, but first I had some problems to read out four bytes and convert them to an integer or hex in JAVA.But now it works fine.Many thanks to youCU Zilchinger
Create an account or sign in to comment