DevGuide/Mathlib
Jump to navigation
Jump to search
The math lib located in sw/airborne/math is used in all airborne code of paparazzi. It provides macros:
- to manipulate euler angles, quaternion and rotation matrix
- for basic trigonometry using fixed-point algebra
- to perform geodetic transform
The generated (very incomplete) doc can be found on Github doc page.
A PDF documentation can also be generated from the TeX files in doc/pprz_algebra and doc/pprz_geodetic.
Build library
In sw/airborne/math folder, type
make shared_lib
The default build directory is var/build/math, to change it:
BUILDDIR=<your_build_dir> make shared_lib
Install library
In sw/airborne/math folder, type
make install_shared_lib
The default install dir is /usr and will install files in
/usr/lib /usr/lib/pkgconfig /usr/include/pprz
To change the install dir:
PREFIX=<your_install_dir> make install_shared_lib
Note: the default install dir needs root privilege. For "local" install, it is recommended to change the default install dir for ${HOME}/usr
Note: "make clean" will only clean the build directory
- with pkg-config --cflags --libs
- by hand:
LIBS: -L<prefix>/lib -lpprzmath CFLAGS: -I<prefix>/include/pprz