I'm developing a device for tracking pets in a room with several motion detectors. I use a Kalman filter to estimate the position, which is based on the active outputs of the motion detectors. If an motion detector is active the center of the detection region is the measurement value (position). In some cases the filter estimates the position to be outside the room.
How can I restrict the Kalman filter, should I restart and reinitialise the filter when the estimated position is not in the predefined area (of the room)?