Fake GPS to Pixhawk over Raspberry Pi


for the past few months I’m dealing with a problem of uploading fake GPS data (lat / long) to the Pixhawk.
– GPS data that is stored on RPi is calculated and it’s a long story.

I had successfully made a connection between RPi and Pixhawk over Mavlink and it’s working great… but, I cannot succed at sending fake GPS data from RPi to Pixhawk.

General IDEA: to send fake GPS coordinates (from indoor positioning system) from RPi to Pixhawk which is connected with Mission Planner which I use for autonomous flight.

I read about NMEA and connection to the GPS port of Pixhawk, Is there any STEP by STEP tutorial or can someone help me do it?

I am working hard on this but I didn’t move from this point for a long time… I am willing to pay for this solution.

Use the vision position MAVLink messages, Aggressive indoor copter flying with SteamVR tracking

better than trying to spoof up GPS

I need to transfer data to Mission Planner ergo I need fake GPS (global coordinates)

You sent a origin to the vehicle then send points relative to that origin, all shows up in MP just as it would with a GPS.

My question is HOW TO send?.

PYMavlink or similar,


Yes I know for all of this ways, but I don’t know how to use it with fake GPS…

I need STEP by STEP solution --> which message to send for fake GPS

You can get more informations on this wiki that is using Python scripting on a CC.

That link was also referenced on @iampete link above.

hey , joco4.
Were you able to get the steps for sending gps data to pixhawk using raspberry pi?
i am connecting my R-pi using maxproxy to Qgroundcontrol and a usb connection to pixhawk. i have attached rtk to R-pi however i am not able to get gps lock for my pixhawk. i have tried sending it through serial port of rtk to serialport of pixhawk.

I gave up…

pet, 21. svi 2021. 13:38 kapil paliwal via ArduPilot Discourse noreply@ardupilot.org je napisao:

Send GPS_INPUT mavlink messages, and set GPS_TYPE parameter to mavlink.