Electromagnetic induction in the earth and moon