Kalman filter restricted by areal constraints 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)?
The simplest solution in terms of computational resources as much as simplicity, I guess, is the Unscented Kalman Filter (UKF). There, the clipping might easily be added to the calculation of the sigma-points, in a way that they remain in certain boundary. I recommend that you take a look at this article, for example (working in 2016.04.22, Constrained State Estimation Using the Unscented Kalman Filter, Rambabu Kandepu, Lars Imsland and Bjarne A. Foss)