In: Physics
How is the speed of an object in space measured? Also more importantly how do you measure your own speed in space? On the road we use a speedometer which tells us the speed easily. How is it done in space?
The main question is "relative to what?"
For space probes and the like, the speeds that matter are be either with respect to the Earth, the target object(s) (Mars, some asteroid, Space station, etc.), and/or the Sun (or Solar system barycenter). These speeds are measured mostly by Doppler shifts in
radio waves emitted by a radar the probe carries, reflected by the surface of some target
the communication signal between probe and Earth (see for instance, the deep space network).
Other methods have been used (image analysis between consecutive images taken by the space probe, the temperature of the heat shield on atmospheric entry, etc.) but these are all much less precise than Doppler measurements.
Space telescopes will measure redshift to some object (star, galaxy, etc.) (which is very similar to Doppler), which is more an indication of how fast that object is moving with respect to the entire solar system, rather than just the space telescope. Parallax methods are also used (see @IgnacioVazquez-Abrams's answer), but such methods can only be used for objects relatively close by (the parallax for most galaxies is too small to measure).
Other methods include Cepheid variables, and of course the famous Type 1a supernovae, which were used to conclude that the expansion of the universe is accelerating. But these are primarily measures of distance, and only crude measures of speed -- for objects at large distances, redshift is the only accurate way to measure the speed with respect to those objects.