How to send GPS_RAW_INT message to sitl?

Instead of receiving GPS_RAW_INT message, i want to send GPS_RAW_INT message to sitl using pymavlink. is it possbile?

Hello :grinning:
Yes, it is possible, using *_send line. For further data check this:
https://mavlink.io/en/mavgen_python/
https://www.ardusub.com/developers/pymavlink.html

And if you will have any questions dont worry to ask! :saluting_face:

Hi @vurdlok. Thanks for replying.
I am trying to send gps data to my drone. I want the drone to use this data as a secondary gps data.
My drone has a device attached to it and it has a gps module. I am trying to see, if i can send the gps data from attached device to the drone using pymavlink. so that drone will have two sources of gps without needing to have two gps modules inside the drone.

Currently I don’t have the actual hardware. so i am using ardupilot sitl to simulate a drone and pymavlink to send this data to sitl running locally.

I am not sure how to go about implementing this, do you have any thoughts on how to achieve this?
what message types and parameters i need to work with to achieve this?

Interesting approach for this I can say. But first what FlightController are you using? Is it possible for you to connect your second GPS device in serial ports (for example in OrangeCube Serials are: telem1 (serial1), telem2 (serial2), GPS1 (serial3), GPS2(serial4)). And also the thing is the actuall handling of the GPS_RAW_INT message for drone itself. For now I can’t be sure, that drone can react to the message you send. So tell me more about your hardware please :grinning: