hmartiro / kalman-cpp

Basic Kalman filter implementation in C++ using Eigen
MIT License
528 stars 134 forks source link

KalmanFilter class contructor #11

Closed Marslanali closed 4 years ago

Marslanali commented 4 years ago

Hi,

I've been trying to implement kalman filter but I wonder how KalmanFilter class constructor is called with 5 arguments i.e kf(A, C, Q, R, P). However, in constructor declaration it have 6 arguments including dt.

Same is for Kalman "init" function which take 2 arguments but only one argument is provided from main.

Any insight on this issue?

I look forward to hear from you soon.

Thanks

DanielSepeda commented 4 years ago

I had the same issue. Just pass dt as the first argument for kf along with the other arguments. i.e. kf(dt, A, C, Q, R, P). Same applies for the init function - init also requires passing dt as an argument (2 total arguments). Should compile just fine

DanielSepeda commented 4 years ago

Just created a pull request.

Marslanali commented 4 years ago

@DanielSepeda sounds good. Thanks