How to send GPS_RAW_INT message to flight controller?

Hi Everyone.
I am trying to send GPS_RAW_INT message to flight controller (right now i am working with sitl) via pymavlink. is it possible?

Taking a step back, what are you trying to achieve?

I want the drone to have two gps source without having two gps hardwares on the drone. For primary gps source, i want the drone to get the data from hardware which is present on the drone. For the secondary gps source, I want to provide the gps data via mavlink.

I already have a device attached to my drone which has a gps module. I was wondering if it was possible for the flight controller to receive gps data from the attached device via MAVlink and treat it as second gps source?

Ok, I think you can use the HIL_GPS message, and set the param MAV_USEHILGPS.

1 Like