Use Heading from Dual GPS

,

Sorry that I am stuck at “dataflash” at the moment because I have no idea to provide it to you, I am kindly new here.

At the beginning, there is just one GPS in Port GPS2 (Serial 4), now I am just simply switch the port to GPS1 (Serial 3) instead of GPS2 with the same steps I have done with GPS2 (GPS_TYPE2, SERIAL3_BAUD, SERIAL3_PROTOCOL, GPS_AUTO_SWITCH). Long, lat can not be read in MP and MP can not detect the GPS module at booting section. Is it somehow the GPS1 just accepts UBLOX?

https://lmgtfy.com/?q=ardupilot+dataflash+logs&t=w

Thanks, it is solved!

@jimovonz I’m using ardurover 4. I have an ardusimple RTK2B+RTK2BLite setup (like this https://www.ardusimple.com/simplertk2heading-hookup-guide/) configured to send UBX-NAV-PVT and UBX-NAV-RELPOSNED messages (and no NMEA messages) to my pixhawk4. Ardurover seems to be receiving/interpreting the PVT message because I see the correct lat/lon on mission planner.

First question: How should I confirm that Ardurover is receiving/interpreting the RELPOSNED message? On my mission planner status window there isn’t a gps-yaw displayed anywhere (like there is lat2, lng2, etc.). Where can I view the GPS yaw according to ardurover?

Next, should I have to change any parameters in ardurover/ardupilot to tell the system to use heading from the GPS (in the RELPOSNED message) instead of heading from the compass? In fact I want to disable magnetic compasses entirely (my rover has too much EMF interference) and just rely on GPS heading. To do that should I set COMPASS_USE to Disabled? Should I change any other parameter?

Thanks in advance.

@rmackay9 FYI in case you have any pointer.

2 Likes

Hi @Christopher_Milner,

I’ve just received a similar ArduSimple setup. The dual F9P unit for my rover and another as a base station. Was just trying to configure today but didn’t get there. Hoping you might offer a suggestion or two?

I’ve used the’pixhawk’ connector on each of the Rover units to connect to GPS 1&2 on a Cube. Latest Rover version. Both GapS units are showing a fix but nothing showing in Mission Planner. No GPS fix. I did find a list of parameters to change by @Andrew_Tridgell. Still no luck. I’d have thought ArduSimple would’ve flashed the units for use in that config. Any thoughts?

@ktrussell you too!

Thanks,
Ben

My understanding is that ardusimple doesn’t configure units for use with audupilot “off the shelf” and that it will take some messing around with the configurations of the F9P units. This the most recent documentation I am aware of: https://github.com/ArduPilot/ardupilot/pull/12844

I haven’t gotten this working, please keep us posted if you do!

That is correct. When I purchased my units they were not configured. There was an additional cost for flashing the units that I did not pay for at the time. I did email ardusimple and they eventually gave me the correct configs to flash and I avoided the extra cost. By time I got a response from ardusimple (a few days) I did manage to figure out how to get it working on my own. I purchased the RTK with Heading kit so it was important to get the serial connection config between the two units correct. It was also important to make sure the serial ports were getting the correct messages. I spent a few hours in the configuration tool slowly learning what needed to be done.

Unfortunately, I put away all the kit for winter otherwise I would just grab the config I have for you. As I remember, it was also important that I have the latest ardupilot with F9P support and that it was in auto detect mode.

@BenBBB are you planning on using ardupilot to do the baseline calculations or are you going to hook the two F9P boards together and have it do the heading calculation?

Thanks @Christopher_Milner, I’d read that page. Still a little unclear. I’ll have a look at them in U-centre. I’ll let you know :+1:
Ta, Ben

Thanks @Vincent_Miceli,
So, off to U-centre. But getting in touch with ArduSimple sounds worth trying too.
Yes, I’d like them configured to talk to each other as one gps unit is mounted on the other. I’m sure I can get gps fix and the heading (relposned) from the one output and send it to the Cube.
I’ll have a look and see what I can figure out.
Ta, Ben

They have put the configuration files on GitHub.

1 Like

It’s 7.47am and I guarantee you’re my favourite person for the day @Vincent_Miceli!
Off to github :grin::grin::grin:

1 Like

@Vincent_Miceli I guess I didn’t realize that you had gotten this working. I have a few questions:

  1. Did you use 2 autopilot serial ports (i.e. TELEM1 and TELEM2 on Pixhawk4), one connected to each of the 2 GPSs on the Ardusimple? As I understand it, one of the ardusimple GPSs reports the RTK position (back to the autopilot), while the other ardusimple GPS reports the UBX RELPOSNED message.
  2. Did you provide RTK corrections using mission planner to the pixhawk, when then forwarded those corrections on to the Ardusimple GPSs?

Any chance you cuold send your pixhawk parm file?

In the configuration I had, two gps units on my rover where connected directly via their serial ports. One acted as base (for heading) and the other as rover. The one acting as rover was then connected via its other serial port to the GPS serial of the pixhawk and was passing RELPOSNED messages as well as other positioning messages.

I might have time this weekend to pull out the project and give more technical details about the config.

1 Like

@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.