https://github.com/kibotu/kalmanrx
Smoothen rx value streams for e.g. sensor data using kalman filter.
https://github.com/kibotu/kalmanrx
android-library hacktoberfest hacktoberfest2023 kalman-filter rx rxjava-android
Last synced: 5 days ago
JSON representation
Smoothen rx value streams for e.g. sensor data using kalman filter.
- Host: GitHub
- URL: https://github.com/kibotu/kalmanrx
- Owner: kibotu
- License: apache-2.0
- Created: 2016-10-11T08:52:45.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-03-16T09:00:53.000Z (over 2 years ago)
- Last Synced: 2025-04-14T04:37:23.610Z (6 months ago)
- Topics: android-library, hacktoberfest, hacktoberfest2023, kalman-filter, rx, rxjava-android
- Language: Java
- Homepage: https://android-arsenal.com/details/1/4539
- Size: 465 KB
- Stars: 103
- Watchers: 7
- Forks: 20
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://www.paypal.me/janrabe/5) [](https://about.me/janrabe)
# KalmanRx [](http://android-arsenal.com/details/1/4539) [](https://jitpack.io/#kibotu/KalmanRx) [](https://jitpack.io/#kibotu/KalmanRx) [](https://jitpack.io/com/github/kibotu/KalmanRx/master-SNAPSHOT/javadoc/index.html) [](https://travis-ci.org/kibotu/KalmanRx) [](https://android-arsenal.com/api?level=15) [](https://docs.gradle.org/current/release-notes) [](https://kotlinlang.org/) [](https://raw.githubusercontent.com/kibotu/KalmanRx/master/LICENSE) [](https://developer.android.com/topic/libraries/support-library/refactor)## Introduction
Removes the noise from float streams using [Kalman Filter](https://en.wikipedia.org/wiki/Kalman_filter). Useful to smoothen sensory data e.g.: [gps location](https://github.com/villoren/KalmanLocationManager), or [Accelerometer](https://developer.android.com/guide/topics/sensors/sensors_motion.html#sensors-motion-accel).
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. 
## [How to use](https://github.com/kibotu/KalmanRx/blob/master/app/src/main/java/net/kibotu/kalmanrx/app/ui/AccelerationSensorKalmanFragment.java#L16-L19)
Library is supporting up to 3 values smoothened from a stream.
(float) stream
```java
KalmanRx.createFrom1D(floatObservable.map(e -> e.value))
.subscribe(value->{}, Throwable::printStackTrace);
```(float, float) stream
```java
KalmanRx.createFrom2D(floatObservable.map(e -> e.values))
.subscribe(values->{}, Throwable::printStackTrace);
```(float, float, float) stream
```java
KalmanRx.createFrom3D(floatObservable.map(e -> e.values))
.subscribe(value->{}, Throwable::printStackTrace);
```## How to install
```groovy
implementation 'com.github.kibotu:KalmanRx:-SNAPSHOT'
```## How to build
```bash
graldew clean build
```### CI
```bash
gradlew clean assembleRelease test javadoc
```#### Build Requirements
- JDK8
- Android Build Tools 27.0.3
- Android SDK 27### Notes
Follow me on Twitter: [@wolkenschauer](https://twitter.com/wolkenschauer)
Let me know what you think: [jan.rabe@kibotu.net](mailto:jan.rabe@kibotu.net)
Contributions welcome!
### License
Copyright 2016 Jan RabeLicensed 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 athttp://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.