# SITL GPS spoofing - how to do it?

**URL:** <https://discuss.px4.io/t/sitl-gps-spoofing-how-to-do-it/20662>\
**Category:** Uncategorized\
**Created:** [January 24, 2021, 6:23pm UTC](https://discuss.px4.io/t/sitl-gps-spoofing-how-to-do-it/20662 "2021-01-24T18:23:33Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![dagar](https://discuss.px4.io/user_avatar/discuss.px4.io/dagar/32/22_2.png) [@dagar](https://discuss.px4.io/u/dagar)\
**Post date:** [January 24, 2021, 6:41pm UTC](https://discuss.px4.io/t/sitl-gps-spoofing-how-to-do-it/20662/2 "2021-01-24T18:41:41Z")

</div>

You can hack it in place in the simulator module. [https://github.com/PX4/PX4-Autopilot/blob/f571b29ae8152cc0b3d0f6bb7f160e3a44a8d9ed/src/modules/simulator/simulator\_mavlink.cpp#L324-L341](https://github.com/PX4/PX4-Autopilot/blob/f571b29ae8152cc0b3d0f6bb7f160e3a44a8d9ed/src/modules/simulator/simulator_mavlink.cpp#L324-L341)

If there are specific ways you want to spoof GPS or simulate failures we can extend it as needed.

---

_[View the full topic](https://discuss.px4.io/t/sitl-gps-spoofing-how-to-do-it/20662)._
