# In the SLAM for dummies what is z-h in updating X?

In SLAM for Dummies there is on page 40 this formula:

$X = X+K(z-h)$

What is $z-h$ in updating $X$?

• in the document, it says: This operation will update the robot position along with all the landmark positions, given the term (z-h) does not result in (0, 0). Not e that (z-h) yields a result of two numbers which is the displacement in range and bearing, denoted v. My questions is what is z, what will be h? Sep 17 '17 at 10:14
• My understanding for z is measured range and bearing. e.g. given the lidar sensor, it reads out the range and bearing directly for the sensor, while h is the estimated range and bearing given the robot's current position and landmark's position. Is this right? Sep 17 '17 at 10:44

This is a good question, as the document is not clear. It appears that $z$ is the range/bearing measurement to the landmark (see discussion about $J_z$ on page 35), and $h$ is the estimate for range/bearing that the EKF gives (see page 38). This means that $z-h$ is the error (also called the innovation, for historic reasons). In the update we increment $X$ by the Kalman gain $K$ times the error $z-h$.