Skip to main content

Kalman filter stuff

Project description

GitHub PyPI - Python Version PyPI PyPI - Downloads

Spice Weasel

I knocked it up a notch with my spiceweasel. Bam!

under development

The list of imported packages can be found in the pyproject.toml.

Usage

Basic example:

import numpy as np
from spiceweasel import EKF

def func(dt, x, u):
    """
    dt: time step
    x: state estimate
    u: control forces or other inputs
    """

    # differential equations
    return x

# create a kalman filter
ekf = EKF(func, dt, 2, 2)

# so reset puts R and Q to identify matrix, you should
# adjust them to your system
ekf.reset()
ekf.R *= [0.01,0.01,0.1] # measurement cov
ekf.Q *= [.05,.05,.1]    # process cov
ekf.x = np.array([1,-2]) # default sets this to zeros

# main filtering loop
for i in range(num):
    # ...
    ekf.predict(u)
    # ...
    y = ekf.update(meas)

# ...

MIT License

Copyright (c) 2022 Mom's Friendly Robot Company

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spiceweasel-0.0.3.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

spiceweasel-0.0.3-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file spiceweasel-0.0.3.tar.gz.

File metadata

  • Download URL: spiceweasel-0.0.3.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.5 Darwin/21.6.0

File hashes

Hashes for spiceweasel-0.0.3.tar.gz
Algorithm Hash digest
SHA256 b10029524f60f0b0c42d9931f1b86b381dcc21756ac33512733e6f644a61cf4c
MD5 ac91f4f3276da2015dd8ef00b9813216
BLAKE2b-256 bbd99ee1912e5111ba84067404d4637fbe516769e3b98d9416987fb7ff21401c

See more details on using hashes here.

File details

Details for the file spiceweasel-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: spiceweasel-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.5 Darwin/21.6.0

File hashes

Hashes for spiceweasel-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b279fb3832bfa53350fc7077f87afd3f24592033f294b53d5476e23503a96e92
MD5 0360dbca6ef80cb34edeb3e2b7afc071
BLAKE2b-256 8b464e09a0bb97219f0934488d188d767ea42ea25fd3ef8b4640a6bc8c903cba

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page