Skip to content

Commit

Permalink
Added screenshot, updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterbulten committed Dec 2, 2015
1 parent ae2a7f9 commit 63e8332
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
src
resources
.babelrc
.eslintrc
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,36 @@

Javascript based Kalman filter for 1D data. Sometimes you need a simple noise filter without any dependencies; for those cases *Kalman.js* is perfect.

![Kalman filter applied to a noisy dataset.](/resources/kalman_example.png?raw=true "Kalman filter applied to a noisy dataset.")

## Example use

Using the filter is simple. First we create a simple dataset with random noise:

```javascript
//Generate a simple static dataset
var dataConstant = Array.apply(null, {length: dataSetSize}).map(function() {
return 4;
});
//Add noise to data
var noisyDataConstant = dataConstant.map(function(v) {
return v + randn(0, 3);
});
```

Then we apply the filter iteratively on each data element:

```javascript
//Apply kalman filter
var kalmanFilter = new KalmanFilter({R: 0.01, Q: 3});

var dataConstantKalman = noisyDataConstant.map(function(v) {
return kalmanFilter.filter(v);
});
```

See [this blog post](https://wouterbulten.nl/blog/tech/lightweight-javascript-library-for-noise-filtering/) for screenshots and more examples.

## Background

* [KalmanJS, Lightweight Javascript Library for Noise filtering](https://wouterbulten.nl/blog/tech/lightweight-javascript-library-for-noise-filtering/)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"type": "git",
"url": "git://github.com/wouterbulten/kalmanjs.git"
},
"description": "Javascript based Kalman filter for 1D data",
"description": "A small library implementing the principle of Kalman filters, without any dependencies, to filter out noise in 1D systems.",
"bugs": {
"url": "https://github.com/wouterbulten/kalmanjs/issues"
},
Expand Down
Binary file added resources/kalman-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 63e8332

Please sign in to comment.