The magnetopause of the earth and planets