Use Heading from Dual GPS

,

@Vincent_Miceli if you could send your parm file from your pixhawk that would be great… Also, did you use the configs for the F9P as provided by ardusimple, or, did you modify them, or, did you let the ardupilot’s auto-configuration functions configure the GPS?

@Christopher_Milner I am sorry, to be clear, I did this work last summer before many of the new features for F9P GPS and RELPOSNED messages were added to ardupilot. I never had the pixhawk utilizing auto config or using GPS based heading. I did have RELPOSNED messages being sent to the pixhawk even though it wasn’t responding to them. I did add RTK corrections via Mission Planner, but the results were the same as if heading messages didn’t exist.

1 Like

I configured:

F9P (base) sends RTCM, Serial 2 -> F9P (rover) Serial 2
F9P (rover) Serial 1 sends UBX-RELPOSNED -> Ardupilot (Cube, Serial 4)

Sometime, accidentally, looking at the Mission Planer, the Yaw reacts like it already parsed the RELPOSNED message because I disconnect all compasses and adding disturbance to gyro by changing quickly the heading and Yaw changes with no drift at all. However, I could never reached to this “perfect” moment again!

I thought some errors may come from baudrate or update rate of F9P but by try-failed, I still not found that sweet point. I guess, there would be some inconsistency somewhere in the parsing the message but no time I have now for diving into the source code for debugging.

My idea is to try feeding the RELPOSNED message directly into APby Mavlink, will try it when I have time!

3 Likes

I used F9P modules in this same setup after I wrote my own code to implement the decoding of the RELPOSNED message (I now use the current code with auto config and no serial link directly between the two modules). There are a few settings that get in the way of the system actually using the heading information even if it is being successfully captured. The default GPS settings have the system using input from the first GPS which is likely the base unit that does not report the RELPOSNED message. In my implementation, I forced the reading of the RELPOSNED message from a specific port regardless of which one was set as primary. In the current code, you need to set GPS_AUTO_SWITCH = 3 (Use Second) if your rover module is on a higher number serial port than the base. This will allow the system to use both the heading and position information from the rover unit.

2 Likes

I’ve been waiting for this feature for a long time. I think it is very important that ardupilot has this kind of features. I’m thinking about buy my simpleRTK2B+heading.

I would like to ask. still with some bugs, It is functional, Is flyable?

Hi there, what did you mean by “solved”? I am even newer as I just joined today. I am seeking to use dual-antenna gps to be the source of Yaw. Could you tell me some details how did you solve it?

There is a PR that fixes an GPS baseline YAW issue. Unless you understand that sentence, and can compile the code from source you will need to wait for a stable release.

I mean “Solved” because I have found myself the way to get the “dataflash”. At that time, when I was super new to the Ardupilot, I had some confusions on terminology and definition, and @jimovonz reply
a “useful” link for more confusions, I am sorry to say but this did not help for newbie!

@dacheng, In case of using dual GPS with F9P, I think it is challenged to try because theoretically, It should work but I have not seen any successful cases. If you still want to try, I suggest you to be familiar with F9P configuration first and after that, hooking up 2 of them to the Ardupilot. For more convenient way, you can contact Ardusimple for using their product and request the samples codes!

I did a test of YAW from GPS just now. I use a dual-antenna GPS unit which supports GPHDT sentence. I have all compasses disabled, use EK3. I believe the only YAW source is the GPHDT and assisted by IMU. But what is strange is that sometimes the variance between YAW shown in MP and the output of serial data terminal can reach up to 20 degrees and sometimes quite close. I understand there can be some reasonable tiny variance because of EKF processing. But 20 degree seems too big. Anyone has ideas?
This is the screen record video: https://youtu.be/BVsolHgprms

1 Like

Hi , do you use tersus GNSS on copter ?

I cant stable hover with tersus gnss : Flies hover by circling a 2-3 meter diameter circle in RTKFixed

Now get a better alignment of YAW and GPHDT by adjusting GYRO_P_NSE = 0.1 maximum.
https://youtu.be/XM9MQ-NIRJ8

@dacheng GPHDT is from NMEA, right? Does Ardupilot allow using sentences from NMEA and UBX at the same time? Your case, I guess you did not use the NMEA only, am I right?

Yes, GPHDT is from NMEA. I think Ardupilot does allow NMEA and UBX at the same time because you can set GPS_TYPE and GPS_TYPE2 different to be NMEA or UBX.
But in my case, I only have one GPS unit, a dual-antenna unit Tersus BX316D. And I have no compass. So the only YAW source is GPHDT from NMEA.

Nice, just curious that does the BX316D use modified NMEA? As far as I know, the original NMEA just allows 12 maximum satellites count (for displaying in Mission Planner), right?

I think the BX316D just uses the standard NMEA-0183. And I do not know there is such a limit. I often see 16 satellites in MP when using GPHDT for YAW.

Good day All

I am wondering if there is any progress on this feature with the latest FW 4.0.4 rc2 ?

I am trying with the ardusimple Rtk HEADING setup and configuring as per the wiki:
https://ardupilot.org/copter/docs/common-gps-for-yaw.html

I am not having success and am wondering if this wiki page applies to the ardusimple board?

Are there other steps that I must take to get the heading working?
Must I connect both boards’ UART1 to the cube?

Thanks!

1 Like

AFAIK you need to use FW 4.1.0-dev a.k.a. git master to do that.

Thanks Amilcarlucas. I am just going off what I read in the wiki.

It seems that the functionallity is present in 4.0.4.

But full functionality of having the option of a Mag fall back is only in 4.1.0

Has anyone got this system working with the 4.0.4?

Thanks!

2 Likes

This topic is really interesting to me!
I’m new to ardupilot and I’m trying to bring up my first system based on pixhawk to make my ground rover move autonomously.
I have two GPS ZED f9p from ublox that can work in RTK and I would like to use them with dual antenna configuration since the heading is very critical for me application.
I also have a dual antenna receiver from Novatel which provides a 0.1° of accuracy with a base line of 2 meters.

If the dual antenna heading supported on the newest firmware of ardupilot? If yes, how is it working?
Should I use pixhawk 4 or should it work on any version?

Thank you!

It works well. Configure ArduRover as described here

You can read some of the trials and tribulations of some of us who initially had trouble but eventually got it all to work starting around post 107 of KevinG’s Autonomous zero-point turn Lawn Mower - Blog - ArduPilot Discourse