How to set up a custom GPS for my HITL simulation in QGroundControl with Gazebo?


As the title says, I could find out by digging the source code that the GPS coordinates are by default in Zurich Irchel Park from the sitl_gazebo repo. I tried changing the mag_x, mag_y, mag_z coordinates to change my gps accordingly. But that doesn’t seem to be working. Is there any other way to achieve this? Thanks in advance :slight_smile:

HITL with Gazebo? I didn’t realize that was even possible. Anyway, this has nothing to do with QGC. You can set home position with Gazebo+SITL. Search px4 docs for it.

Yeah, I’m trying to set up my HITL simulation using Gazebo with the help of this tutorial. And, thanks. I’ve found some documents that may be of help to me :slight_smile:

@pranavn248 Were you able to figure out how to change the default home position? Do you mind stating with documents you found the answer?