Change the initial location of Drone

Hi everyone. I am currently working on PX4 Offboard Navigation with Python and ROS2, using Ubuntu 22.04 and QGround Control.

I would like to change the initial location of the drone, from current location to another area/country?

I am using same release of ubuntu. The following worked for me.

I added the following lines to my .bashrc file…

export PX4_HOME_LAT 32.39741

export PX4_HOME_LNG -111.03168

export PX4_HOME_ALT 790.0

export SIM_GZ_HOME_LAT 32.39741

export SIM_GZ_HOME_LNG -111.03168

export SIM_GZ_HOME_ALT 790.0

note: altitude in meters

thank you, your suggestion did not work. I solved it by changing the home position via the gazebo world file:

<spherical_coordinates>
<surface_model>EARTH_WGS84</surface_model>
<world_frame_orientation>ENU</world_frame_orientation>
<latitude_deg>47.397971057728974</latitude_deg>
<longitude_deg> 8.546163739800146</longitude_deg>
0
</spherical_coordinates>

Apology. I forgot that I changed gazebo too. I was never sure which made it work.