User guide

Charnwood Dynamics Ltd. Coda cx1 User Guide – Reference IV-2
CX1 USER GUIDE - COMPLETE.doc 26/04/04
137/162
MOVEMENT DATA FILE (MDF) FORMAT (Version 3.0)
Summary
A Movement Data File is a binary file of variable length. The file format allows for the storage
of variable amounts of data of various types; the data type determines the number of bytes
used to store each item of data.
There are three sections in the file:
1. Identifier - Identifies the file as a Coda MDF file, and records the file format version
number.
2. Header - Specifies the number of arrays of each data type stored in the Data
section.
3. Data - Sequential arrays of data of the types specified in the Header section.
Each section is described below.
The following abbreviations are used to specify data types:
uchar : unsigned 8-bit character (byte)
uint8 : unsigned 8-bit integer (byte)
float32 : 32-bit floating-point value in IEEE format
uint16 : unsigned 16-bit integer (word)
int16 : signed 16-bit integer
Identifier
This section is always 6 bytes long:
4 bytes contain the ASCII string “CODA”
2 bytes contain the file format version number as two unsigned 8-bit integers:
the first integer is the whole part of the file format version number, and the
second is the fractional part. This is 0102h for version 2.1
IDENTIFIER { uchar[4] name = “CODA”;
uint8[2] version; } // 0x0102
Header
This section contains a number of HEADER_ENTRY structures. Each structure contains two
16-bit integers: the first is a code number which defines a data array type, and the second
specifies how many arrays of that type are present in the Data section. The data array type
codes are listed below.
The upper 8 bits of the type code may be used to record the dimensionality and type size of
the data array type specified in the lower 8 bits of the type code.