Studies of the magnetic dipoles of the earth and the planets