Setting a default gps location


#1

Is there any way to set a start location on the other side of the world?

Currently when FlytSim launches its location is @ {lat: 47.3977413, lon:8.5455944 }

But I want to show it on the other side of the world, and it can’t fly that far.


#2

Yes. If you have configured FlytSim to work in APM mode, you can set a custom start location.


#3

I am trying to understand here, and forgive me if I am missing key info.

When the drone is set to PX4 Simulator, the coordinates come from gazebo?
So if I want to change them, I would have to edit the gazebo world? the ros model?


#4

When you configure FlytSim in PX4 mode, we were facing issues if drone location was changed and that’s why the feature to change position is disabled. The issue was from the PX4-SITL stack that we use.

I would try to update our PX4-SITL stack and check if the issue has been resolved.

I will post an update on this thread ASAP.


#5

Thank you very much, I am waiting for your reply.


#6

Use openshell.sh script to open a terminal inside FlytSim docker container.

Edit file -> /etc/bash.bashrc
and add these lines at the end of the file:

export PX4_HOME_LAT=47.592182
export PX4_HOME_LON=-122.316031

Replace Lat/Lon values with your required values.