But how do we, sitting on earth know how rapidly a planet like Mercury which is around 48 million miles away is rotating ?
This is a very interesting example of Doppler effect.
Radio waves are shot from the earth towards the surface of mercury, one side of the planet will be red shifted (since it is moving away from you) and the other will be blue shifted (since it is moving towards you).
By measuring this apparent change in frequency, we can find out how rapidly mercury is rotating.
Using this method we have found out that the rotation period of mercury is approximately 58.6 days.
I saw someone working out with Battle Ropes the other day and this wonderful pattern emerged was absolutely fascinating. Of course, the waveforms are not purely sinusoidal but it helps us to understand why you see such patterns