User Tools

Site Tools


visual3d:documentation:definitions:file_formats:visual3d_ascii_format

Visual3D ASCII Format

Visual3D exports data into several file formats. The simplest and default file format for data export to ASCII files is the following:

Any signal that can be seen in the Data Tree (in Signal and Event Processing Mode) can be exported to a C3D file.

- C:ExampleDataExampleWalk.c3dFilename from which the data came.
e.g. Filename withing the Visual3D Workspace
- EMG9 Signal Name
- ANALOG Signal Type
- ORIGINAL Signal Folder (e.g. ORIGINAL, PROCESSED, etc.)
ITEMX Component. (ANALOG signals have channel 0 or channel X
1 23.0 -
2 22.5 -
3 23.0 -
4 22.0 -
5 21.0 -

The file contains data in columns. The first column is the frame number. One file may contain several signals.

Time Data

Visual3D recognizes three time labels: time, analog, and derived.

Time Label Description
TIME This is a column containing the time at the POINT rate.
ANALOGTIME This is a column containing the time at the ANALOG rate.
DERIVEDTIME This is a column containing the time at a DERIVED rate. DERIVED signals can have any sampling rate that is an integer multiple of the POINT rate. Each ASCII file permits only one DERIVEDTIME signal. If there is more than one DERIVEDTIME signal, you will need to import multiple text files; one for each DERIVEDTIME.

An example header:

FILENAME FILENAME FILENAME
TIME ANALOGTIME DERIVEDTIME
FRAME_NUMBERSFRAME_NUMBERSFRAME_NUMBERS
ORIGINAL ORIGINAL ORIGINAL
ITEMX X X
1 0.0 0.0 0.0

Component String

Deciding what character to use for representing a signal component has resulted in some flip flopping over the years. The final straw in our decision was the introduction of a 4×4 ROTATION signal to the C3D format and to Visual3D. While X, Y, Z have been synonymous with the first 3 components of any signal, X, Y, Z are not logically the first 3 components of a ROTATION signal

On the other hand, using numerical values has other controversial issues. For example, Matlab won't read a number as a string and apparently there are .m files that treat the component as a string.

Here are the current decisions.

Signal Type Returned Component Strings
TARGET XYZR
LANDMARK XYZ
FORCE XYZ
COFP XYZ
FREEMOMENT XYZ
LINK_MODEL_BASED XYZ
ANALOG XYZ
KINETIC_KINEMATIC XYZ
METRIC (3 components) XYZ
METRIC (others) 0, 1, 2, …
DERIVED (3 components) XYZ
DERIVED (others) 0, 1, 2, …

The exception is that Visual3D allows a character to be added to a number. For example C0 instead of 0

Signal Units

All signals are stored in MKS units.

Importing and Exporting

This data file can be imported to Visual3D using the pipeline command Import_Data_From_ASCII_File. One of the constraints on the file import is that the first line of the signal column must match a C3D file in the Visual3D Workspace. This allows Visual3D to recognize which file to add the data to.

This data file can be exported from Visual3D using the pipeline command Export_Data_To_ASCII_File

Number of Analog and Point Frames

The following rules apply for ANALOG and TARGET (POINT) data:

  • if there are more frames of data in the ASCII file than there are in the C3D file, the ASCII signal is truncated.
  • if there are fewer frames of data in the ASCII file than there are in the C3D file, the signal is padded with frames of data containing DATA_NOT_FOUND.

Note: For DERIVED signals all rows are added to the data file within Visual3D without truncation or padding. This is partly because DERIVED signals cannot be exported to the C3D file at this point, so there is no conflict with the C3D file format.

visual3d/documentation/definitions/file_formats/visual3d_ascii_format.txt · Last modified: 2025/03/18 19:00 by wikisysop