  We give a rigorous derivation of the general-relativistic formula for the
two-way Doppler tracking of a spacecraft in Friedmann-Lemaitre-Robertson-Walker
and in McVittie spacetimes. The leading order corrections of the so-determined
acceleration to the Newtonian acceleration are due to special-relativistic
effects and cosmological expansion. The latter, although linear in the Hubble
constant, is negligible in typical applications within the Solar System.
