Complex popudt Template File Options

Filtering

UdtExporter filters the input data in order to only output data according to a parameter value.

param Tag

This tag allows you to specify which parameter will be used in the filtering process and its type and description:

<param name="mode" type="byte">

<description>

GPS mode for the filtering of the GPS fixes.

</description>

</param>

filter Tag

This tag allows you to filter the output values according to a specific field. For instance: write only the GPS data when mode is 4 (fixed RTK). It must be added to the definition of a record.

<filter

source="gps.mode"

value="$mode"/>

The filtering is activated by specifying the parameter value in the script command:

UdtExporter /t myTemplate.popudt source.xpf /p mode 4 result.txt

Several filtering can be activated (logical AND between each one).

 

Combining Several Channels in an Output

The output can combine data from different channels.

All sources must be defined at the beginning of the template:

<dataSource id="nav" defaultLabel="primary-nav"/>

<dataSource id="gps" defaultLabel="GPS_1"/>

For each record, determine which channel is used, with the primaryDataSource element:

<record

primaryDataSource="nav"

fieldSeparator="\t"

recordSeparator="\r\n"

nmeaChecksum="no"/>

Then for each filed, you can use either one source or the other:

<field source="nav.latitude"/>

<field source="nav.longitude"/>

<field source="gps.latitude"/>

<field source="gps.longitude"/>

If there is no corresponding data in the second channel at the date of the record in the main one, the previous value is repeated. If no previous value is available, the field is left blank. For instance, if the main channel is primary-nav @2Hz and the second channel is GPS @1Hz, you have this kind of output:

primary-nav 12:00:00.5 48.56789 4.53457 gps

primary-nav 12:00:01.5 48.56789 4.53457 gps

primary-nav 12:00:02.5 48.56789 4.53457 gps 12:00:02.0 48.125716 4.56865

primary-nav 12:00:03.5 48.56789 4.53457 gps 12:00:03.0 48.125716 4.56865

primary-nav 12:00:04.5 48.56789 4.53457 gps 12:00:04.0 48.125716 4.56865

primary-nav 12:00:05.5 48.56789 4.53457 gps 12:00:04.0 48.125716 4.56865

primary-nav 12:00:06.5 48.56789 4.53457 gps 12:00:04.0 48.125716 4.56865

primary-nav 12:00:07.5 48.56789 4.53457 gps 12:00:04.0 48.125716 4.56865

 

Combining Data from Several XPF in an Output

The /if option indicates that the DATA-ins.xpf file and its GPS_1 channel (/ds option) will be used in the output.

Fields from various files can also be merged together in a single output text file.

To use this feature, the command line option /if and /ds must be used.

The /if option indicates to UdtExporter that it can collect data from a complementary file:

UdtExporter /t myTemplate.popudt DATA-replay.xpf /if insData DATA-ins.xpf result.txt

In this example, UdtExporter exports data from the DATA-replay.xpf and DATA-ins.xpf files into the result.txt file using the myTemplate.popudt export model.

The first parameter of the /if option (insData in the previous example) allows renaming this additional input file if the /ds option is to be used. The main input file (DATA-replay.xpf in this example) is necessarily identified with the “main” name.

Yet, it is not sufficient to indicate the name of a complementary data file for the export to operate it is also necessary to indicate which channels must be used to export data. This is done using the /ds option.

The /ds option links a data source from the model file to a data channel from the input file using the <dataSource> element:

UdtExporter /t myTemplate.popudt DATA-replay.xpf /if insData DATA-ins.xpf /ds gps insData.GPS_1 result.txt

In this example the /ds option indicates that the data source identified by the keyword gps must be associated with the GPS_1 channel from the file identified as “insData”.

Notice that the GPS_1 information can be omitted if the defaultLabel attribute for this data source contains the correct canal name in the model file:

UdtExporter /t myTemplate.popudt DATA-replay.xpf /if insData DATA-ins.xpf /ds gps insData result.txt

In the next example we suppose we want to additionally export navigation data from the “secondary-nav” channel of the input file instead of the “primary-nav” channel, as defined by default in the model file:

UdtExporter /t myTemplate.popudt DATA-replay.xpf /if insData DATA-ins.xpf /ds nav main.secondary-nav /ds gps insData result.txt

Notice the main file is identified with the "main" tag.