What is the relationship between nonlinear least squares and the Extended Kalman Filter (EKF)? I've learned both topics separately and thought I understood them, but am now in a class where the EKF (assuming no state dynamics/process model) is being presented as a form of nonlinear least squares and am getting confused.
Am I right in thinking that the EKF is like a recursive form of Gauss-Newton or Levenberg-Marquardt, where you update the state estimate with a single Newton step for each measurement? This makes it apparent that the EKF is a worse estimator than running Gauss-Newton/Levenberg-Marquardt over the full batch of data since the initial measurements are integrated with poor linearization points that are never updated.
If you did just run a batch Gauss-Newton/Levenberg-Marquardt, how would you obtain an uncertainty estimate as in the EKF?