Professional Grade Magnetometer RM3100 by Drotek is a ready-to-use and operational module that eliminates any noise in your magnetic field measurements for accurate heading and orientation calculations. This sensor is a heading reference to your drones so it can navigate through waypoints and eliminate magnetic disturbances due to motor coils and metal parts.
This 3-axis magnetometer, based on PNI’s proprietary magneto-inductive technology, delivers high-performance resolution and repeatability, with over 10 times better resolution and over 20 times lower noise than the leading Hall Effect sensor.
Professional Grade Magnetometer RM3100 provides a very high level of resolution (10 nT), with low power consumption and no hysteresis and can be used for applications that require high accuracy.
Refer to the schema on your sensor module with X,Y, Z axis.
This schema is on a NED (North East Down) repository as flight controllers. You need to place the module with the X arrow to the top of your autopilot, the Y arrow to the right (East) and Z arrow down.
Once the sensor is positioned in this way nothing prevents you from applying a rotation to the sensor in the "Set Orientation" section of the "Sensor calibration" menu of QgroundControl if you want to place it in another way .