The reflection and refraction of electromagnetic waves in a moving inhomogeneous plasma