A method of calibrating magnetometers on a spinning spacecraft