Hey, I’m working with SITL simulator and I’m trying to inject GPS data to the simulator with another simulator that I developed. The simulator sends periodically HIL_GPS + HEARTBEAT messages through MAVLINK protocol through TCP port that the SITL is binding.
I can see that the messages are being sent properly, however only if I set the GPS_TYPE to 14 it changes the location in the GLOBAL_POSITION_INT.
I tried already to switch to GPS_AUTO_SWITCH 1, and GPS_TYPE2 to 14.
I need AP params to remain:
GPS_AUTO_SWITCH 1
GPS_TYPE 2
GPS_TYPE2 14
It works only if I set the GPS_TYPE to 14.
But it still didn’t work, any ideas how can I inject those coordinates?
Thank you for your help.
The first picture who has a yellow marker on it, the GPS_RAW2 contains the data I’m really trying to inject to the SITL.
Sorry for spamming, thx.
Another situation that I’ve faced,
When I configure GPS_TYPE to 14
and GPS_TYPE2 to 2, at first I receive the injected GPS data,
when I switch GPS_AUTO_SWITCH to 1, I receive the real GPS data.
But the opposite doesn’t work, weird…
Would love to hear some ideas.
Thank you guys.
Indeed it was the Ardupilot, I figured out that the SITL providing RTK_FIXED gps signal, while my simulator sent 3D Fixed.
When I send through my simulator RTK_FIXED it works perfectly.
thx for help.