Technical Reference – Database
Overview
Tacview database contains the definition of numerous civilian and military vehicles as well as many related objects you can find in a mission. Every time Tacview detects a new object in the incoming telemetry data, it will look for the corresponding best match in its database.
This database can be customized by creating XML files in the appropriate folder and filling then with definitions which will replace or complete the existing ones. Each database entry can define the default value of any of the object properties. While the most common properties are relatively straightforward like shape and color, it is possible to define much more advanced properties like object type, engagement range, maximum speed, etc.
Future releases of Tacview will offer an integrated editor, so you will not have to mess with xml files anymore.
Extending and modifying Tacview database
Here is example which shows how to declare an object based on an existing one and how to create custom SAMs with a specific engagement range displayed as a dome in the 3D window.
Tacview default database is made of XML files embedded in Tacview executable. It is not possible to directly modify its content, however, you can easily extend and replace existing definitions by adding your own XML files as described in this documentation. The latest version of the database is available on GitHub.
To extend or modify Tacview database, you need to create one or more XML files in the %ProgramData%\Tacview\Data\Database\Default Properties\ or %APPDATA%\Tacview\Data\Database\Default Properties\ folders.
You can create as many files as you want. Fell free to use subfolders to organise your data, Tacview will recursively load any appropriate XML file found in the corresponding folders and sub-folders. Here is an example of an empty definition file:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<DefaultPropertiesCollection LoadingOrder="0.5">
<!-- Put your definitions here -->
</DefaultPropertiesCollection>
The LoadingOrder attribute is used to define in which order the XML files will be injected in the database. Files with the lowest numbers will be loaded first. Tacview uses numbers between 0.0 and 0.1 for its own definitions. You should use numbers between 0.5 and 1.0 for your own files, so your definitions will be loaded after Tacview ones and overwrite them when applicable.
Modifying default definitions
Let’s say you are not happy with the way the M163 Vulcan AAA is declared by default in Tacview. You want to fix the name which is displayed by default, as well its engagement range.
First, create a file of the name of your choice in one of the folders listed above. Then, copy paste in it the default AntiAircraft.M163 definition which can be found in GitHub.
You can now easily replace the displayed names by the ones of your choice. The engagement is expressed in meters and can also easily be modified the same way. You can even provide a default color, for when your telemetry data does not already provide one (like from GPX files)!
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<DefaultPropertiesCollection LoadingOrder="0.5">
<!--
This file could be saved as
%ProgramData%\Tacview\Data\Database\Default Properties\AAA range fixes.xml
-->
<!-- M163 Vulcan redefinition -->
<DefaultProperties Id="AntiAircraft.M163" Base="AntiAircraft.AAA">
<Criteria>
<Name>M163</Name>
<Name>Vulcan</Name>
</Criteria>
<Properties>
<ShortName>M163 VADS</ShortName>
<LongName>M163 VADS</LongName>
<FullName>M163 Vulcan Air Defense System (VADS)</FullName>
<EngagementRange>2850</EngagementRange>
<Shape>Vehicle.APC.M113.obj</Shape>
<Color>Blue</Color> <!-- Default Color -->
</Properties>
</DefaultProperties>
</DefaultPropertiesCollection>
NOTE: It is important to remember that your new definition will completely replace Tacview one. Therefore, you must duplicate all the properties, even the ones you do not intend to modify.
Extending objects definitions
Your favorite aircraft is not yet part of the default database and you want to add a new definition as well as new 3D shape:
First, create a file of the name of your choice in one of the folders listed above. Then, create a new definition based on the examples you can find in GitHub.
Use the <Criteria> node to specify as many aliases as relevant.
Optionally, you could specify a <Type> to include only objects of a specific type. This is handy to reduce ambiguities between objects of distinct types which uses the same name. Like a SA-18 launcher and its SA-18 missile. Note that Tacview base definitions like Base=FixedWing.Fighter.Jet already includes the type filter <Type>FixedWing</Type>. If the source telemetry data is inaccurate (no or invalid type declared), simply use an empty <Type/> node to disable filtering by type.
Any of the telemetry properties listed in the dedicated documentation can be used in Tacview database.
For example, you can use the <Shape> node to specify a custom 3D model. In this example, we could download and convert an object found on SketchUp 3D Warehouse. See the dedicated documentation for more details on how to integrate custom 3D models in Tacview.
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<DefaultPropertiesCollection LoadingOrder="0.6">
<!--
This file could be saved as
%ProgramData%\Tacview\Data\Database\Default Properties\Custom FixedWing Definitions.xml
-->
<!-- F/A-37 Talon U.S. Navy single-seat fighter -->
<DefaultProperties Id="FixedWing.F-37" Base="FixedWing.Fighter.Jet">
<Criteria>
<Name>F-37</Name>
<Name>F/A-37</Name>
<Name>F/A-37 Talon</Name>
</Criteria>
<Properties>
<ShortName>F/A-37</ShortName>
<LongName>F/A-37 Talon</LongName>
<FullName>F/A-37 Talon</FullName>
<Shape>FixedWing.F-37.obj</Shape>
</Properties>
</DefaultProperties>
</DefaultPropertiesCollection>
Additional concepts
Each definition is identified by an unique identifier Id. Id is a free text. If two definitions have the same identifiers, then Tacview will keep the one which is declared in the file with the highest LoadingOrder.
Base represents the identifier of a base definition which is going to be used as a reference for the current definition. Any properties defined in Base will keep the same values in the derived definition. If you want to cancel the value of a specific property, simply overwrite it or write an empty node like: <Color/>.
When you start Tacview, all errors detected in the database are listed in Tacview debug console. The debug console is accessible from Tacview help menu.