itamarwe / kalman

Kalman Filter in Javascript
113 stars 30 forks source link

Example not working #3

Closed imp-guru closed 8 years ago

imp-guru commented 9 years ago

Hi,

I get two errors when trying the example, first is: Uncaught ReferenceError: R_k is not defined

That one was easy enough to fix by changing line 59 to: function KalmanObservation(z_k,H_k,R_k){

But then there is the following error: Uncaught TypeError: Cannot read property '1' of undefined

it traces to line 49: this.K_k = this.P_kk.x(o.H_k.transpose().x(this.S_k.inverse()));//Optimal Kalman gain

I tried to trace it back but no luck yet, thoughts?

mairead commented 9 years ago

I've got the same error : Uncaught ReferenceError: R_k is not defined

Am wondering if R_k should be Q_k, or if they should both R_k and Q_k are required?

itamarwe commented 9 years ago

@mairead - Of course, both R_k and Q_k should be defined. They represent different things. You can have a look at my answer here for a more detailed explanation.

I need to have a closer look at the error. I hope to do it in the upcoming days.

mairead commented 9 years ago

Sorry, I think mine was just a typo. I had Q_k defined in the observation by mistake.