Home        Store        Learn        Blog

Setting Custom Location in SITL

I am trying to run an ArduSub with SITL and open the map at the location “RATBeach”.
I have been using the following command to run SITL in the terminal:
sim_vehicle.py -L RATBeach --output=udp:0.0.0.0:14550 --map --console

This command used to work perfectly fine but now when I run SITL using this command it opens up the starting map for ArduPilot and not the “RATBeach” location. I have not changed anything else and I am still running this command inside the ardupilot/ArduSub folder. I have tried other locations inside locations.txt and they all open the same incorrect ardupilot map.

How do I get SITL to open at the location “RATBeach”?

Hi @em_1 ,

I expect this to be an issue in the “map” module of MAVProxy. I can replicate the issue here, but the map does change to the right location as soon as the vehicle sends its coordinates. If that is not acceptable, you may want to try older versions of mavproxy to pinpoint where the issue was introduced.

Does the vehicle automatically send its coordinates in SITL or is there a command for that?

That happens automatically here, a couple of seconds after starting sitl, ~4 seconds in.

I think this vehicle may not be sending its coordinates because the map does not change to the right location. How did you recreate this issue?
I am also getting a notification on QGroundControl now that there is “No GPS Lock for Vehicle” . Could this be the problem?

Yes… Try removing eeprom.bin from the folder you are runing sim_vehicle.py to reset to default parameters.

What version of mavproxy and ardusub are you running?

Resetting the parameters to default seems to have fixed the problem.
Thanks!

2 Likes

This topic was automatically closed after 6 days. New replies are no longer allowed.