ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

In the case of that sensor driver, declination can be passed in via parameter, see https://github.com/clearpathrobotics/imu_compass/blob/01f3236101434d5a203fb9c64712f7738bf00ff8/src/imu_compass.cpp#L46, where it defaults to 0.0 if the parameter is not present.

Declination is a function of your location on earth. There are a couple online tools for computing your current declination based on your location such as: https://www.ngdc.noaa.gov/geomag/calculators/magcalc.shtml

If you want to compute declination online based on your location, you can use a software package such as https://github.com/space-physics/WMM2015 to parse the magnetic model and get the declination for your area.

In general, using the value computed via the website is sufficient unless your robot travels over long enough distances to see changes in the declination.