Use Heading from Dual GPS

,

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

Thank you! I’ll check them immediately!

I followed the instructions suggested by @ktrussell and I set these values:

on Mission Planner and I wrote them to my Pixhawk 5X.
This is my current configuration:

The distance between both GPS modules is 0.90 m.
I’m using this kit from Holybro and so I have 2 x H-RTK F9P rover modules and 1 x F9P base station, so all the modules run on ublox chips.

I tested the configuration without the RTK corrections and the heading seems to be fine and I’m able to make the vehicle move towards the GPS waypoint (even if there are some errors since the GPS signal isn’t very well).

Now, I would like to use the RTK corrections in order to improve the positioning and the heading information.
Following this document: CubePilot Here+ RTK GPS — Copter documentation I can understand that I can use Mission Planner to inject the RTCM3 corrections from the base to the first GPS module connected to GPS1 connector.
But, what I have to do in order to inject also the RTCM3 corrections to the second GPS modules?

I see that you directly connect both rover modules on UART2, the problem is that my GPS modules use a JST 1.25 10-pin connector and this is the pinout:

I connected the first GPS to GPS1 and the second on the 6-pin connector named GPS2 on my pixhawk 5X.

I think the module doesn’t have an additional UART interface so I do not know how to make enable the communication between them. May be I can use SDA and SCL and enable the RTCM3 messages IN and OUT on I2C under u-center? Are these two pins used by pixhawk or does the GPS port on pixhawk only use the RX and TX pins?

Is there another way to inject RTCM3 corrections from the base station directly to the second GPS by using mission planner?

Today, I disassembled my modules and I’ve found out that, fortunately, there is a connector for the UART2 on both the modules!

So, I can wire both modules by using their UART2 as @Vincent_Miceli and @Yuri_Rage did .

GPS1 RX → TX GPS2
GPS1 TX → RX GPS2
GPS1 GND → GND GPS2

In this way, should I set with u-center:

RTCM3 as protocol IN and OUT on GPS1 on UART2
RTCM3 as protocol IN on GPS2 on UART2

and enable these messages: 1005,1074,1084,1094,1124,1230 on UART2 ?.

Then, I should inject the RTCM3 messages from the base station to the first GPS1.

Is it everything correct?
What kind of baud rate should I set for UART2?

Set 230400 or 460800

1 Like

Thank you! Should I set anything else in mission planner or in my F9P modules?

1 Like

Set:
GPS_AUTO_CONFIG=1
GPS_DRV_OPTIONS=1

1 Like

Today, I updated the firmware on my two F9P modules from v1.12 to the latest v1.30 and then I changed the configuration on UART2 on both modules.

I set the baudrate for UART2 to 460800, but I wasn’t able to change it to UART1 and it is still 38400. Is it mandatory to change also the baudrate of UART1?

This is my configuration for UART1 and UART2:
uart1

and I also enabled the following messages: 1005,1074,1084,1094,1124,1230 on UART1, UART2 and I2C on both modules.

Is my configuration OK or should I find a way to set also the baudrate of UART1 to 460800?
I will connect a wire between both UART2 ports to inject the RTCM3 corrections from GPS1 to GPS2.

Sorry for the stupid question!

Reset them to default and get out of u-Center. Use GPS_AUTO_CONFIG as I have been telling you.

1 Like

Thank you for your suggestion.

So should I also reset the settings on UART2 for the RTCM corrections?

If I use GPS_AUTO_CONFIG, how can the GPS2 understand that it will receive RTK corrections on its UART2 port from the GPS1? Shouldn’t I enable the RTCM3 protocol on UART2?

That’s what GPS_DRV_OPTIONS=1 tells the autopilot when it does the configuration.

I can’t explain any clearer:
Set things back to default in u-Center
Set GPS_AUTO_CONFIG=1
Set GPS_DRV_OPTIONS=1

1 Like

@marcusbarnet I think that the part you are missing is that Ardupilot can relay RTCM messages between the two F9P modules. For this GPS_AUTO_CONFIG to work, each module needs to be connected the to flight controller via the modules UART1 (no direct connection between the modules is required). Ardupilot takes care of the config of both modules and forwards the RTCM data from the base F9P to the rover F9P.

1 Like

Sorry, I didn’t get that these two parameters are enough to make both GPS1 and GPS2 work in RTK.
I’ve found their explaination on: Complete Parameter List — Copter documentation

GPS_AUTO_CONFIG = 1 → Enable automatic configuration for Serial GPSes only (hope it works also on pixhawk 5X)
GPS_DRV_OPTIONS = 1 → Use base station for GPS yaw on SBF (should it be -ublox-?!)

I just can’t understand if I still need to connect UART2 from GPS1 to UART2 on GPS2.

By reading this post from @Yuri_Rage, it seems that I still need to connect both modules by using their UART2 interfaces: KevinG's Autonomous zero-point turn Lawn Mower - #107 by Yuri_Rage

It is imperative that the rover and moving base communicate directly with one another, with the moving base providing RTK injects directly to the rover using the boards’ built in UART 2 ports. The flight controllers do not provide enough bandwidth/processing time for those injects to be passed through the controller successfully and at a high enough rate to support GPS yaw.

My ugly solution is pictured here. I wasn’t sure if it was going to be permanent (or even if it would work), so I soldered some female headers onto the UART 2 (TX2/RX2) pins of each board, and then secured jumper wires with some hot snot. They are the green and white wires pictured.

You simply connect TX2 from one board to RX2 of the other, and vice versa. ArduPilot’s GPS autoconfiguration should take care of the rest, so there should be no need to use uCenter to configure the ports directly.

Is it correct?

However, I have a pixhawk 5X and it provides two ports: GPS1 with 10-pins and GPS2 with 6-pin connector and my two F9P modules are connected to these ports at the moment.

My configuration should be:

Base station placed at a fixed position on the field → First F9P module as moving base → Second F9P module as rover.

No direct connection between the two F9P modules (UART2) on the vehicle is needed

1 Like

OK, thank you a lot!