The code is adapted from the matlab code in the class, and the course content can be viewed on https://www.bilibili.com/video/BV1Z341147K9?p=12&vd_source=820cccaac77c148735a6f993eab65694.
There are four beacons on the plane with known positions, while a robot moves on the plane at a constant velocity. The distance of the point from the four beacons can be measured at each moment, but the measurements contain noise. In this example, we use Extended Kalman Filter (EKF) to estimate the location of the robot in real time based on measurements.
Let
In the figure, the red dots are the beacons, and the blue diamond is the actual position of the robot. For the filtering result, the red fork is the mean value of the estimated position, and the purple ellipsoid is the confidence ellipsoid of the estimated position with confidence equal to 0.95.