wouterbulten / kalmanjs

Javascript based Kalman filter for 1D data

Home Page:https://www.wouterbulten.nl/blog/tech/lightweight-javascript-library-for-noise-filtering/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kalmanjs in real time?

ruralkan opened this issue · comments

Hi

Great job, I have a question, I saw you have a data set to apply Kalman Filter, so, It's possible apply to real time data??

Sorry I newby in javascript

Best regards

Yes, it is meant to be used with real time data :)

As in the example (this is ES6):

import KalmanFilter from 'kalmanjs';

const kf = new KalmanFilter();

console.log(filteredValue = kf.filter( readRealTimeValueFromSomething() ));

... later ...

console.log(filteredValue = kf.filter( readRealTimeValueFromSomething() ));

Each time you receive / measure a new data point just apply filter() and you will receive the filtered value. Does that help you?

See also: https://wouterbulten.nl/blog/tech/lightweight-javascript-library-for-noise-filtering/

Closed. Please let me know when my comment didn't solve your problem :)