CARIS HIPS and SIPS : HIPS and SIPS Editors : Generic Data Parser : Data Parsing Components
 

Data Parsing Components

The parser must be told where each piece of information is located in the ASCII text file. This set of parameters is stored in a configuration file that can be saved, retrieved or modified at any time.

These configuration files are stored in the …\Hips\Session folder and have a *.par extension.

The location of each type of data in the text file is determined using either the free form or fixed column method. In the raw data file the data fields are separated by delimiters, and lines of data are differentiated by identifiers.

See

Free Form

Fixed Column

Identifier

Multiplier/Offset

Pseudo Time

Free Form

The free form method is used when data items (separated by delimiters) have fields of varying lengths. In this case, you specify a field number to show where a data item is located in the text file. The field numbering starts at one (1) and is counted from the first character following one or more delimiters.

For example, in the input string 301.12, 45, 5.66 — field number three (3) indicates the start of string 5.66.

The following characters are used as delimiters by the parser:

tab

space

single quote ( ‘ )

vertical bar ( | )

comma ( , )

semicolon ( ; )

These delimiters are replaced with spaces when the parser reads the file.

Quotation marks can be used to offset a text string, for example, “312, 45, 5.66” is treated a single string field (regardless of any characters or spaces inside the string).

Fixed Column

This method specifies the absolute location of a data item in the text file in terms of starting column position and field length. The location starts at one (1). This method is used when the location of data items does not change and where there is no obvious separation between fields. You must supply the length of the field when using the fixed form method.

Identifier

When data items are stored in separate text lines, the program must differentiate between types of input. This is done with an identifier, which is a short text string whose location is specified as an absolute value. If an identifier is specified for a data item, the input line is tested for the item’s presence to make sure that it can be extracted.

For example, some depth data lines in a Hypack data file start with the string EC2. In this case, you specify the identifier as EC2 at the location one (1). You can include spaces and other symbols in the identifier, as long as the symbols are not classified as belonging to any of the delimiters.

The use of identifiers is optional for any data item. In this case, the program extracts the data item on all input text lines.

Multiplier/Offset

Once a value has been extracted from the input text line, additional operations may be needed to transform it to its final value.

This may be necessary because:

The value is stored with an implied decimal point (for example 1/100th of a second).

The value is stored in a different unit (for example, decimal radians instead of degrees).

The sign of the value is opposite of what HIPS uses.

The value is stored with an implied offset.

You may specify additional mathematical operations in terms of a Multiplier and an Offset. The actual formula used is:

final value = (extracted value x Multiplier) + Offset