# Конструктор спутника "ОрбиКрафт"

### Sidebar

What is Orbicraft for?

How to work with it

Orbicraft Subsystems

Lessons

Laboratory equipment

Feedback

News

en:mag_subsys

Magnetometer
Virtual consumption - 40mA

When designing spacecrafts that operate in low earth orbits, a magnetometer is often used as one of the devices for determining orientation (usually supplementing the solar sensors). The magnetometer measures the magnetic field around itself and outputs three components of the magnetic field induction vector in Tesla units. Under ideal conditions, the magnetometer on board the satellite measures the geomagnetic field of the Earth - the very thing that causes a compass needle to rotate for the ground user. However, in real life, the construction of any satellite contains magnetic materials (for example, permanent magnets of electric drives), so the magnetometer measures a certain total magnetic field of the Earth and the magnetic field of the satellite itself - the so-called superposition of fields.

The magnetic field of the Earth is well-researched, not only at the surface of the Earth, but also in near-Earth space. There are, however, some distinctions in its behavior, including many interesting, yet not fully explored effects… But this is science. To determine the satellite orientation according to the magnetometer readings, it is sufficient to use the exact mathematical model of the magnetic field, for example, IGRF, which can be placed on the satellite in the form of program code.
Comparing the magnetometer readings with the calculated values of the geomagnetic field model makes it possible to estimate the orientation (and in some cases the position) of the spacecraft in space. When carrying out experiments with a “satellite” in the laboratory, it is proposed to use a magnetometer as an instrument both for determining the orientation and for determining the position of the satellite in “orbit”, i.e. for navigation. In this case, the “geomagnetic” field, measured by a magnetometer on-board, is created by special laboratory equipment and is controlled from the computer according to a predetermined control law.

At the beginning of the experiment, users will be given a function of the magnetic field dependence on the satellite position in orbit above the planet. After that, by making the appropriate changes to your program code, it becomes possible to determine the satellite position according to the magnetometer readings.

To obtain the current magnetometer readings, use this function:

int32_t magnetometer_request_raw(uint16_t num,int16_t *pRAW_dataX,int16_t *pRAW_dataY,int16_t *pRAW_dataZ);

Once again, we emphasize that inside the “satellite,” as well as on real spacecrafts, the magnetometer readings do not only depend on the external “geomagnetic” field. Other devices (mainly flywheel motors and power supply systems) can interfere with measurements, so it is not recommended to install a magnetometer near these devices.