Setting YAW from GPS source or any other source

I have a a Pixhawk 4 (FMUv3) board. I want to set the yaw input from GPS.

Method 1

I can use a single GPS with two antennas, to feed in the GPS 1 channel.

For this, i will have to - following this discussion - set:

COMPASS_USE=0
COMPASS_USE2=0
COMPASS_USE3=0


EK3_ENABLE=1

GPS_TYPE=16

GPS_HDG_ENABLE=1
EK3_MAG_CAL=5

I have compiled ardurover from the priseborough branch.. But the GPS_TYPE only shows possible option up to 15, and i don’t find the GPS_HDG_ENABLE param at all.

My Question now is :

  • What do i do to get these parameters?

Method 2

I could use the GPS-s and two antennas. My question now is -

  • Can pixhawk use two separate GPS in a moving base configuration?
  • How to set that up and calibrate it?
  • How to set up the parameters in pixhawk?

Additionally

I have a lidar, which is telling me where a wall is, and the angle of the wall w.r.t. the vehicle principle axis.
How can I use this information to steer the rover?

AFAIK you need to use git master to get this to work.