External Yaw in GPS_Input does not seem to work

Hello

I am trying to provide external position and heading to Ardupilot. I used ArduSub framework as it seems it is often used in that case.
I got GPS_Input working as described in ardusub book GPS_INPUT , however the last Extension parameter provided in latest Mavlink GPS_INPUT ( #232 ) (pymavlink 2.4.39), which is Yaw, does not seem to be used by the ardupilot for heading.
And this is the problem. I need to use external heading to run the vehicle.

I can see via Mavlink inspector that the yaw is decoded in Ardupilot, but the vehicle is not using it for navigation.

Over the past few days I fiddled with several parameters below at no avail.

GPS_TYPE = MAV(14)
EK3_SRC1_YAW 6 - External Nav
AHRS_EKF_TYPE 11 tried 0 and 3
FS_EKF_THRESH 0
AHRS_GPS_USE 1, tried 2 as well

Also tried
GPS_type2 14 - 2nd GPSExternal MAV
FS_EKF_THRESH 0 (changed to 0 just to Off failsafe actions)
GPS_AUTO_CONFIG 0 - disable automatic GPS config

I can disable the onboard INS with
INS_USE 0
INS_USE2 0
INS_USE3 0
All it did is to disabled the internal yaw, but still is not using the one provided by GPSP_INPUT.

Also tried
COMPASS_ENABLE 0
COMPASS_USE 0
COMAPSS_USE2 0
COMAPSS_USE3 0
COMPASS_EXTERNAL 2
COMPASS_EXTERN 0 - force internal compass
COMPASS_EXTERN2 2 - force use extremal compass
COMPASS_EXTERN3 2 - force use extremal compass

EK3_ENABLE 0 tried with 1
EK2_ENABLE 0 tried with 1

Nothing what I do seems to force the vehicle to use the heading coming from external GPS_Input message.

Can anybody help? How to make ardupilot using the yaw from GPS_Input?
I have been spinning wheels for days now.

thanks in advance.
Pawel

Related to this discussion

I think I got that working. The key for me was to understand that the internal gyro cannot be disabled (this link) and it is always blended with the externally provided yaw. So the KF will just take its time to blend them and I was not patient enough to see that happening.

I still would like to demote the internal gyro and promote externally provided yaw if you knew how to do that?

Hi @Pawel, welcome to the forum :slight_smile:

If you’re wanting the autopilot to preferentially use GPS messages for its yaw input then I suspect you’ll need to set EK3_SRC1_YAW to GPS (2), which from your description doesn’t seem to be an option you’ve tried yet.

Note that the gyroscope is used for all three rotation axes (not just the yaw axis), and provides rotation rate measurements (not fixed angles). The magnetometer is what’s normally used for static heading angle determination (since it functions as a compass), but there are still corrections applied from the gyroscope when the vehicle is in motion.

1 Like

Hi @EliotBR
thank you
I used it as you say and it is working now. I described it this link

1 Like