DevGuide/Mathlib
Jump to navigation
Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
The math lib located in sw/airborne/math is used in all airborne code of paparazzi. It provides functions:
- to manipulate euler angles, quaternion and rotation matrix
- for basic trigonometry using fixed-point algebra
- to perform geodetic transform
The generated docs can be found on http://docs.paparazziuav.org/latest/group__math.html
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