Skip to content

documentation error in generic model example #83

@Asw1n

Description

@Asw1n

The example code of the generic lineair model (https://www.npmjs.com/package/kalman-filter?activeTab=readme#instanciation-of-a-generic-linear-model) gives an error. See below for the error. I managed to track this down to the observation missing a covariance element. When I change observation to

observation: {
    dimension: 3,
    covariance: [1, 1, 1, 0.01, 0.01, 0.01]
  }

the example will run.

Uncaught Error Error: observation.covariance : Only arrays and functions are authorized (got: "undefined")
at module.exports (file:///C:/Develop/speedandcurrent/node_modules/kalman-filter/lib/utils/to-function.js:25:9)
at modelsParametersToCoreOptions (file:///C:/Develop/speedandcurrent/node_modules/kalman-filter/lib/kalman-filter.js:106:16)
at KalmanFilter (file:///C:/Develop/speedandcurrent/node_modules/kalman-filter/lib/kalman-filter.js:126:23)
at (file:///C:/Develop/speedandcurrent/kalmantest.js:7:17)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at executeUserEntryPoint (node:internal/modules/run_main:81:12)
at (node:internal/main/run_main_module:23:47)

I managed to track this down to the observation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions