rfetick / Kalman

Implement Kalman filter for your Arduino projects
MIT License
131 stars 13 forks source link

Does not compile on arduino ide #9

Open yasin1205 opened 4 months ago

yasin1205 commented 4 months ago

Arduino:1.8.19 (Windows 10), Kart:"Node32s, Default, 80MHz, 921600, None, Disabled"

In file included from C:\Users\yasin\Desktop\Dosyalar\arduino\libraries\Kalman-master\examples\kalman_minimal\kalman_minimal.ino:12:

C:\Users\yasin\Desktop\Dosyalar\arduino\libraries\Kalman-master/Kalman.h:131:59: error: 'Array' does not name a type

template<int Nstate, int Nobs, int Ncom = 0, class MemF = Array<Nstate,Nstate,float> >

                                                       ^~~~~

C:\Users\yasin\Desktop\Dosyalar\arduino\libraries\Kalman-master/Kalman.h:131:64: error: expected '>' before '<' token

template<int Nstate, int Nobs, int Ncom = 0, class MemF = Array<Nstate,Nstate,float> >

                                                            ^

C:\Users\yasin\Desktop\Dosyalar\arduino\libraries\Kalman-master/Kalman.h:135:10: error: 'Identity' in namespace 'BLA' does not name a template type

 BLA::Identity<Nstate,Nstate> Id; // Identity matrix

      ^~~~~~~~

kalman_minimal:31:19: error: template argument 4 is invalid

KALMAN<Nstate,Nobs> K; // your Kalman filter

               ^

C:\Users\yasin\Desktop\Dosyalar\arduino\libraries\Kalman-master\examples\kalman_minimal\kalman_minimal.ino: In function 'void setup()':

kalman_minimal:47:5: error: request for member 'F' in 'K', which is of non-class type 'int'

K.F = {1.0, 0.0,

 ^

kalman_minimal:50:5: error: request for member 'H' in 'K', which is of non-class type 'int'

K.H = {1.0, 0.0,

 ^

kalman_minimal:53:5: error: request for member 'R' in 'K', which is of non-class type 'int'

K.R = {n1*n1, 0.0,

 ^

kalman_minimal:56:5: error: request for member 'Q' in 'K', which is of non-class type 'int'

K.Q = {m1*m1, 0.0,

 ^

C:\Users\yasin\Desktop\Dosyalar\arduino\libraries\Kalman-master\examples\kalman_minimal\kalman_minimal.ino: In function 'void loop()':

kalman_minimal:68:5: error: request for member 'F' in 'K', which is of non-class type 'int'

K.F = {1.0, 0.2,

 ^

kalman_minimal:75:5: error: request for member 'update' in 'K', which is of non-class type 'int'

K.update(obs);

 ^~~~~~

kalman_minimal:78:29: error: request for member 'x' in 'K', which is of non-class type 'int'

Serial << obs << ' ' << K.x << '\n';

                         ^

exit status 1

template argument 4 is invalid

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

floBik commented 1 month ago

Hey @yasin1205 ,

you must use the BasicLinearAlgebra library with version 3.7 or lower. In version 4 there are some breaking changes regarding the matrices used in the Kalman library.