hamid-m
January 13, 2017, 10:16pm
1
I’m looking into the options for writing modules that need math/matrix operations. Part of the PX4 Firmware are both:
src/lib/matrix
src/lib/mathlib
Looking at the ekf2
or attitude_estimator_q
, it looks like mathlib
is being used.
Is there a difference between matrix
and mathlib
? Is one a superset of the other? If you have thoughts on which is better to use I’d appreciate knowing them.
Thank you in advance.
dagar
January 13, 2017, 10:37pm
2
Matrix is a new standalone template based library. https://github.com/PX4/matrix
hamid-m
January 13, 2017, 10:49pm
3
Thank you @dagar . So to confirm:
mathlib
evolved first, and then the matrix component was stripped out into as a separate standalone matrix
library
For PX4 modules development mathlib
is probably the way to go
Does that sound right?
dagar
January 13, 2017, 10:54pm
4
I believe the plan is to gradually replace the portions of mathlib with what’s available in matrix.
Matrix is widely used across the codebase.