The OpenSim 4.0 API includes methods for reading C3D data into OpenSim formatted files. Marker (.trc) and Forceplate (.mot) data can be created using OpenSim C3DFileAdapter class, which uses a forked version of Arnaud Barre's BTK package. Use of the C3DFileAdapter and included Matlab utilities are described below.
Reading C3D files through Matlab
Documentation for the C3DFIleAdapter is located here. There is a working example Matlab script in your resources directory /Code/Matlab/c3dExport.m.
C3DFileAdapter()
To use the OpenSim classes directly, follow the code below. This code will give you OpenSim Times Series Tables for both markers and forces.
osimC3D
We have included a Matlab side class that can be used to perform some common operations, such as rotating data, converting data into Matlab data types, and writing marker and force data to OpenSim file format. The Matlab file can be found in your resources directory /Code/Matlab/Utilities/osimC3D.m.
Reading Data through Python and C++
Some example code for using C3DFileAdapter through Python can be found below.
Example code for using the C3DFileAdapter in C++ is found below