When writing a C3D application, programmers face the decision of choosing one of the defined binary C3D file formats, will the data be stored in DEC, Intel, or SGI/MIPS endian formats? While the Intel format is common, if an application needs access to data created in different environments, then all three formats (DEC, Intel, and SGI/MIPS) need to be supported – this will always be transparent to the user as the file format can be automatically determined when the file is opened and the code to access and interpret the data storage format only has to be written once. Sample code that documents C3D file data access supporting all formats is available from the www.c3d.org web site.
When creating a C3D file, storing the 3D and analog data as floating-point values or integer values is the second decision that is usually made. It is recommended that users are given the option to use either method. While storing data as floating-point values may appear to be more accurate, it often results in the loss of information about the original raw samples collected in a study if the data is stored as pre-scaled floating-point values without any information that documents the original data collection environment.
If a C3D application is designed to create integer files by default then it guarantees that switching to floating-point format will be trouble-free because integer formatted C3D files store the analog scaling values necessary to describe and scale the stored analog samples, typically sampled from an analog data collection system integrated with the 3D data collection hardware. Integer arithmetic is much more efficient than floating-point arithmetic, so accessing integer C3D files is faster and integer files are always almost half the size of their floating-point versions.
It is recommended that integer C3D files are the default format because using the integer format guarantees that every effort has been made to store valid data with the scaling information that defines the data collection environment. Floating-point is a useful option when storing processed data samples, but storing data as floating-point values doubles the file size and requires additional processing resources while, due to the internal scaling methods that are defined in the C3D format, it offering virtually no improvement over the accuracy of integer formatted C3D files. Both formats are storing the 3D locations generated by the 3D measurement system used, while C3D floating-point data offers sub-micron resolution, it is unlikely that any 3D motion capture system can generate measurements with sub-micron precision.
It may be necessary to use the floating-point format when processing the 3D locations measurements to calculate factors like acceleration, moments, and powers because the calculations often require higher resolution than the original physical locations that define the common C3D file POINT:SCALE factor.
Floating-point storage may help when processing data but can result in problems when it is used to store data samples. While the C3D file floating-point format supports an analog resolution of 0.009pV for a ±10V analog range, this resolution is virtually never required when storing sampled raw sensor sample values.
To summarize, while the C3D format supports both integer and floating-point storage formats. When an application only supports pre-scaled floating-point format storage it is not fully C3D compliant and can result in data collection issues being hidden once the C3D file is created.
More: