Template File Format Description
The Generic Text Definition template is composed of three parts:
| > | Signature: optional part to describe the signature (i.e. the first line) of the text file |
| > | Channel description |
| > | Record description |
Lines beginning with the # character (possibly preceded by blank or tab characters) are considered as comment lines and are not evaluated. Empty lines are not evaluated.
Signature
The signature is the optional first line of the file, used to identify it, for instance: “Simple GPS Data”. If the definition file contains a tagLine element, the first line of the input data file must necessarily correspond to the content of this element.
Channel description
The first part of the file after the signature is the channel description, which describes all the Xpf channels that will be included in the output file. The following allows generating a file that contains a GPS channe and a UTC channel:
<channel
label="GPS"
description="GPS data"
type="InsGps"
version="3"/>
<channel
label="UTC"
description="UTC synchronization"
type="CommonUtc"
version="3"/>
The various Xpf channel types possible are defined in the "Xpf format specification.pdf” file distributed with Delph INS Subsea. The details of the packet types are described in the Xpf packet definition for XYZ data.html files.
Packet description
The last part of the file describes how the data contained in each column of the input file will be used to create the Xpf data packets.
In the following example the input data file contains 5 columns (date, time, latitude, longitude, altitude). We find the definition of each column (each description beginning with the “column” element), except for the date and time whose description is implicit. The data type for each column is given by the “type” attribute.
Supported types are:
| > | byte: unsigned integer on eight bits |
| > | char: signed integer on eight bits |
| > | word: unsigned integer on sixteen bits |
| > | short: signed integer on sixteen bits |
| > | dword: unsigned integer on thirty-two bits |
| > | int: signed integer on thirty-two bits |
| > | float: floating point number on thirty-two bits |
| > | double: floating point number on sixty-four bits |
| > | string: Character string |
A field element must be indicated for each field of an Xpf channel, as field elements define the fields of the Xpf file, with two parameters:
| > | Name: name of the Xpf field |
| > | value: indicates the value of the field. It can be a constant (as for the rejection field in the following example) or a data coming from a column. In date case, just indicates the column name, preceded with the $ character. The column name timestamp is reserved and contains the data time stamp |
<record channel="GPS">
<column name="latitude" type="double">
<description>Latitude, decimal degrees</description>
</column>
<column name="longitude" type="double">
<description>Longitude, decimal degrees</description>
</column>
<column name="altitude" type="float">
<description>Geoid Altitude, meters</description>
</column>
<field name="date" value="$timeStamp"/>
<field name="latency" value="0.0"/>
<field name="rejection" value="0"/>
<field name="gpsMode" value="1"/>
<field name="latitude" value="$latitude"/>
<field name="longitude" value="$longitude"/>
<field name="altitude" value="$altitude"/>
<field name="northingSd" value="2.0"/>
<field name="eastingSd" value="2.0"/>
<field name="altitudeSd" value="2.0"/>
<field name="northingEastingCv" value="0.0"/>
<field name="geoidalSep" value="9999.0"/>
</record>
It is possible to distribute the content of the lines of the input file toward various Xpf channels of the output file. In order to do that, the first column of the input file has to contain an identifier and the definition file has to contain various record elements, each of them defining an attribute when:
<record when="_GPS_" channel="GPS">
...
</record>