Giter Club home page Giter Club logo

kalmanrx's Introduction

Donation About Jan Rabe

KalmanRx Android Arsenal Javadoc Build Status API Gradle Version Kotlin Licence androidx

Introduction

Removes the noise from float streams using Kalman Filter. Useful to smoothen sensory data e.g.: gps location, or Accelerometer.

is an open-source library for Android that provides a set of classes and utilities for implementing Kalman filtering in reactive programming applications using the RxJava library.

Kalman filtering is a mathematical technique that is used to estimate the state of a dynamic system based on a series of noisy measurements. It is commonly used in signal processing, control systems, and navigation applications.

The KalmanRx library provides a set of reactive operators that can be used to implement Kalman filtering in RxJava applications. These operators allow you to easily filter noisy data streams, estimate the state of dynamic systems, and make predictions about future states.

Some of the key features of the KalmanRx library are:

Integration with RxJava: The library is designed to work seamlessly with the RxJava library, which allows you to easily combine Kalman filtering with other reactive programming techniques. Support for multiple Kalman filter models: The library provides a set of pre-defined Kalman filter models that can be used to filter different types of data streams, including scalar, vector, and matrix data. Configurable filter parameters: The library allows you to configure the filter parameters, such as the process noise, measurement noise, and initial state, to optimize the filter performance for your specific application. Real-time filtering: The library is optimized for real-time applications, and provides a set of utilities to measure the filter performance, detect anomalies, and adjust the filter parameters in real-time. Overall, the KalmanRx library can be a useful tool for implementing Kalman filtering in reactive programming applications on the Android platform, especially for developers who are working with dynamic systems and noisy data streams.

Screenshot Screenshot

Library is supporting up to 3 values smoothened from a stream.

(float) stream

KalmanRx.createFrom1D(floatObservable.map(e -> e.value))
    .subscribe(value->{}, Throwable::printStackTrace);

(float, float) stream

KalmanRx.createFrom2D(floatObservable.map(e -> e.values))
    .subscribe(values->{}, Throwable::printStackTrace);

(float, float, float) stream

KalmanRx.createFrom3D(floatObservable.map(e -> e.values))
    .subscribe(value->{}, Throwable::printStackTrace);

How to install

implementation 'com.github.kibotu:KalmanRx:-SNAPSHOT'

How to build

graldew clean build

CI

gradlew clean assembleRelease test javadoc

Build Requirements

  • JDK8
  • Android Build Tools 27.0.3
  • Android SDK 27

Notes

Follow me on Twitter: @wolkenschauer

Let me know what you think: [email protected]

Contributions welcome!

License

Copyright 2016 Jan Rabe

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

kalmanrx's People

Contributors

kibotu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kalmanrx's Issues

Error "Incompatible result matrix."

Hi, I've got an error "Incompatible result matrix." from the below method.
I'm using KalmanRx 2.0.0 version and kotlin.

public Matrix gemm(Matrix B, Matrix C, double alpha, double beta) {

    // m = rows;
    // n = columns;
    int p = B.n; // columns of B

    // cannot change C :(
    Matrix X = new Matrix(m, p); // X ~ C

    if (C == null) { // multiplication - rare, but necessary :(

        if (B.m != n) {
            throw new IllegalArgumentException("Matrix inner dimensions must agree.");
        }
       ....
      if (C.m != m || C.n != p) {
            **throw new IllegalArgumentException("Incompatible result matrix.");**
        }

My code is

val positionList: List = ...

KalmanRx.createFrom2D(rx.Observable.from(positionList.map { floatArrayOf(it.latitude.toFloat(), it.longitude.toFloat()) }))
.toList().subscribe { Log.i("tag", "arrived list: ${it}") }

I want to smooth the above list(val positionList).
What am I wrong?

This is a sample list value

(37.499884, 127.0351041) (37.4998852, 127.0351025) (37.4998853, 127.0351035) (37.4998876, 127.0351058) (37.4998904, 127.035109) (37.4998883, 127.035104) (37.4998849, 127.0351032) (37.4998897, 127.0351096) (37.4998857, 127.0351054) (37.4998844, 127.0351039) (37.4998843, 127.0351034) (37.4998899, 127.0351096) (37.4998858, 127.0351052) (37.4998845, 127.035104) (37.4998898, 127.0351097) (37.4998856, 127.0351049) (37.4998843, 127.0351036) (37.4998898, 127.0351096) (37.4998856, 127.035105) (37.4998841, 127.0351032) (37.4998842, 127.0351037) (37.4998899, 127.0351098) (37.4998858, 127.0351052) (37.4998844, 127.0351037) (37.4998843, 127.0351036) (37.4998845, 127.0351037) (37.4998846, 127.0351039) (37.4998901, 127.0351099)

Thank you and sorry for my poor English

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.