PX4 not taking mag readings from gazebo

I am using a custom airframe, and its flying well. But when i change the magnetic field in gazebo’s physics. It doesn’t impacts the headings information, everything just remains same, even if i make the magnetic field zero. All the px4 parameters are to their default. Is this due to the reason that magnetometer plugin doesn’t use the gazebo’s magnetic field, or there is other reason ?

@Asif_Khan_Leelgar The magnetometer plugin can be found in PX4-SITL_gazebo-classic/gazebo_magnetometer_plugin.cpp at 9343aaf4e275db48fce02dd25c5bd8273c2d583a · PX4/PX4-SITL_gazebo-classic · GitHub, and it does NOT use the magnetic field from gazebo, since we use the WMM 2018 model

1 Like