{"id":41690711,"url":"https://github.com/konimarti/kalman","last_synced_at":"2026-01-24T20:15:08.789Z","repository":{"id":35129878,"uuid":"168323937","full_name":"konimarti/kalman","owner":"konimarti","description":"Adaptive Kalman filter in Golang","archived":false,"fork":false,"pushed_at":"2022-03-25T21:50:34.000Z","size":99,"stargazers_count":94,"open_issues_count":0,"forks_count":25,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-07T10:01:12.699Z","etag":null,"topics":["filtering","golang","kalman","prediction","sensor","sensor-fusion"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/konimarti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-30T10:25:54.000Z","updated_at":"2025-10-05T06:13:53.000Z","dependencies_parsed_at":"2022-07-21T16:34:47.135Z","dependency_job_id":null,"html_url":"https://github.com/konimarti/kalman","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/konimarti/kalman","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konimarti%2Fkalman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konimarti%2Fkalman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konimarti%2Fkalman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konimarti%2Fkalman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/konimarti","download_url":"https://codeload.github.com/konimarti/kalman/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konimarti%2Fkalman/sbom","scorecard":{"id":566931,"data":{"date":"2025-08-11","repo":{"name":"github.com/konimarti/kalman","commit":"25097b2d79d4a6ded52722bbfef9350957bcfaaf"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 1/19 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 14 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T15:13:53.839Z","repository_id":35129878,"created_at":"2025-08-20T15:13:53.839Z","updated_at":"2025-08-20T15:13:53.839Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28736502,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T19:23:36.361Z","status":"ssl_error","status_checked_at":"2026-01-24T19:23:28.966Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["filtering","golang","kalman","prediction","sensor","sensor-fusion"],"created_at":"2026-01-24T20:15:07.098Z","updated_at":"2026-01-24T20:15:08.768Z","avatar_url":"https://github.com/konimarti.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Adaptive Kalman filtering in Golang\n\n[![License](http://img.shields.io/badge/license-MIT-red.svg?style=flat)](https://github.com/konimarti/kalman/blob/master/LICENSE)\n[![GoDoc](https://godoc.org/github.com/konimarti/observer?status.svg)](https://godoc.org/github.com/konimarti/kalman)\n[![goreportcard](https://goreportcard.com/badge/github.com/konimarti/observer)](https://goreportcard.com/report/github.com/konimarti/kalman)\n\n```go get github.com/konimarti/kalman```\n\n* Adaptive Kalman filtering with Rapid Ongoing Stochastic covariance Estimation (ROSE) \n\n* A helpful introduction to how Kalman filters work, can be found [here](https://www.bzarg.com/p/how-a-kalman-filter-works-in-pictures/).\n\n* Kalman filters are based on a state-space representation of linear, time-invariant systems:\n\n\tThe next state is defined as\n\t```math\n\t x(t+1) = A_d * x(t) + B_d * u(t) \n\t```\n\t where A_d is the discretized prediction matrix and B_d the control matrix. \n\t x(t) is the current state and u(t) the external input. The response (measurement) of the system is y(t):\t \n\t```math\n\t y(t)  = C * x(t) + D * u(t) \n\t```\n\n## Using the standard Kalman filter\n```go\n\t// create filter\n\tfilter := kalman.NewFilter(\n\t\tlti.Discrete{\n\t\t\tAd, // prediction matrix (n x n)\n\t\t\tBd, // control matrix (n x k)\n\t\t\tC,  // measurement matrix (l x n)\n\t\t\tD,  // measurement matrix (l x k)\n\t\t},\n\t\tkalman.Noise{\n\t\t\tQ, // process model covariance matrix (n x n)\n\t\t\tR, // measurement errors (l x l)\n\t\t},\n\t)\n\n\t// create context\n\tctx := kalman.Context{\n\t\tX, // initial state (n x 1)\n\t\tP, // initial process covariance (n x n)\n\t}\n\n\t// get measurement (l x 1) and control (k x 1) vectors\n\t..\n\n\t// apply filter\n\tfilteredMeasurement := filter.Apply(\u0026ctx, measurement, control)\n}\n```\n\n### Results with standard Kalman filter\n\n![Results of Kalman filtering on car example.](example/car/car.png)\n\nSee example [here](example/car/car.go).\n\n### Results with Rapid Ongoing Stochasic covariance Estimation (ROSE) filter\n\n![Results of ROSE filtering.](example/rose/rose.png)\n\nSee example [here](example/rose/rose.go).\n\n### Math behind the Kalman filter\n\n* Calculation of the Kalman gain and the correction of the state vector ~x(k) and covariance matrix ~P(k):\n\t```math\n\t^y(k)  = C * ^x(k) + D * u(k)\n\tdy(k)  = y(k) - ^y(k)\n\tK(k) = ^P(k) * C^T * ( C * ^P(k) * C^T + R(k) )^(-1)\n\t~x(k) = ^x(k) + K(k) * dy(k)\n\t~P(k) = ( I - K(k) * C) * ^P(k)\n\t```\n* Then the next step is predicted for the state ^x(k+1) and the covariance ^P(k+1):\n\t```math\n\t^x(k+1) = Ad * ~x(k) + Bd * u(k)\n\t^P(k+1) = Ad * ~P(k) * Ad^T + Gd * Q(k) * Gd^T\n\t```\n  \n  \n\n## Credits\n\nThis software package has been developed for and is in production at [Kalkfabrik Netstal](http://www.kfn.ch/en).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonimarti%2Fkalman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkonimarti%2Fkalman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonimarti%2Fkalman/lists"}