This article aims to guide users on the installation and configuration of external magnetometers for various applications. It focuses on the integration of magnetometers with sbgECom data.

For this example, we are using an Ellipse Micro as an external magnetometer.

You can learn more about magnetometers here.

Magnetometer Installation

The Ellipse is capable of receiving data from an external magnetometer to provide a heading, when a GNSS heading is not available.

The magnetometer should be installed as far away as possible from any magnetic source.

Ensure the Ellipse and the magnetometer are mounted rigidly on the same plane.

The magnetometer should have a right-handed reference frame. If you need to configure the orientation of the magnetometer in the Ellipse, this can be done in the software configuration below.

Electrical Installation

The Ellipse supports magnetometers with a transmit signal, to allow for calibration and to receive data from the magnetometer.

Typically the magnetometers consist of SDA or SDO pinouts for serial data.

If you're using a magnetometer with RS232 pinouts, you can just find the transmit and ground pins.

These pins can be used to connect to the input connection on the Ellipse. You can connect them accordingly by referring to the colour of the cable for the Main / Aux port on the Ellipse.

You can find this information here.

Software Configuration

For this instance, we are using the Yellow wire and black wire (Port C RS232 RX) on the Aux connector as the connection to the Ellipse.

Data going into the Ellipse must be in sbgECom format (SBG_ECOM_LOG_MAG (04)) described in our firmware manual.

Aiding Assignment

You need to select the input port you wish to connect the magnetometer to (Port C in this instance).

assignment_magnetometer_edited

Input/Output

Ensure the correct baud rate and mode is selected for the corresponding serial port (In this instance we are using Port C with a baud rate of 115200 and using RS232).

inputoutput_magnetometer_edited

Aiding

Misalignment

If the axis of the magnetometer cannot be aligned with the reference frame of the vehicle, you must enter the misalignment for the rough misalignment and the fine misalignment with 2°.

This is done using using the Configuration API (sbgInsRestApi). A simple way to use this API on a Windows/Linux/Mac OS X computer is to use the command line tool sbgEcomApi.exe, provided on GitHub, via port A.

sbgEComApi.exe -s <COM> -r <baudrate> /api/v1/settings/aiding/magnetometer/alignment/rough -p -b [\"backward\",\"left\"]
sbgEComApi.exe -s <COM> -r <baudrate> /api/v1/settings/aiding/magnetometer/alignment/fine -p -b [1,2,3]

As above, this can be done using the API command below for example.

Rejection Settings

Ensure the correct aiding rejection is selected (By default it will be Automatic).

  • Automatic - The EKF automatically decides if the heading provided by the magnetometer is sufficiently accurate to be used in the solution.
  • Never Accept - The EKF rejects all heading data from the magnetometer, will not be used in the solution.
  • Always Accept - The EKF always uses the heading provided by the magnetometer in its solution.

aiding_magnetometer_edited

As above, this can be done using the API command below for example.

sbgEComApi.exe -s <COM> -r <baudrate> /api/v1/settings/aiding/magnetometer/useMagData p -b \"auto\"

Calibrate Magnetometers

Here you can also calibrate the magnetometer with the movement of your Ellipse. Please check further down in this article for more information.

Initial Position and Date

Configuring the initial position and date allows to automatically compensate the magnetic declination even before receiving a fix from the GNSS (if magnetometers are used) in order to output a true heading instead of a magnetic heading. Alternatively, the magnetic declination can be manually entered.

Eli-mag-ext-date

More details on Sensor configuration chapter Magnetometer-related parameters

Data Checking

Data Output

To check that the magnetometer is connected correctly and the data can be read, you will have to enable the Magnetometer message.

dataoutput_magnetometer_edited

To ensure the magnetometer is connected and working as intended. You can check for the sensor’s status under the sensor tab in sbgCenter.

status_magnetometer_edited

The magnetometer reading can be observed by opening a new graph.

graph_magnetometer_edited

Magnetometer Calibration

You can check the Calibrate Internal Magnetometer article to calibrate the magnetometer using the sbgCenter or the Rest API as it is the same procedure for external or internal magnetometers.