Advertisement

How to change Home Location on ArduPilot SITL simulation?

December 2, 2021 in Aerospace, Drones by DhulkarnaynDhulkarnaynβ€”5 minutes

Congratulations on setting up the ArduPilot’s Software In The Loop (SITL) simulation environment on your device – you’re now the captain of a virtual drone fleet ready to explore the skies! πŸš€βœ¨

In this digital wonderland, you have the power to simulate the behavior of various awe-inspiring vehicles straight from the heart of ArduPilot’s firmware. Picture this: a Multicopter dancing gracefully, a Fixed-Wing soaring majestically, a Submarine gliding mysteriously underwater, and a Rover navigating the terrain with precision – all at your fingertips!

ArduPilot - Directory

ArduPilot - Directory

To embark on your virtual adventure, navigate to the respective vehicle folder housed within the sacred halls of the ardupilot directory. Each time you summon your desired vehicle, it’s like opening a portal to a world of possibilities.

But where does this magic happen by default? Behold, the secret location revealed by ArduPilot SITL:

Even though altering the location won’t make your drone perform pirouettes or loop-the-loops, there are moments when you crave a change of scenery. Fear not! In the vast expanse of the digital cosmos, you have the ability to relocate your virtual playground at will.

Plotting a New Course: Changing Home Location on SITL

Ready to explore uncharted territories? As you command your virtual fleet, you might find the need to change the home location of your SITL simulation. It’s not about altering your drone’s behavior; it’s about seizing control of your drone destiny in a new locale.

Now, let’s dive into the exhilarating process of changing your SITL home location and witness your virtual fleet conquer new horizons!

Embark on Location Odyssey: Mastering SITL Terrain

Welcome, fearless explorer! As you delve into the vibrant realm of ArduPilot’s Software In The Loop (SITL), you’re not just controlling vehicles; you’re orchestrating a symphony of flight in the digital skies. πŸš€πŸŒ

Changing Home Location on SITL

To kick off this virtual odyssey, your first stop is the vehicle directory. Picture it as the launchpad where your digital dreams take flight. 🚁 Navigate to the specific vehicle folder - for instance, let’s summon the multi-copter magic by entering ardupilot/ArduCopter. Feel the anticipation as you unleash this command in your terminal:

cd ardupilot/ArduCopter

Not a fan of maps and prefer shortcuts? Press Ctrl + Alt + T to open the terminal window, your gateway to the virtual skies.

Now, brace yourself for the grand moment. Execute the SITL initiation ritual with:

sim_vehicle.py --console --map

ArduPilot - SITL

ArduPilot - SITL

Behold! The copter gracefully takes its maiden flight in the default location. But what if you crave the thrill of soaring over a specific landscape? Fear not; you hold the reins.

Charting Your Course: Customizing Home Location

To teleport your drone to a specific home location, wield the mighty -L parameter along with a named location from ardupilot/Tools/autotest/locations.txt. First, silence the ongoing symphony by halting the current simulation. Press Ctrl + C to gracefully pause the digital dance.

Advertisement

Now, summon your copter to dance in the skies above “Unalga” with this command:

sim_vehicle.py -L Unalga --console --map

Unleashing Your Imagination: Adding New Locations

What if you crave a new playground? You’re not confined to existing locations – be the cartographer of your SITL world! Open locations.txt and etch your desired spot. Let’s call it “Backyard”:

locations.txt
Unalga=51.578,-179.0483,42.0,270.0
Backyard=51.578,-179.0483,42.0,270.0

With this newfound spot, bring it to life in your SITL universe:

sim_vehicle.py -L Backyard --console --map

Congratulations, virtual aviator! You’ve now mastered the art of orchestrating the skies in ArduPilot SITL. Share your newfound wisdom with fellow adventurers! 🌟

Advertisement

Charting the Stars: Your Guide to SITL Wonderlands

Behold, fellow wayfarers, the celestial atlas of ArduPilot’s Software In The Loop (SITL). As you traverse the digital galaxies, let this list of enchanted locations be your guiding constellations, lighting the path to simulated adventures. 🌌✨

Locations that Beckon

  1. OSRF0

    • Latitude: 37.4003371
    • Longitude: -122.0800351
    • Absolute Altitude: 0
    • Heading: 353
  2. OSRF0_PILOTSBOX

    • Latitude: 37.4003371
    • Longitude: -122.0800351
    • Absolute Altitude: 2
    • Heading: 270
  3. CMAC

    • Latitude: -35.363261
    • Longitude: 149.16523
    • Absolute Altitude: 584
    • Heading: 353
  4. CMAC2

    • Latitude: -35.362889
    • Longitude: 149.165221
    • Absolute Altitude: 584
    • Heading: 270
  5. CMAC_South

    • Latitude: -35.363261
    • Longitude: 149.16523
    • Absolute Altitude: 584
    • Heading: 173
  6. CMAC_PILOTSBOX

    • Latitude: -35.362734
    • Longitude: 149.1653
    • Absolute Altitude: 586
    • Heading: 270
  7. CMAC_PILOTSBOX2

    • Latitude: -35.362749
    • Longitude: 149.165359
    • Absolute Altitude: 584
    • Heading: 270
  8. Kingaroy

    • Latitude: -26.583528
    • Longitude: 151.84044
    • Absolute Altitude: 444
    • Heading: 169
  9. AVC

    • Latitude: 40.0713749
    • Longitude: -105.2297889
    • Absolute Altitude: 1583.702759
    • Heading: 246
  10. AVC_copter

    • Latitude: 40.072842
    • Longitude: -105.230575
    • Absolute Altitude: 1586
    • Heading: 0

  1. Williams

    • Latitude: 39.16417503
    • Longitude: -122.1317562
    • Absolute Altitude: 0
    • Heading: 0
  2. SCCMAS

    • Latitude: 37.1730398
    • Longitude: -121.6815865
    • Absolute Altitude: 102
    • Heading: 315
  3. ARPstrip_NZ

    • Latitude: -43.6544343
    • Longitude: 172.5031829
    • Absolute Altitude: 0
    • Heading: 156
  4. ARPstrip_NZ_S

    • Latitude: -43.6541316
    • Longitude: 172.5029844
    • Absolute Altitude: 0
    • Heading: 156
  5. ARPstrip_NZ_N

    • Latitude: -43.6545022
    • Longitude: 172.5031883
    • Absolute Altitude: 0
    • Heading: 336
  6. CMAC_NZ_E

    • Latitude: -43.47493266
    • Longitude: 172.318144
    • Absolute Altitude: 0
    • Heading: 84
  7. CMAC_NZ_W

    • Latitude: -43.47493266
    • Longitude: 172.318144
    • Absolute Altitude: 0
    • Heading: 264

Source: locations.txt

Unveiling SITL’s Galactic Secrets

As you navigate these coordinates, envision the diverse landscapes and terrains that unfold beneath your simulated wings. Feel the rush of altitude changes and let the heading guide you through the digital tapestry. From the mystical realms of “AVC_copter” to the awe-inspiring heights of “AVC_plane,” each location tells a tale of its own.

The skies are your playground, and these locations are the gates to endless possibilities. So, fellow explorer, which star will you chart your course to next? The celestial stage awaits your command! πŸš€πŸ—ΊοΈ

Conclusion

As you conclude this SITL guide, rememberβ€”it’s not a finale but a prelude to your virtual ventures. πŸš€βœ¨ Share your stories, questions, and findings in the comments below.

Let’s make this space a launchpad for knowledge and exploration. Spread the word, invite friends, and let the SITL community thrive. Until our digital paths cross again, happy coding and safe travels in the simulated skies! 🌌🌐


Please consider supporting this project!

If this article has been of help to you, and you feel generous at the moment, don’t hesitate to buy us a coffee. It's an easy, fun and direct way to show your support β€” any amount of coffee is highly appreciated.
Buy me a Coffee


Comments