catkin_ws/src/mavros/mavros/src/plugins/imu.cpp
void publish_mag(std_msgs::Header &header, Eigen::Vector3d &mag_field)
	{
		auto magn_msg = boost::make_shared<sensor_msgs::MagneticField>();

		// Fill message header
		magn_msg->header = header;

		tf::vectorEigenToMsg(mag_field, magn_msg->magnetic_field);
		magn_msg->magnetic_field_covariance = magnetic_cov;

		// Publish message [ENU frame]
		magn_pub.publish(magn_msg);
	}
/**
	 * @brief Publish magnetic field data
	 * @param header	Message frame_id and timestamp
	 * @param mag_field	Magnetic field in the base_link ENU frame
	 */
@brief Publish magnetic field data
@param header        Message frame_id and timestamp
@param mag_field     Magnetic field in the base_link ENU frame
@brief Publish magnetic field data @param header Message frame_id and timestamp @param mag_field Magnetic field in the base_link ENU frame
void publish_mag(std_msgs::Header &header, Eigen::Vector3d &mag_field)
	{
		auto magn_msg = boost::make_shared<sensor_msgs::MagneticField>();
		magn_msg->header = header;
		tf::vectorEigenToMsg(mag_field, magn_msg->magnetic_field);
		magn_msg->magnetic_field_covariance = magnetic_cov;
		magn_pub.publish(magn_msg);
	}
void publish_mag ( std_msgs :: Header & header , Eigen :: Vector3d & mag_field ) { auto magn_msg = boost :: make_shared < sensor_msgs :: MagneticField > ( ) ; magn_msg -> header = header ; tf :: vectorEigenToMsg ( mag_field , magn_msg -> magnetic_field ) ; magn_msg -> magnetic_field_covariance = magnetic_cov ; magn_pub . publish ( magn_msg ) ; }
@brief Publish magnetic field data
 @param header        Message frame_id and timestamp
 @param mag_field     Magnetic field in the base_link ENU frame
@brief Publish magnetic field data @param header Message frame_id and timestamp @param mag_field Magnetic field in the base_link ENU frame
// Fill message header // Publish message [ENU frame]