Socket
Socket
Sign inDemoInstall

@bencevans/kalman-filter

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @bencevans/kalman-filter

Kalman Filter


Version published
Weekly downloads
11
decreased by-31.25%
Maintainers
1
Install size
12.4 kB
Created
Weekly downloads
 

Readme

Source

@bencevans/kalman-filter

Typescript / JavaScript Implementation of Kalman Filter

Install

npm install --save @bencevans/kalman-filter

Example (Single Measurement)

> import KalmanFilter from '@bencevans/kalman-filter';

> const filter = new KalmanFilter({
    initialEstimate: 0,
    initialErrorInEstimate: 1
  })

> const [estimate, errorInEstimate] = filter.update({
    measurement: 20,
    errorInMeasurement: 0
  });

> estimate
20
> errorInEstimate
0

Example (Multiple Measurements)

Measurements with multiple numeric values e.g. coordinates.

> import { KalmanFilterArray } from '@bencevans/kalman-filter';

> const filter = new KalmanFilterArray({
    initialEstimate: [0, 1],
    initialErrorInEstimate: 1
  })

> const [estimate, errorInEstimate] = filter.update({
    measurement: [1, 1],
    errorInMeasurement: 0.4
  });

> estimate
[ 0.7142857142857143, 1 ]
> errorInEstimate
0.2857142857142857
  • https://en.wikipedia.org/wiki/Kalman_filter
  • https://www.youtube.com/watch?v=CaCcOwJPytQ&list=PLX2gX-ftPVXU3oUFNATxGXY90AULiqnWT

Keywords

FAQs

Last updated on 02 Jul 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc