# Setting Custom Location in SITL

**URL:** <https://discuss.bluerobotics.com/t/setting-custom-location-in-sitl/9405>\
**Category:** Blue Robotics Software\
**Tags:** sitl, simulate\
**Created:** [April 6, 2021, 6:18pm UTC](https://discuss.bluerobotics.com/t/setting-custom-location-in-sitl/9405 "2021-04-06T18:18:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![em\_1](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@em\_1](https://discuss.bluerobotics.com/u/em_1)\
**Post date:** [April 6, 2021, 6:18pm UTC](https://discuss.bluerobotics.com/t/setting-custom-location-in-sitl/9405/1 "2021-04-06T18:18:37Z")

</div>

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”?

---

<div class="post-metadata">

**Author:** ![williangalvani](https://avatars.discourse-cdn.com/v4/letter/w/6f9a4e/32.png) [@williangalvani](https://discuss.bluerobotics.com/u/williangalvani)\
**Post date:** [April 7, 2021, 1:35pm UTC](https://discuss.bluerobotics.com/t/setting-custom-location-in-sitl/9405/2 "2021-04-07T13:35:09Z")

</div>

Hi @em_1 ,

I expect this to be an issue in the [“map”](https://github.com/ArduPilot/MAVProxy/tree/master/MAVProxy/modules/mavproxy_map) module of [MAVProxy](https://github.com/ArduPilot/MAVProxy/tree/master/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.

---

<div class="post-metadata">

**Author:** ![em\_1](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@em\_1](https://discuss.bluerobotics.com/u/em_1)\
**Post date:** [April 7, 2021, 8:20pm UTC](https://discuss.bluerobotics.com/t/setting-custom-location-in-sitl/9405/3 "2021-04-07T20:20:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![williangalvani](https://avatars.discourse-cdn.com/v4/letter/w/6f9a4e/32.png) [@williangalvani](https://discuss.bluerobotics.com/u/williangalvani)\
**Post date:** [April 8, 2021, 1:29pm UTC](https://discuss.bluerobotics.com/t/setting-custom-location-in-sitl/9405/4 "2021-04-08T13:29:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![em\_1](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@em\_1](https://discuss.bluerobotics.com/u/em_1)\
**Post date:** [April 12, 2021, 4:56pm UTC](https://discuss.bluerobotics.com/t/setting-custom-location-in-sitl/9405/5 "2021-04-12T16:56:08Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![williangalvani](https://avatars.discourse-cdn.com/v4/letter/w/6f9a4e/32.png) [@williangalvani](https://discuss.bluerobotics.com/u/williangalvani)\
**Post date:** [April 12, 2021, 6:43pm UTC](https://discuss.bluerobotics.com/t/setting-custom-location-in-sitl/9405/6 "2021-04-12T18:43:20Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![em\_1](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@em\_1](https://discuss.bluerobotics.com/u/em_1)\
**Post date:** [April 12, 2021, 8:08pm UTC](https://discuss.bluerobotics.com/t/setting-custom-location-in-sitl/9405/7 "2021-04-12T20:08:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![williangalvani](https://avatars.discourse-cdn.com/v4/letter/w/6f9a4e/32.png) [@williangalvani](https://discuss.bluerobotics.com/u/williangalvani)\
**Post date:** [April 19, 2021, 11:01am UTC](https://discuss.bluerobotics.com/t/setting-custom-location-in-sitl/9405/8 "2021-04-19T11:01:01Z")

</div>

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