A one-page reference. Reread this before an exam, or before you write a mission's tracking-and-navigation plan.
The one idea
Orbit determination is prediction run backward: recover the six-number state (or six orbital elements) of a spacecraft from indirect, noisy observations. You never measure the orbit — only shadows of it (an angle, a range, a range-rate), through a known observation model $\mathbf{z} = h(\mathbf{x}) + \text{noise}$. Because observations are indirect and noisy, OD is estimation, not exact solution, and every estimate carries an uncertainty.
Least squares minimizes $\sum r_i^2$ (weighted: $\sum r_i^2/\sigma_i^2$). Squared, because it is smooth, punishes big misses, and is the most probable orbit for Gaussian noise.
General solution (linear-algebra level, flagged): $\delta\mathbf{x} = (H^\mathsf{T} W H)^{-1} H^\mathsf{T} W\,\mathbf{r}$, $H = \partial h/\partial\mathbf{x}$.
Read the residuals: structureless noise = healthy fit; a trend/wobble/jump = an unmodeled force, a maneuver, or a bad point.
MDR: added the Tracking, Navigation & Orbit Determination note — observation types, batch/filter approach, and required accuracy for your track.
Illustrative code:kalman_update(x_pred, var_pred, z, var_meas) — the scalar filter that seeds the Chapter 27 GN&C navigation filter. (Not a stable astrotools module; the operational filter is the 6-D EKF.)