Template File Format Description

An export template (*.popudt) is an XML document used by Delph INS Subsea to output data in a user defined text format. This process is implemented by the UdtExporter application and can be activated using a command prompt (outside of Delph INS Subsea).

It is composed of the following elements defined by some special tags:

> File Description: allows the user to identify its popudt file
> Data Source: defines the input Xpf fields from which to export data
> Header / Footer: optional tags to include some comments at the beginning or at the end of the file
> Spatial reference: used to define the system representation type (WGS84, etc.)
> Record: defines each data that will be exported to the text file. The record element is the central element of the popudt file and contain the following information:
> Field: defines the data to output in a column
> Format: optional field to define the format of the data
> Coordinate transformation: if the record is a position, allows transforming the position from one coordinate frame to another

The precise description of those elements is given below.

File Description

The popudt file begins with a set of information to allow the user to identify the file:

<title>My template</title>

<author>Exail</author>

<version>1.0</version>

<description>

UdtExporter user defined template sample.

</description>

The recommendedExtension element controls the extension of the output file (.txt by default if the element is missing). If the dot character is omitted (e.g. “dat”) it will be automatically added. The recommended extension is used by the DELPH INS MMI to automatically prepare the name of the target file when you use the user defined export feature:

<recommendedExtension>.txt</recommendedExtension>

dataSource Tag

The dataSource tag describes the main data used in the export process, that means the Xpf channels from which the data will be exported. The attributes of this tag are:

> id is used to identify this channel in the field tags of the popudt file
> defaultLabel is used to identify the channel from which the data is extracted

For more details, see XPF format specifications (Ref.: MU-XPF-AN-001 Ed.B April 2016).

Header / footer Tags

The content of the header (or the footer) tag is written at the beginning (or at the end) of the output file. Escape sequences can be used to output special characters:

> \a = Bell (alert)
> \b = Backspace
> \f = Formfeed
> \n = New line
> \r = Carriage return
> \t = Horizontal tab
> \v = Vertical tab
> \' = Single quotation mark
> \" = Double quotation mark
> \\ = Backslash
> \? = Literal question mark

Those tags are optional.

Spatial Reference Tag

See section Selecting the spatial reference.

record Tag

The record tag describes the data to output for each record in the input file. This tag has the following attributes:

> primaryDataSource is used to assess the channel by pointing on id and dataSource elements previously defined
> fieldSeparator is output between each field of the record
> recordSeparator is output at the end of the record
> nmeaChecksum (optional, default is false) add a checksum at the end of each line

The escape sequences described above in the comment of the header tag can be used in the fieldSeparator and recordSeparator attributes.

Coordinate Transformation

The coordinateTransformation element describes the actual transformation of the data already referenced in a geographic coordinate system into a projection coordinate system. This element can be found under the Record tag. The attributes of this element are:

> sourceSRS, targetSRS: source and target coordinate systems
> sourceX, sourceY, sourceZ: variables of the source coordinates
> targetX, targetY, targetZ: variables of the target coordinates
> sourceZ and targetZ are optional.

field Tag

This tag allows you to add a column in the output file. The data in the column can be fixed or can be a variable data from the input file, in this case the source attribute is used to specify which variable to be selected. The list of the variables is given in:

> Doc\Xpf packet definition for ALIX data.html,
> Doc\Xpf packet definition for Common data.html,
> Doc\Xpf packet definition for Tools data.html
> Doc\Xpf packet definition for Ins data.html

Formater

This tag describes the format for a field.

Type attribute: timestamp, latitude, longitude, numeric, physical

When the field has to be formatted as a simulation time, these attributes can be used:

> mode: mandatory, absolute or elapsed

For absolute mode:

> notation: mandatory,
dayMonthYear: dd/mm/yyyy hh:mm:ss.sss
monthDayYear: mm/dd/yyyy hh:mm:ss.sss
yearMonthDay: yyyy/mm/dd hh:mm:ss.sss
unixTime: number of seconds elapsed since 01/01/1970
daySeconds: number of seconds elapsed since midnight
weekSeconds: number of seconds elapsed since midnight last Sunday
nmeaTime: hhmmss.sss
> decimalSeparator: optional, the character used as decimal separator (default is '.')
> dateSeparator: optional, the character used between the date fields (default is '/')
> hourSeparator: optional, the character used between the time fields (default is ':')
> dateTimeSeparator: optional, character to be used between date and time (default: space)
> omitCentury: optional, when yes, is formatted on 2 digits / 4 otherwise (default: false)
> dateOnly: optional, the time part is skipped if set to yes (default is ‘false’)
> precision: optional, number of digits after the decimal separator (default is 3)

For elapsed mode:

> notation: mandatory,
dayHourMinuteSecond: d hh:mm:ss.sss
elapsedTime: elapsed time as a floating number
> decimalSeparator: optional, the character used as decimal separator (default is '.')
> hourSeparator: optional, the character used between the time fields (default is ':')
> unit: unit used to express the simulation time when mode is elapsed and notation is elapsed. Can be s (seconds), ms (milliseconds), h (hours), min (minutes)
> precision: optional, number of digits after the decimal separator (default is 3)

When the field has to be formatted as latitude / longitude, following attributes can be used.

> notation: optional, describes the notation to be used in
degrees: dd.dddddd S (ex: 48.245378 N)
degreesMinutes: dd°mm.mm S (ex: 48°24.783 N) – default value
degreesMinutesSeconds: dd°mm'ss.ss S (ex: 48°24'12.564" N)
nmea: lldd.dddd,S (ex: 4824.783,N)
> decimalSeparator: optional, the character used as decimal separator (default is '.')
> degreeSeparator: optional, the character used between degrees and minutes ('°' default)
> minuteSeparator: optional, the character used between minutes and seconds (''' default)
> useMathematicalSign: optional, replace the N/S and E/W by a leading + or – (default ‘no’)
> omitLastSeparator: optional, suppress the space between the value and the quadrant (ex: 48°24.567N) (default is ‘false’)
> precision: optional, number of digits after the decimal separator (3 by default)

When the field has to be formatted as a numeric value, the following attributes can be used.

> decimalSeparator: optional, the character used as decimal separator (default is '.')
> forceSign: true or false
> width: minimum total number of digits, zero are added if necessary
> precision: optional, number of digits after the decimal separator (3 by default)

When the field has to be formatted as a physical value and you want to apply an affine transformation on the value, the following attributes can be used.

> multiplier: mandatory, used as multiplier
> divisor: mandatory, used as divisor
> offset: optional, added to the original value
> decimalSeparator: optional, the character used as decimal separator (default is '.')
> forceSign: true or false
> width: minimum total number of digits, zero are added if necessary
> precision: optional, number of digits after the decimal separator (3 by default)

 

The formula below explains the use of the different fields: