Smoothen rx value streams for e.g. sensor data using kalman filter.

Overview

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.

Screenshot Screenshot

How to use

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.
You might also like...
Animated-splash-screen - Animate your Splash Screen using  Lottie files.
Animated-splash-screen - Animate your Splash Screen using Lottie files.

Animated Splash Screen This small project shows how you can add animation into your android projects or create beautiful looking Splash Screen or Laun

Portfolio-kobweb - A sample project for portfolio built using Kobweb project bootstrapped with the site template

This is a sample project for portfolio built using Kobweb project bootstrapped w

Backarrow-animation-example - Animate back arrow to close button in Compose using animated drawables
Backarrow-animation-example - Animate back arrow to close button in Compose using animated drawables

Animate Back Arrow to Close Icon in Compose This is a simple demo for animated v

PassCode is the Android app made by using Jetpack Compose. Created for the test task submission.
PassCode is the Android app made by using Jetpack Compose. Created for the test task submission.

PassCode PassCode is the Android app made by using the Jetpack Compose. Created for the test task submission. Showcase Dark Theme Light Theme ACs The

Helps to find your surrounding's light value (for android only) using device light sensor

react-native-ambient-light-sensor Helps to find your surrounding's light value (in lux unit) (for android only) using device light sensor Installation

Monitoring water tanker level using NodeMCU ESP8266 and HC-SR04P Ultrasonic Sensor and broadcasting it using a simple HTTP server inside NodeMCU ESP8266 and show data in an Android App
Monitoring water tanker level using NodeMCU ESP8266 and HC-SR04P Ultrasonic Sensor and broadcasting it using a simple HTTP server inside NodeMCU ESP8266 and show data in an Android App

WaterLevel Preface This project aims to finding a tanker water level using NodeMCU with ESP8266 core and HC-SR04P Ultrasonic sensor and broadcasting i

Demo app to showcase Sensor data using AIDL bound services.
Demo app to showcase Sensor data using AIDL bound services.

AIDLServices Displays data related to TYPE_ROTATION_VECTOR sensor using AIDL Consist of aidlsdk module that expose sensor data Sample app to show the

MiHawk  🦅👁️  is simple and secure 🔒 Android Library to store and retrieve pair of key-value data with encryption , internally it use jetpack DataStore Preferences 💽 to store data.
MiHawk 🦅👁️ is simple and secure 🔒 Android Library to store and retrieve pair of key-value data with encryption , internally it use jetpack DataStore Preferences 💽 to store data.

MiHawk MiHawk 🦅 👁️ is simple and secure 🔒 Android Library to store and retrieve pair of key-value data with encryption , internally it use jetpack

A clean-aesthetically pleasing Measuring Application, which uses relevant sensors-converts raw sensor data into human readable formatted outputs-and displays accurate measurements.
A clean-aesthetically pleasing Measuring Application, which uses relevant sensors-converts raw sensor data into human readable formatted outputs-and displays accurate measurements.

Measure App A clean-aesthetically pleasing Measuring Application, which uses relevant sensors-converts raw sensor data into human readable formatted o

Sort & Filter Data RecyclerView
Sort & Filter Data RecyclerView

Sort-Filter-RecyclerView Sort & Filter Data RecyclerView Tutorial Build with Android Studio

TMDbHub - Listing movies using the TMDb API. You can filter results, view details, and save them to a collection
TMDbHub - Listing movies using the TMDb API. You can filter results, view details, and save them to a collection

TMDb Hub Listing movies using the TMDb API. You can filter results, view details

Accessibility-Service - Filter url from browser by using accessibility service
Accessibility-Service - Filter url from browser by using accessibility service

Accessibility Service example Filter url from browser by using accessibility ser

Custom UI control for android which is showing data as a segments and a value inside them.
Custom UI control for android which is showing data as a segments and a value inside them.

Segmented Bar View for Android Custom UI control for android which is showing data as a segments and a value inside them. Screenshots Install From rep

Android - Annotate methods to use as listeners for a sensor.
Android - Annotate methods to use as listeners for a sensor.

SensorAnnotations Annotate methods to use as listeners for sensor events. public class MyActivity extends Activity { /** * Perform actions as

Android Sensor Based App

Sensor-Team Sensor Based Mobile Applications Make sure you have the latest version of android studio There are no api keys that need to be generated n

Android library which makes playing with sensor events & detecting gestures a breeze.
Android library which makes playing with sensor events & detecting gestures a breeze.

Sensey Android library which makes playing with sensor events & detecting gestures a breeze. The library is built for simplicity and ease of use. It e

Distance Sensor Localization Library created by FTC 16439, AlphaGo

AGDistanceLocalization A simple and easy-to-use library, written in Kotlin, to aid in the process of localizing your robot using Distance Sensors! Thi

Xposed-based motion simulator with sensor support.

This project is under active development MotionEmulator Android motion simulator with sensor support. Scenarios If you study in universities in China,

A Kotlin Android library for content provider queries with reactive streams and coroutines.

Pickpocket An Android library for content provider queries with reactive streams and coroutines. Calendar Contacts SMS MMS Files/Media Call Log Bookma

Comments
  • Error

    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

    opened by simpler23 0
Owner
Jan Rabe
Native Android / Unity Developer & Technocrat #kotlin #csharp #unity #opensource
Jan Rabe
Android library which makes playing with sensor events & detecting gestures a breeze.

Sensey Android library which makes playing with sensor events & detecting gestures a breeze. The library is built for simplicity and ease of use. It e

Nishant Srivastava 2.7k Dec 29, 2022
Android library. Flexible components for chat UI implementation with flexible possibilities for styling, customizing and data management. Made by Stfalcon

ChatKit for Android ChatKit is a library designed to simplify the development of UI for such a trivial task as chat. It has flexible possibilities for

Stfalcon LLC 3.6k Jan 5, 2023
Android GraphView is used to display data in graph structures.

GraphView Android GraphView is used to display data in graph structures. Overview The library is designed to support different graph layouts and curre

null 991 Dec 30, 2022
With MVVM Architecture pattern using Android Architecture Components This is a sample app demonstrating Youtube player animation using constraint layout

Youtube UI/UX Animation This is a sample app demonstrating Youtube UX/UI animation using ConstraintLayout.It implements the Keyframe Animation feature

Burhanuddin Rashid 866 Dec 29, 2022
🌠 Transform into a different view or activity using morphing animations.

TransformationLayout ?? Transform into a different view or activity using morphing animations. Using Transformation motions of new material version. D

Jaewoong Eum 2k Jan 3, 2023
[] Android library for using the Honeycomb animation API on all versions of the platform back to 1.0!

DEPRECATED NineOldAndroids is deprecated. No new development will be taking place. Existing versions will (of course) continue to function. New applic

Jake Wharton 4.5k Jan 9, 2023
A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.

PhotoEditor A Photo Editor library with simple, easy support for image editing using Paints, Text, Filters, Emoji and Sticker like stories. Features D

Burhanuddin Rashid 3.6k Jan 9, 2023
Road Runner is a library for android which allow you to make your own loading animation using a SVG image

Road Runner Road Runner is a library for android which allow you to make your own loading animation using a SVG image Sample video View in Youtube Dem

Adrián Lomas 1.2k Nov 18, 2022
How to improve the user experience using animated icons with vector drawables on Android

Android Animated Icons How to improve the user experience using animated icons with vector drawables on Android English version https://medium.com/@an

André Mion 116 Nov 25, 2022
AXrLottie (Android) Renders animations and vectors exported in the bodymovin JSON format. (Using rLottie)

AXrLottie (Android) Renders animations and vectors exported in the bodymovin JSON format. (Using rLottie)

AmirHosseinAghajari 128 Nov 26, 2022