Using Unsigned Numbers

In many cases the limitations caused by using signed integers and bytes within the C3D file can be ignored provided that the user, or applications programmer, is aware that under some circumstances this may “break” older software applications.  The use of unsigned integers and unsigned bytes will effectively double that amount of parameter and data storage that is available within the C3D file.

Using unsigned integers, the maximum number of 3D frames that can be stored in a C3D file is 65,537 if the parameter (POINT:FRAMES) used to record the number of 3D frames stored in the file, is treaded as an unsigned integer.  This increases the length of 3D data that can be recorded in the C3D file to just over 18 minutes at 60Hz (65537 / (60 * 60)).

In addition, interpreting the parameter (POINT:DATA_START) as an unsigned integer allows the 3D data storage section to start anywhere within the first 32Mb (65537*512/1024) of the C3D file.

The length of most parameter items can be stored using unsigned bytes as pointers or indexes within the parameter records.  This extends the amount of parameter storage available from 127 characters per value to 255 characters and allows each parameter dimension to have up to 255 separate values (the signed limit is 127).

It is very important to realize that the use of unsigned integers and unsigned bytes within the parameters of a C3D file may create problems for older C3D applications that will interpret large unsigned values as negative values.  This may cause internal parameter buffers to overflow, large arrays to be interpreted with negative indexes and may result in older software applications crashing, or generating erroneous results.

The use of unsigned or signed integers within a C3D file does not affect the interpretation of data within the various sections.  For instance, when using the integer file formats, point data within the 3D data section is always stored as signed integer values.  Analog data within the 3D data section is also stored as signed integers by default although under certain circumstances unsigned integers are permitted.

It is important to realize that Signed C3D files and Unsigned C3D files are, for all practical purposes, identical unless they contain more than 32,767 3D frames or use parameters that contain more than 127 variables.  Both types of file use the same format for storing 3D and analog data values, which are always stored as signed integers.  When viewed at a binary level there is no structural difference between signed and unsigned C3D files.