Difference between revisions of "DevGuide/Mathlib"
Jump to navigation
Jump to search
(Created page with "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 t…") |
|||
Line 1: | Line 1: | ||
The math lib located in sw/airborne/math is used in all airborne code of paparazzi. It provides | 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 | * to manipulate euler angles, quaternion and rotation matrix | ||
* for basic trigonometry using fixed-point algebra | * for basic trigonometry using fixed-point algebra | ||
* to perform geodetic transform | * to perform geodetic transform | ||
The generated | 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. | A PDF documentation can also be generated from the TeX files in doc/pprz_algebra and doc/pprz_geodetic. |
Revision as of 02:03, 15 April 2015
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