Magnetometer
Read sensor_mag uORB topic and obtain three dimensional magnetic field
Add-On Required: This feature requires the UAV Toolbox Support Package for PX4 Autopilots add-on.
Libraries:
UAV Toolbox Support Package for PX4 Autopilots /
PX4 Sensor Blocks
Description
The Magnetometer block reads the sensor_mag uORB topic and outputs the magnetic field of the PX4 Autopilot board along the x, y and z axis. The block also outputs the timestamp.
On each simulation step, the block checks if a new message is available on the sensor_mag topic. If a new message is available, the block retrieves the message and outputs it, and the timestamp is updated. If a new message is not available, the block outputs the last updated uORB message and the timestamp is not updated. If a message has not been received since the start of the simulation, the outputs are zeroes.
During Normal mode simulation, the block outputs zeroes.
During Connected I/O simulation, this block reads data from the peripherals of the hardware.
Ports
Output
Parameters
Version History
Introduced in R2018b