The doppler effect for electromagnetic waves