Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input data with timestamps #33

Closed
btsimonh opened this issue Jan 31, 2023 · 2 comments
Closed

input data with timestamps #33

btsimonh opened this issue Jan 31, 2023 · 2 comments

Comments

@btsimonh
Copy link

Hi Wouter,

nice and simple library...

I could apply this for various data filtering in a robot environment. (e.g. RSSI from BLE devices for localisation, speed and position from wheel sensors, etc. are areas where I am struggling with accuracy).

Do I assume that the filter requires a constant time interval between measurements, as there seems no concept of time in the filter?

Background:
For wheel sensors, I have microsecond timestamps on the readings - basically I get a new reading each time the sensor detects it.
For RSSI, the timing of values is fairly random, but I do have timestamps.

What would be your approach for using a kalman filter on inputs where the time interval is not constant?

best regards,

Simon

@byoung2
Copy link

byoung2 commented Apr 3, 2023

I am testing this out for filtering GPS measurements. I get 10 updates per second but they aren't always 100ms apart. Is it necessary for the measurements to be evenly spaced? If so, I could calculate a sliding window median at a less frequent interval (e.g. every second for the measurements in the last second) and feed those to the filter. Or should there be a way to pass in time delta since last measurement? If a GPS location is moving at a constant rate but the measurements are not evenly spaced, it might look like more noise.

@wouterbulten
Copy link
Owner

In principle the library is unaware of the time that has passed and it will work best if it is as constant as possible. If the time between the last measurement increases, I assume that the noise estimates should also change (as you are probably farther off). In my usage of the library (for indoor positioning) I assumed that the time deltas were so short, that you could assume there was no movement. This was quite a simplification, but worked for the use case (some background here https://www.wouterbulten.nl/posts/slacjs/#presentation). More complicated scenario's are a bit out of scope for this lib.

Closing this issue for further discussion, as issues are limited to discussions regarding problems/improvements of the library. Questions can be placed in the blog post https://www.wouterbulten.nl/posts/lightweight-javascript-library-for-noise-filtering/ which also contains many answers to common questions. Alternatively, I have a blog post with more background about how the filter works: https://www.wouterbulten.nl/posts/kalman-filters-explained-removing-noise-from-rssi-signals

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants