I have created an app that uses the power of a WiFi signal to determine distance to the WiFi access point. Problem with that power reading is that it is not very stable. I have been looking into filtering techniques and a Kalman filter seems perfect, albeit not trivial.
Could you help me create a model or give some hints on the use of the Kalman filter to filter out the noise?
Kalman filter can be explained in these simple terms:
1) It assumes that you have a probabilistic model for how system changes with time. In your case how the power of the source changes. From what you tell me, for a stationary source, you can assume this to be constant.
2) It assumes how the measurement system works. For example, you may assume that the received power follows inverse squared law. Note, if either the source or the detector moves, then you have to model the motion as part of (1) above. Probabilistically you can assume that the jerk (change in acceleration) is a zero mean random variable.
3) You have a probabilistic model in your measurement errors.
In your case, if you assume a stationary source and stationary detector, then you can assume nothing changes in the system. In this case Kalman filter reduces to least squares solution. So you just average the last $N$ measured values, or use some form auto regression. If $P$ is the measured power, and $\hat P$ is the filtered value, then a simple recursive formula which you update at every measurement: $$ \hat P = \hat P + \theta (P -\hat P),~~ 0 \le \theta \le 1 $$ where $\theta$ is a measure of how much you trust the measurement. Note that if $\theta = 1$ then there is no filtering $\hat P = P$. If $\theta =0$ then measurement is rejected (no change in $\hat P$). You can change $\theta$ from one measurement if you have an independent way to asses the confidence in the measurement.