Kalman filters have been widely used for navigation in mobile robotics. One of the key problems associated with Kalman filter is how to assign suitable statistical properties to both the dynamic and the observational models. For GPS-based localization of a rough-terrain mobile robot, the maneuver of the vehicle and the level of measurement noise are environmental dependent, and hard to be predicted. This is particularly true when the vehicle experiences a sudden change of its state, which is typical on rugged terrain due, for example, to an obstacle or slippery slopes. Therefore to assign constant noise levels for such applications is not realistic. In this work we propose a real-time adaptive algorithm for GPS data processing based on the observation of residuals. Large value of residuals suggests poor performance of the filter that can be improved giving more weight to the measurements provided by the GPS using a fading memory factor. For a finer gradation of this parameter, we used a fuzzy logic inference system implementing our physical understanding of the phenomenon. The proposed approach was validated in experimental trials comparing the performance of the adaptive algorithm with a conventional Kalman filter for vehicle localization. The results demonstrate that the novel adaptive algorithm is much robust to the sudden changes of vehicle motion and measurement errors.