These images are called opnav images. The observations are carefully planned and uplinked far in advance as part of the command sequence development process. The primary body often appears overexposed in an opnav, so the background stars will clearly visible. Interpretation of opnavs provides a very precise data set useful for refining knowledge of a spacecraft's trajectory as it approaches a target. Note that this form of navigation data resides in the TLM data type.
Orbit determination is an iterative process, building upon the results of previous solutions.
Many different data inputs are selected as appropriate for input to computer software, which uses the laws of Newton. The process of orbit determination is fairly taken for granted today. During the effort to launch America's first artificial Earth satellites, the JPL craft Explorers 1 and 2, a room-sized IBM computer was employed to figure a new satellite's trajectory using Doppler data acquired from Cape Canaveral and a few other tracking sites. The late Caltech physics professor Richard Feynman was asked to come to the Lab and assist with difficulties encountered in processing the data. He accomplished all of the calculations by hand, revealing the fact that Explorer 2 had failed to achieve orbit and had come down in the Atlantic ocean.