I'm interested in implementing a Kalman Filter in Python. First, I have programmed a very simple version of a K-Filter - only one state (Position in Y-Direction). My State transition Matrix looks like:
X <- X + v * t
with v and t are constants.
I simulate the measurement with a simple linear function
y = mx + b
and add noise to it:
y1 = np.random.normal(y, sigma, Nsamples).
It works pretty well, I can redefine R and Q to change the measurement and process noise value (Until now, it isn't a matrix).
Now I have an idea...
What happens if I would have a second measurement?
y2 = np.random.normal(y, sigma2, Nsamples)
How could I handle it? Shall I prefilter measurement like :
(y1 + y2) / 2
or is there a more suitable method/solution which involves the kalman filter?
There are numerous ways to handle fusion of multiple sensor measurements using Kalman Filter. A way to do it would be sequentially updating the Kalman Filter with new measurements.
See the slides by sensor fusion pioneer Hugh Durrant-Whyte found in this answer for quite a few ways how to fuse sensor data.