Installation instructions
First, download the repo:
git clone https://github.com/martinling/imusim.git
cd imusim
Some missing C files need to be generated manually with Cython:
(If you don't do this you will get errors like "clang: error: no such file or directory: 'imusim/maths/quaternions.c'")
cython -a imusim/maths/*.pyx
You'll need the right compiler. GCC 4.8 works, you can install it on a Mac like so:
# If necessary, install MacPorts from https://www.macports.org/install.php
sudo port selfupdate # (Mac only)
sudo port install gcc48 # (Mac only)
If you are not on a Mac then you will have to obtain GCC some other way. It shouldn't be hard to find. Other compilers may also work.
Now set the compiler to be GCC:
(If you don't do this, the version of GCC installed by Xcode will fail with "imusim/maths/quat_splines.c:1340:8: error: 'inline' can only appear on functions")
export CC=/opt/local/bin/gcc-mp-4.8 # The path to GCC will differ for other platforms/versions.
Now you can build IMUsim! (Make sure to run this command in the same terminal as the export).
python setup.py install