imu_3dm_gx4 icon indicating copy to clipboard operation
imu_3dm_gx4 copied to clipboard

Output unit of magnetic field

Open versatran01 opened this issue 10 years ago • 3 comments

ROS MagneticField message defines its output in Tesla. http://docs.ros.org/jade/api/sensor_msgs/html/msg/MagneticField.html 3dm-gx4 measures magnetic filed in Gauss and the driver outputs is thus in Gauss http://www.microstrain.com/inertial/3dm-gx4-25

The conversion between tesla and gauss is 1 Tesla = 10000 Gauss This inconsistency is not very well documented and thus may cause confusion.

We could

  1. fix the output to Tesla, thus the output will typically range from 0 to 0.00005 Tesla, which is numerically unfavorable.
  2. keep using gauss, which contradicts with the ros definition, but we could document it in readme. Output will range from 0 to 0.5 Gauss.

versatran01 avatar Aug 10 '15 17:08 versatran01

Other imu products usually output magnetic field in uT https://www.xsens.com/wp-content/uploads/2015/05/MTi-100-series.pdf http://www.chrobotics.com/docs/UM7_Datasheet.pdf

versatran01 avatar Aug 10 '15 17:08 versatran01

I would suggest doing number 1. Floating point numbers are stored in scientific notation, so having typical measurements that small will not inherently cause numeric issues.

Numeric conditioning errors come from adding or subtracting numbers of vastly different scales. Ex. (1e10 + 1e-10 - 1e10) = 0 is incorrect, but (1e-10 + 1e-10) = 2e-10 is fine.

mike-watterson-ai avatar Aug 10 '15 17:08 mike-watterson-ai

Sounds good. I will change it to Tesla then.

versatran01 avatar Aug 10 '15 17:08 versatran01