Instead of trusting the faulty GPS or the imperfect speedometer blindly, the Kalman filter combines both sources of data. By factoring in the statistical uncertainty of each input, it calculates a highly accurate "optimal estimate" of the drone's actual position in real time.
Example: "Based on the last known position and current speed, the car should be at marker 100." kalman filter for beginners with matlab examples download
Modify the example code to track a different physical parameter, like the temperature of a room or the voltage of a battery, using real data you collect. The filter's state-space model can be easily changed from a kinematic one to a thermal or electrical model. Instead of trusting the faulty GPS or the
% --- Prediction step --- % For constant temperature, prediction = previous estimate x_pred = x_est; P_pred = P_est + process_noise_std^2; The filter's state-space model can be easily changed