Référence technique - Vols au format ACMI 2.1
With Tacview 1.5 a new universal public file format has been introduced. The goal was to overcome the complexity of the previous format while making it much more powerful at the same time.
Like its predecessor, the new file format is written in plain UTF-8 text. That way, it is possible to easily export flight data from the simplest programming language. Its syntax is very easy to read by humans and, with the debug log introduced in Tacview 1.4.3, it is now very easy to diagnose any exporter issues. This new format is so simple that it could even be written by hand if the amount of data was not astronomic!
Despite its simplicity, the new format offers a very powerful way to set and change – in real-time – any property of any object on the battlefield. For instance, it is now possible to change the coalition, the color, even the type of an object, on the fly! In the same way, you can easily assign and change global properties, like the weather for example.
It is important to note that data which are not yet supported by Tacview are preserved and visible in the raw telemetry window. If you think that an important data should be natively supported and displayed by Tacview, feel free to contact us.
ACMI 2.1 File Format 101
Without further ado, let's start with the simplest file possible:
These are the only two mandatory lines you must put first in any ACMI file. This header tells Tacview which format to expect. Any following data is optional.
Let's be rational: Even if Tacview will gracefully load this empty file, we need a bit more data to make it useful! Here is a file which makes more sense:
FileType=text/acmi/tacview FileVersion=2.1 0,ReferenceTime=2011-06-02T05:00:00Z #47.13 3000102,T=41.6251307|41.5910417|2000.14,Name=C172
To better understand this structure, we need to know that – apart from its header – each line of the file can be either:
- The sharp sign # introducing a new time frame in seconds relative to ReferenceTime
- An object id (in this example 0 and 3000102) followed by as many properties as you want separated by commas ,. Each property will be assigned a new value using the equal sign =.
- The third possibility – not shown here – is a line which starts with the minus sign - followed by the id of an object we want to remove from the battlefield (could be destroyed or simply out of recording range).
Let's see in detail each line syntax:
This line assigns the value 2011-06-02T05:00:00Z to the property ReferenceTime of the global object always designated by its id zero 0. In other words: This line defines the base/reference time used for the whole flight recording. To understand better what this means, let's have a look at the following line:
This line defines a time-frame in seconds relative to ReferenceTime. In that case, this means that the following events or properties happened at ReferenceTime + 47.13 seconds ⇒ 2011-06-02T05:00:00Z + 47.13 ⇒ 2011-06-02T05:00:47.13Z
Now let's see the following line:
This line defines two properties for the object 3000102. To save space, Object ids are expressed in hexadecimal without any prefix or leading zeros.
The first property T (which stands for Transform) is a special property used to define the object coordinates in space. We will see later which syntaxes are supported for T. For now, let's just focus on this case which is: T = Longitude | Latitude | Altitude.
Notice that Latitude and Longitude are expressed in degrees. Positive values are toward the north and east directions. Since the whole file is always in the metric system, the altitude is expressed in meters MSL (above sea level, also known as ASL in some countries).
The following property Name obviously defines the object name C172 which is a short way of designating a Cessna 172 aircraft.
Now that you know all the basics to create a flight recording, let's move our new aircraft a bit further to the east. To do so, we can simply add another frame to our file:
As you can see, we have defined a new longitude value 41.626 for our aircraft at the time frame 2011-06-02T05:00:49Z
You may have noticed that we don't need to specify – again – the aircraft name, simply because it has not changed since the last time! Another difference with the previous record is that we have omitted the latitude and altitude parameters because they did not change either. This helps to save a lot of space when generating data for long flights. While aircraft are usually quite mobile, this optimization is especially relevant for ground objects which can stay still or move just a little bit time to time...
Detailed File Specifications
Now that you are starting to understand better how ACMI files are structured, let's review together the requirements and some tips related to the file format in general:
- Text data must be written in UTF-8. That way, all languages are supported for text properties.
- All data are expressed in the metric system, using meters, meters per second for speed, degrees for angles, UTC time and so on.
- Object ids are expressed using 64-bit hexadecimal numbers (without prefix or leading zeros to save space)
- The object 0 is used to define global properties (like ReferenceTime or Briefing)
- When you want to assign a text property which contains a comma , you must put the escape character \ before it so it is not interpreted by Tacview as the end of your string.
Briefing=Here is a text value\, which contains an escaped comma in it!
- To save space, it is strongly suggested to end lines with the LF \n character only.
- It is cleaner to prefix text data with the UTF-8 BOM header.
- The whole of the text data can be wrapped in a zip or 7z container to save bandwidth or disk space.
- Data can be presented out-of-order. Tacview will do its best to reorder it in memory.
Now let's have a closer look at the different notations for object coordinates. To optimize the file size, Tacview offers four different notations.
Here are two examples: When exporting a bullet coordinate, we do not need any data about its rotation angles. The opposite example would be an aircraft in a flight simulator running in a flat world like Falcon 4.0: In that case, to get accurate replay, we should export the full position of the aircraft in the flat world, its rotation, and its coordinates in a spherical world. That way the aircraft will not only be properly displayed in Tacview's spherical world, but telemetry calculation will be done in the object's native flat world so the numbers visible on screen will match the ones you can see in the original flight simulator.
|Object Position Syntax||Purpose|
|T = Longitude | Latitude | Altitude||Simple objects in a spherical world (typically minor objects like bullets). Can also be relevant for low-end data source like GPX files without rotation information.|
|T = Longitude | Latitude | Altitude | U | V||Simple objects from a flat world. U & V represent the x and y coordinates in the flat world. Do not forget to express them in meters even if the original coordinates are in feet for example. Altitude is not repeated because it is the same for both flat and spherical worlds.|
|T = Longitude | Latitude | Altitude | Roll | Pitch | Yaw||Complex objects in a spherical world. Roll is positive when rolling the aircraft to the right. Pitch is positive when taking-off. Yaw is clockwise relative to the true north.|
|T = Longitude | Latitude | Altitude | Roll | Pitch | Yaw | U | V | Heading||Complex object from a flat world. Same as before. Heading is the yaw relative to the true north of the flat world. It is required because flat world north usually does not match spherical north because of projection errors.|
Remember that you can omit the components which did not change since the last time. This will save a lot of space.
If some of the data is missing (for example object rotation), Tacview will do its best to emulate it in order to give a nice replay. Independently from optimization, you should keep the same data notation for each object during the object life. If at one point you use a different notation, Tacview will do its best to promote the object to a more complex one. However – because of the initial lack of data – the final result may not be the expected one.
We already saw that one of the most important global properties is the ReferenceTime. Obviously, there are plenty of other meta-data you can inject in a flight recording to make your replay more detailed.
|DataSource||Source simulator, control station or file format.
|DataRecorder||Software or hardware used to record the data.
|ReferenceTime||Base time (UTC) for the current mission. This time is combined with each frame offset (in seconds) to get the final absolute UTC time for each data sample.
|RecordingTime||Recording (file) creation (UTC) time.
|Author||Author or operator who has created this recording.
Author=Lt. Cmdr. Rick 'Jester' Heatherly
|Title||Mission/flight title or designation.
|Category||Category of the flight/mission.
Category=Close air support
|Briefing||Free text containing the briefing of the flight/mission.
Briefing=Destroy all SCUD launchers
|Debriefing||Free text containing the debriefing.
Debriefing=Managed to stay ahead of the airplane.
|Comments||Free comments about the flight. Do not forget to escape any end-of-line character you want to inject into the comments.
Comments=Part of the recording is missing because of technical difficulties.
|deg||These properties are used to reduce the file size by centering coordinates around a median point. They will be added to each object Longitude and Latitude to get the final coordinates.
Events can be used to inject any kind of text, bookmark and debug information into the flight recording. They are a bit special: They are declared like properties, but unlike properties, you can declare several events in the same frame without overriding the previous one.
Here is an example on how to inject events:
#8.62 0,Event=Message|3000100|Here is a generic event linked to the object 3000100 0,Event=Bookmark|Here is a bookmark to highlight a specific part of the mission! #8.72 0,Event=Debug|Here is some debug text, visible only with the /Debug:on command line option
You may notice the structure of an event declaration:
Event = EventType | FirstObjectId | SecondObjectId | ... | EventText
For each event we must declare first the type of the event (e.g. Bookmark), optionally followed by ids of concerned objects. For example, when the user double click on the event, Tacview will use theses ids to automatically center the camera around associated objects. The last part is a mandatory text message. Even if it is possible to provide an empty text, it is suggested to provide a useful message to get the most out of your debriefings.
Here are the different kind of events currently supported by Tacview:
0,Event=Message|705|Maverick has violated ATC directives
|Bookmark||Bookmarks are highlighted in the time line and in the event log. They are easy to spot and handy to highlight parts of the flight, like a bombing run, or when the trainee was in her final approach for landing.
0,Event=Bookmark|Starting precautionary landing practice
|Debug||Debug events are highlighted and easy to spot in the timeline and event log. Because they must be used for development purposes, they are displayed only when launching Tacview with the command line argument /Debug:on
0,Event=Debug|327 active planes
|LeftArea||This event is useful to specify when an aircraft (or any object) is cleanly removed from the battlefield (not destroyed). This prevents Tacview from generating a Destroyed event by error.
|Destroyed||When an object has been officially destroyed.
|TakenOff||Because Tacview may not always properly auto-detect take-off events, it can be useful to manually inject this event in the flight recording.
0,Event=TakenOff|2723|Col. Sinclair has taken off from Camarillo Airport
|Landed||Because Tacview may not always properly auto-detect landing events, it can be useful to manually inject this event in the flight recording.
0,Event=Landed|705|Maverick has landed on the USS Ranger
Starting with Tacview 1.5, it is now possible to set and change object properties in real-time. Even if new properties may not always be visible on screen in the first releases of Tacview 1.5, you can always have a look at the raw telemetry window to see what is the current value of each property for currently selected objects.
|Type||Object types are built using tags. This makes object management much more powerful and transparent than with the previous exclusive types. (see below for the list of supported types).
|Parent||Parent hexadecimal object id. Useful to associate for example a missile (child object) and its launcher aircraft (parent object).
|Name||The object name should use the most common notation for each object. For example, it is strongly advised to use NATO names for military aircraft like: F/A-18C. This will help Tacview to associate each object with the corresponding entry in its database.
|Pilot||Aircraft pilot in command name.
|Group||Group the object belongs to. Used to group objects together. For example, a formation of F-16 flying a CAP together.
|Country||ISO 3166-1 alpha-2 country code.
|Color||Can be one of the following: Red, Orange, Green, Blue, Violet. Colors are predefined to ensure a clear display of the whole battlefield in all conditions.
|Registration||Aircraft registration (aka tail number)
|Squawk||Current transponder code. Any code is possible, there is no limitation like with the old 4 digit transponders.
|Debug||Debug text visible in the 3D view when Tacview is launched with the /Debug:on command line argument.
|Label||Free real-time text displayable in the 3D view and telemetry windows (to provide miscellaneous info to the end-user)
|FocusTarget||Target currently focused by the object (typically used to designate laser beam target object, can also be used to show what the pilot is currently focused on)
|LockedTarget||Primary target hexadecimal id (could be locked using any device, like radar, IR, NVG, ...)
|Importance||ratio||The higher the ratio, the more important is the object is (e.g. locally simulated aircraft could be 1.0 importance factor)
|Slot||index||Plane position in its Group (the lowest is the leader)
|Length||m||Object length. Especially useful when displaying buildings.
|Width||m||Object width. Especially useful when displaying buildings.
|Height||m||Object height. Especially useful when displaying buildings.
|AOA||deg||Angle of attack
|AGL||m||Object altitude above ground level
|HDG||deg||Aircraft heading. When there is no roll and pitch data available, this property can be used to specify the yaw while keeping full rotation emulation in the 3D view.
|HDM||deg||Aircraft magnetic heading. Heading relative to local magnetic north.
|Throttle||ratio||Main/engine #1 throttle handle position (could be >1 for Afterburner and <0 for reverse)
|Afterburner||ratio||Main/engine #1 afterburner status
|AirBrakes||ratio||Air brakes status
|LandingGear||ratio||Landing gear status
|Tailhook||ratio||Arresting hook status
|Parachute||ratio||Parachute status (not to be mistaken for DragChute)
|DragChute||ratio||Drogue/Drag Parachute status
|RadarMode||number||Radar mode (0 = off)
|RadarAzimuth||deg||Radar azimuth (heading) relative to aircraft orientation
|RadarElevation||deg||Radar elevation relative to aircraft orientation
|RadarRange||m||Radar scan range
|LockedTargetMode||number||Primary target lock mode (0 = no lock/no target)
|LockedTargetAzimuth||deg||Primary target azimuth (heading) relative to aircraft orientation
|LockedTargetElevation||deg||Primary target elevation relative to aircraft orientation
|LockedTargetRange||m||Primary target distance to aircraft
Object Types (aka Tags)
Object types are now defined using a free combination of tags. The more tags, the more accurately an object is defined. Tags are separated by the plus sign +. Here are some examples:
|Object Kind||Type (Tags)|
Here is the list of currently supported tags. Tacview will use them for display and analysis purposes.
To help you during the debugging process of your exporter, it is possible to comment any line of the file by prefixing them with the double slash // like in C++.
// This line and the following are commented // 3000102,T=41.6251307|41.5910417|2000.14,Name=C172
These lines will be ignored by Tacview when loading the file. Comments are not preserved. You will notice that they are discarded the next time you save the file from Tacview. If you want to include debug information which is preserved, you can use the dedicated Debug Event described earlier in the global properties.
Because of loading performance considerations, it is only possible to insert a comment at the beginning of a line.