@types/kalmanjs
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Installation

npm install --save @types/kalmanjs

Summary

This package contains type definitions for kalmanjs (https://github.com/wouterbulten/kalmanjs).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/kalmanjs.

// Type definitions for kalmanjs 1.1.0
// Project: https://github.com/wouterbulten/kalmanjs

declare namespace KalmanFilter {
    interface Options {
        /**
         * Process noise
         */
        R?: number;

        /**
         * Measurement noise
         */
        Q?: number;

        /**
         * State vector
         */
        A?: number;

        /**
         * Control vector
         */
        B?: number;

        /**
         * Measurement vector
         */
        C?: number;
    }
}

declare class KalmanFilter {
    /**
     * Create 1-dimensional kalman filter
     * @param  {Number} options.R Process noise
     * @param  {Number} options.Q Measurement noise
     * @param  {Number} options.A State vector
     * @param  {Number} options.B Control vector
     * @param  {Number} options.C Measurement vector
     * @return {KalmanFilter}
     */
    constructor(options?: KalmanFilter.Options);

    /**
     * Filter a new value
     * @param  {Number} z Measurement
     * @param  {Number} u Control
     * @return {Number}
     */
    filter(z: number, u?: number): number;

    /**
     * Predict next value
     * @param  {Number} [u] Control
     * @return {Number}
     */
    predict(u?: number): number;

    /**
     * Return uncertainty of filter
     * @return {Number}
     */
    uncertainty(): number;

    /**
     * Return the last filtered measurement
     * @return {Number}
     */
    lastMeasurement(): number;

    /**
     * Set measurement noise Q
     * @param {Number} noise
     */
    setMeasurementNoise(noise: number): void;

    /**
     * Set the process noise R
     * @param {Number} noise
     */
    setProcessNoise(noise: number): void;
}

export = KalmanFilter;

export as namespace KalmanFilter;

Additional Details

  • Last updated: Mon, 26 Aug 2024 06:10:12 GMT
  • Dependencies: none

Credits

These definitions were written by Wouter Bulten.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.091ts5.7
1.1.091ts5.6
1.1.091ts5.5
1.1.091ts5.4
1.1.091ts5.3
1.1.091ts5.2
1.1.091ts5.1
1.1.091ts5.0
1.1.091ts4.9
1.1.091ts4.8
1.1.091latest
1.1.091ts5.8

Version History

VersionDownloads (Last 7 Days)Published
1.1.091

Package Sidebar

Install

npm i @types/kalmanjs

Weekly Downloads

91

Version

1.1.0

License

MIT

Unpacked Size

6.09 kB

Total Files

5

Last publish

Collaborators

  • types