How to use QGC for self developed autopilot SITL and HITL tests

Hello all,

I am trying to test my own autopilot code and I want to use QGC for software in the loop and hardware in the loop simulations; so my question is how to do all configurations and setups?

Which configurations and setup? Can you clarify?

But basically if you use MAVlink protocol you are ready to go.

Thanks tuloski for your reply, I do not know what is required or not and that’s why I asked this. Yes, my autopilot is MAVlink enabled; is this all that is needed for using QGC or is there something else? like an API for generating MAVlink messages ?

How you generate the MAVlink messages is up to you and your autopilot, the important is that the protocol is respected. Once your protocol is ok I think you’re good to go.

1 Like

Sounds good!
So what are the MAVlink messages that need to be sent to QGC?

That need basically only HEARTBEAT. Then if you want to visualize data, change parameters, make automatic mission and so on it’s a lot of messages. It depends on the usage you need for QGC.

As a starting point you can check https://github.com/PX4/Firmware/tree/master/src/modules/mavlink to see which messages PX4 autopilot is sending and handling.

Okay, thanks for your suggestions.

The PX4 code is very modular. If you are working on control, pose estimation, etc… it might make more sense to remove components of the PX4 code and replace them with your autopilot. You may save time. Your will get access to low level components that are typically time consuming and not very useful to recode (drivers for example).