Feed Copter GPS updates from companion computer

Is it possible (and not not recommended) to send the autopilot GPS updates via mavlink messages (GPS_RAW_INT maybe) from a GPS attached to a companion computer?

You can simulate a GPS using GPS_INPUT MAVLink messages. You need to set the GPS_TYPE to MAVLink, it isn’t auto-detected.

1 Like

I don’t want to “simulate” a GPS, but send the autopilot actual GPS updates from a GPS that is external to the autopilot. Under GPS_TYPE I only see the following options:

0:None 1:AUTO 2:uBlox 3:MTK 4:MTK19 5:NMEA 6:SiRF 7:HIL 8:SwiftNav 9:PX4-UAVCAN

Are you saying I should still set it to HIL and send it actual GPS updates?

Simulate was a bad word. A MAVLink GPS would use GPS_INPUT messages - if the information in the message is simulated, comes from a real GPS or any other system, is up to the system sending the info; ArduPilot treats it like any other GPS.

Regarding options, are you really using Copter 3.4? There are 15 options available, 14 is the MAV one.

ah…oops. I had jumped into dronekit-sitl to look at your suggestion and I forgot it is limited to Copter 3.3 (You don’t know how to build firmware for dronekit-sitl by chance do you?)

Thanks for your help!

No, I don’t use dronekit-sitl. Have you tried using SITL directly, without Dronekit? Here is a link for the wiki (it may not be all up-to-date but you should be able to follow): http://ardupilot.org/dev/docs/sitl-simulator-software-in-the-loop.html

ah…oops. I had jumped into dronekit-sitl to look at your suggestion and I
forgot it is limited to Copter 3.3 (You don’t know how to build firmware for
dronekit-sitl by chance do you?)

You can use your own ArduCopter-sitl binary with dronekit-sitl if you
invoke the constructor appropriately: