How to activate this component in QGC?

Dear all,
Could anyone tell me how to activate this component? Once the copter is connected to QGC, its attitude could be demonstrated by this component. How does the px4 firmware just do that?
Thanks.

Could you clarify a bit more on what do you mean by “activate this component”? QGroundControl will automatically have it on its front page to easily visualize the drone’s activities.

All the drone connected to the QGroundControl communicates over the Mavlink messages (http://qgroundcontrol.org/mavlink/start). A specific message called MAVLINK_MSG_ID_GLOBAL_POSITION_INT will be sent by the drone at about 50Hz (ie. 50 times in 1 second). This message contains the attitude and GPS coordinates of the drone. QGC uses this decode this mavlink message and displays it in the GUI in an intuitive way.

Does this answer your question?

Thanks for the reply.
I just want to know what mavlinke message contains the information that can make this component active, to show the drone attitudes. I know that QGC dynamically decodes mavlink and activates certain GUI components. I just want to know what kind of mavlink message is responsible to make this “attitude component active”. You told me that MAVLINK_MSG_ID_GLOBAL_POSITION_INT is decoded to show attitude in GUI of QGC. That’s what I want to konw. Thanks. I will search the code to see how it is called.

I look into this mavlink you mentioned, but I think this message contains the GPS informantion, not drone attitude.

#define MAVLINK_MSG_ID_GLOBAL_POSITION_INT 33

MAVPACKED(
typedef struct __mavlink_global_position_int_t {
uint32_t time_boot_ms; /< Timestamp (milliseconds since system boot)/
int32_t lat; /< Latitude, expressed as degrees * 1E7/
int32_t lon; /< Longitude, expressed as degrees * 1E7/
int32_t alt; /< Altitude in meters, expressed as * 1000 (millimeters), AMSL (not WGS84 - note that virtually all GPS modules provide the AMSL as well)/
int32_t relative_alt; /< Altitude above ground in meters, expressed as * 1000 (millimeters)/
int16_t vx; /< Ground X Speed (Latitude, positive north), expressed as m/s * 100/
int16_t vy; /< Ground Y Speed (Longitude, positive east), expressed as m/s * 100/
int16_t vz; /< Ground Z Speed (Altitude, positive down), expressed as m/s * 100/
uint16_t hdg; /< Vehicle heading (yaw angle) in degrees * 100, 0.0…359.99 degrees. If unknown, set to: UINT16_MAX/
}) mavlink_global_position_int_t;

It should be MAVLINK_MSG_ATTITUDE_SEND function.

Is it not what you need?
int32_t relative_alt; /< Altitude above ground in meters, expressed as * 1000 (millimeters)/