PDA

View Full Version : FSX traffic files time format?


garfield_x
30 Nov 2006, 08:54
I noticed that in the FSX traffic BGL files the time format/structure has been changed.

Has anyone already information about this structure?

lc0277
30 Nov 2006, 09:40
Yup.
I'm actually coding a software to create/manage AI boats schedule, but the boat BGL traffic format is very similar to aircraft.

The AI times are now 32 bits. The lower 24 bits is relative time in period (0 = beginning of period, 2^24 = 16777216 = end of period). The period is encoded in the upper 8 bits :
0 = 1hr, 1 = 2hr, etc up to 7 = 1 week. New periods are available : 2 weeks, 5 weeks and 8 weeks. Periods now begins on monday morning (not sunday).
I've not experienced so much but the reference date for multiple week periods seems to be the first monday of the year.
To get the time in hour, it's just like FS9 times: divide the relative time by 16777216 and multiply by the period duration

The new time format is used in schedules and in crossing sector tables. Since the structures are now bigger, the database were affected new ids so that FS9/FSX traffic files can be easily distinguished.

garfield_x
30 Nov 2006, 12:40
thx i will look on it.

I'm busy with converting my ACA2005 to ACA2007 with FSX support.

Mace
29 Dec 2006, 19:01
thx i will look on it.

I'm busy with converting my ACA2005 to ACA2007 with FSX support.


Keep in mind, that in the initial FSX SDK release, the date values (Monday, Tuesday, etc.) appear to have been listed incorrectly. I have not yet checked to see if this was corrected with SP1.

Our flag avatars look about the same as your all's...Missouri flag vs. French flag. vs. Dutch flag. :)

Mace
31 Jan 2007, 20:14
Periods now begins on monday morning (not sunday).


I believe that is correct. And isn't that a change from FS2004? in FS2004, wasn't 0 = Sunday, 1 = Monday?

I have done further research into this matter, and I have found that in the FSX SDK, it says 0 = Sunday, 1 = Monday, etc. The SDK is incorrect here, and you are very correct.

In FS9: 0 = Sunday, 1 = Monday, etc.
*****In FSX: 0 = Monday, 1 = Tuesday, etc.*****

If this is true, (and I believe that it is), when converting FS9 AI flight plans to FSX, you have to make sure you subtract 1 from the date, and change 0 dates to 6. (0 was Sunday in FS9 but now in FSX 6 = Sunday.)

lc0277
01 Feb 2007, 04:46
The SDK is also missing the definition of new periods (TWO_WEEKS, FIVE_WEEKS, EIGHT_WEEKS) which is to my mind the major improvement of AI in FSX. Most real airlines schedules are bi-weekly and could now be correctly used in FS.

It's also missing the very interesting international slang words list, used to prevent G-OOFY or F-UCKE to be valid ac registrations :laughing:

garfield_x
15 Mar 2007, 05:36
Finally found time to work on the time format and managed to get it working.
Thx.

The new time format is used in schedules and in crossing sector tables. Since the structures are now bigger, the database were affected new ids so that FS9/FSX traffic files can be easily distinguished.

I do not get this. Where or how i can see what BGL file is for FS9 or FSX?

lc0277
15 Mar 2007, 06:13
I do not get this. Where or how i can see what BGL file is for FS9 or FSX?

[/quote]
By looking at the DatabaseID field of database descriptors. The database descriptors appears just after the 168 bytes BGL header.

ID =
1 = Airports (FS9/FSX)
2 = Aircrafts and boats (FS9/FSX)
3 = Flightplans (FS9)
4 = Traffic sectors (FS9)
5 = Flightplans (FSX)
6 = Traffic Sectors (FSX)
7 = Boat routes (FSX)

A FS9 traffic compiler (TTools or FS9 TDBB) wil generate only databases 1,2,3,4 in a file
whereas a FSX compiler will build 1,2,5,6 or 2,5,6,7 for boat traffic.
The format of records in a database #5 (FSX plans) is just the same as #3, excepted that time records are 32 bits instead of 16. The same rule applies for db #6

garfield_x
15 Mar 2007, 06:21
I got it, thx a lot!