Earth and mars magnetic field