The classical instrument for measuring magnetic fields has for a long period been the analogue fluxgate magnetometer.Based on the sensor technology developed at the Department of Automation, Technical University of Denmark, this kind of instrument has involved into a high precision and reliable instrument.However, some problems are still present in the analogue electronics.In this thesis an instrument, based on digital signal processing, is presented. The instrument uses an early digitalisation of the fluxgate sensor signal and derives the magnetic field with mathematical algorithms implemented in digital signal Processors. The basic properties behind the instrument are described and it is shown that the instrument works equally well as the analogue version. The first fully working instrument, based on digital signal processing for the Swedish micro-satellite Astrid-2, is described. Finally solutions to some of the problems with this instrument are presented and a proposal for a future implementation is given.