basdon.net aviation server


IP: basdon.net:7777 (How to join)[Log In]

Articles > Internal docs > File formats > Flight file format

Flight file format

This is the specification of the .flight file format used to store mission flight data.

byte 0: version
byte 1-3: 'F', 'L', 'Y'

The rest is dependent on the spec version:

Version 6

byte 4-7: mission id (DWORD)
byte 8-9: flags (WORD)
	right to left:
	bit 1: mission start packet received, if this is unset it
	       means that these flags were never set correctly
	bit 2: has_bank_and_pitch (since it was added in v4)
	bit 3: has_altitude (since altitude was corrupted in v4)
-----------
size 10 bytes

> data (frames), repeated x times
byte 0-3: timestamp (DWORD)
byte 4: flags (BYTE)
	right to left:
	bit 1: is player paused
	bit 2: is engine on
	bit 3: is first packet since flight was paused
byte 5: passenger satisfaction% [0-100] (BYTE)
byte 6-7: aircraft speed, knots (WORD)
byte 8-9: aircraft altitude (WORD)
byte 10-11: health (WORD)
byte 12-15: fuel level% [0-1] (FLOAT)
byte 16-19: x pos (FLOAT)
byte 20-23: y pos (FLOAT)
byte 24-25: bank in degrees * 10 (WORD)
byte 26-27: pitch in degrees * 10 (WORD)
-----------
size 28 bytes

if there was an issue with a mission start packet:

Old versions

Version 5

byte 4-7: mission id (DWORD)
byte 8-11: vehicle fuel capacity (FLOAT)
byte 12-13: vehicle model id (WORD)
byte 14: player name length (BYTE)
byte 15-39: player name + 0 padding (BYTE[25])
-----------
size 40 bytes

> data, repeated x times
byte 0-3: timestamp (DWORD)
byte 4: flags (right to left: bit 1: paused? bit 2: engine on?) (BYTE)
byte 5: passenger satisfaction (BYTE)
byte 6-7: aircraft speed, knots (WORD)
byte 8-9: aircraft altitude (WORD)
byte 10-11: health (WORD)
byte 12-15: fuel level (FLOAT)
byte 16-19: x pos (FLOAT)
byte 20-23: y pos (FLOAT)
byte 24-25: bank in degrees * 10 (WORD)
byte 26-27: pitch in degrees * 10 (WORD)
-----------
size 28 bytes

if there was an issue with a mission start packet:

Version 4

The format of version 4 is identical to Version 5, but version 4 had a bug where the altitude value had bogus data (it was the same as pitch10). To distinguish between flight files generated with bogus altitude data and corrently generated flight files, the version was bumped.

Version 3

byte 4-7: mission id (DWORD)
byte 8-11: vehicle fuel capacity (FLOAT)
byte 12-13: vehicle model id (WORD)
byte 14: player name length (BYTE)
byte 15-39: player name + 0 padding (BYTE[25])
(repeated x times from byte 40)
	byte 0-3: timestamp (DWORD)
	byte 4: flags (right to left: bit 1: paused? bit 2: engine on?) (BYTE)
	byte 5: passenger satisfaction (BYTE)
	byte 6-7: aircraft speed, knots (WORD)
	byte 8-9: aircraft altitude (WORD)
	byte 10-11: health (WORD)
	byte 12-15: fuel level (FLOAT)
	byte 16-19: x pos (FLOAT)
	byte 20-23: y pos (FLOAT)
	-----------------------
	24 bytes

if there was an issue with a mission start packet:

Version 2

Discontinued, existing files upgraded to v3.

Version 1

Discontinued, existing files upgraded to v2.

See also

Category: File formats
Flight file formatMap file formatTextdraw file format

This article has been accessed 1129 time(s).
Main page Article index