# confused by robott_localization by the process of predict and correct in filter? [closed]

Hello, I am confused by the processMeasurement() function in filter_base.cpp . Both predict and correct use the same measurement ? In normal EKF, I think one measurement is used for predict, another for correct.

```
// If we've had a previous reading, then go through the predict/update
// cycle. Otherwise, set our state and covariance to whatever we get
// from this measurement.
if (initialized_)
{
// Determine how much time has passed since our last measurement
delta = measurement.time_ - lastMeasurementTime_;
FB_DEBUG("Filter is already initialized. Carrying out predict/correct loop...\n"
"Measurement time is " << std::setprecision(20) << measurement.time_ <<
", last measurement time is " << lastMeasurementTime_ << ", delta is " << delta << "\n");
// Only want to carry out a prediction if it's
// forward in time. Otherwise, just correct.todo a little confused here, both predict and correct use the same measurement ?
if (delta > 0)
{
validateDelta(delta);
predict(measurement.time_, delta);
// Return this to the user
predictedState_ = state_;//
}
correct(measurement);//
}
```