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.
I was trying to recreate this but without success.
System:
- autopilot: Cubeorange (PX4 1.14.3)
- GNSS: companion computer outputting HIL_GPS messages
What I want to achieve:
use only HIL_GPS data over MAVLink for vehicle navigation in real world use.
Companion computer have NEO M9N and magic algorithm for GNSS denied env so in any case we should have navigation data available for AP.
What I tried:
enable MAV_USEHILGPS, enable MAV_1_CONFIG on TELE2 with desired baudrate. Companion computer serial output is connected to TELE2 port and it’s sending MAVLink HIL_GPS messages to AP.
Am I missing something? Any help or direction much appreciated.
Now I moved to MAV_0_CONFIG set to TELE1 and here is the status of mavlink instance.
instance #1:
mavlink chan: #1
type: GENERIC LINK OR RADIO
flow control: OFF
rates:
tx: 484.8 B/s
txerr: 0.0 B/s
tx rate mult: 0.311
tx rate max: 1200 B/s
rx: 509.6 B/s
rx loss: nan%
FTP enabled: YES, TX enabled: YES
mode: Normal
Forwarding: On
MAVLink version: 1
transport protocol: serial (/dev/ttyS0 @115200)
It feels like messages are not being received / processed correctly. Therefore I have no position information - even if configuration of the MAVLink system should be ok.
@JulianOes any suggestions / directions?
I don’t know. I’d have to debug this and add in a few printfs to see what is going on.