Discussion:
Matrix math C++ class library for MCUs?
(too old to reply)
Dave Nadler
2022-11-01 15:16:02 UTC
Permalink
Hi Guys - I'm searching for a C++ matrix math library suitable for
Kalman filter implementation on MCUs. I found a few but they may be
zombies, for example Eigen
https://stackoverflow.com/questions/73883276/eigen-matrix-template-library-over-arm-cmsis-dsp
got crickets.
What do you guys use?
Thanks in advance,
Best Regards, Dave
David Brown
2022-11-01 17:02:28 UTC
Permalink
Post by Dave Nadler
Hi Guys - I'm searching for a C++ matrix math library suitable for
Kalman filter implementation on MCUs. I found a few but they may be
zombies, for example Eigen
https://stackoverflow.com/questions/73883276/eigen-matrix-template-library-over-arm-cmsis-dsp got crickets.
What do you guys use?
Thanks in advance,
Best Regards, Dave
How big are your matrices? If they are just 2x2, you can probably roll
your own code as quickly as you can find and test something from the
net. Templates are sometimes very useful and elegant, but if you have
fixed known types and sizes, specific classes and functions are often
easier to debug.
Dave Nadler
2022-11-01 19:16:07 UTC
Permalink
Post by Dave Nadler
Hi Guys - I'm searching for a C++ matrix math library suitable for
Kalman filter implementation on MCUs. I found a few but they may be
zombies, for example Eigen
https://stackoverflow.com/questions/73883276/eigen-matrix-template-library-over-arm-cmsis-dsp got crickets.
What do you guys use?
Thanks in advance,
Best Regards, Dave
How big are your matrices?  If they are just 2x2, you can probably roll
your own code as quickly as you can find and test something from the
net.  Templates are sometimes very useful and elegant, but if you have
fixed known types and sizes, specific classes and functions are often
easier to debug.
Certainly a fair bit bigger than 2x2, non-sparse.
Eigen does seem to be active but don't know about use on MCUs.
M7 with adequate RAM should be OK though.
Using templates for decades during which diagnostics have improved ;-)
Paul Rubin
2022-11-02 05:14:43 UTC
Permalink
Post by Dave Nadler
Hi Guys - I'm searching for a C++ matrix math library suitable for
Kalman filter implementation on MCUs. I found a few but they may be
zombies, for example Eigen
I'm unfamiliar with Eigen and only vaguely informed about Kalman
filters, but doing eigenvalue calculation properly takes some know-how,
and you're better off using a library rather than rolling your own.
Does the MCU angle actually matter in relation to the library choice?
There are a zillion linear algebra packages out there, the best known
probably being LAPACK.

I have no idea if this is suitable for your requirements:

https://www.gnu.org/software/gsl/
Dave Nadler
2022-11-02 11:36:27 UTC
Permalink
Post by Paul Rubin
https://www.gnu.org/software/gsl/
Thanks Paul, unfortunately GSL has polluting GPL license; can't use it
for current project... Eigen license is non-polluting.

Loading...