Use Heading from Dual GPS

,

Bear in mind that there are gps offset values that exist as parameters in Ardupilot. Usually those parameters are used to compensate for an antenna placed in a less than ideal position. Perhaps there is a way to use them. Either way it could be easier to just add 2 new parameters, Antenna separation & bearing from antenna 1 to antenna 2. This would allow any strange arrangement of antennas and even allow for the heading antenna to be placed North or South of the primary GPS antenna.

Let me know your fork when you have started.

3 Likes

@Christopher_Milner, I’m very interested in this capability also. I look forward to hearing of your progress and please let me know if I can help.

Hi Kenny, good to hear from you. Bottom line I have a work thing due 9/23 and probably won’t make much progress on the gps heading before then…

Understood! I am a member of that same club (too much to do, work, etc.) to do what I want to do!

I just purchased and setup ardusimple’s simpleRTK2B + heading. Now I have a rover reporting RELPOSNED messages so If anyone wants me to test anything in the future, let me know.

Hello, I am really new to ardupilot here. Could you please let me know:

  1. What does RELPOSNED mean?
  2. I have another module which output NMEA (GGA and HDT messages), can you please show me how to use the heading from HDT for replacing the yaw source or lowering it’s weight? I have read this here https://github.com/ArduPilot/ardupilot/pull/7215
    and trying to tune some parameters but it does not help.

Thanks in advance!

@bigboy061293 RELPOSNED is a Ublox UBX message that gives info on the RELative POSition of the GNSS antenna with respect to the base station it is receiving corrections from and uses the North, East, Down coordinate frame.

The settings in the link you give to use this data for orientation in place of the magnetometer should work with the latest code. I have only tested Rover 4.0 modified to use UBX RELPOSNED (as opposed to NMEA HDT). I no longer use the magnetometers on my CubeBlack

Hi @jimovonz , thanks for your reply, could you please check my parameter whether it is right or not

If not, do I miss something?

That looks OK. What feedback are you getting that makes you think that it is not working? What version of Ardupilot are you running? What GNSS unit do you have? Are you sure that it is configured to output the NMEA HDT message? What do you see looking at GPS.Yaw in a dataflash log? How about posting a dataflash log?

Hello,

This is the case:

.I am using arducopter firmware 3.6.11, most updated ardupilot version
.I have the GPS module (K726 from sinoGNSS) output NMEA which I have already checked with terminal software via UART, at 10Hz. When checking the HDT message, it returns exactly the same heading with respect to the true North,
. GNSS is fused between GLONASS, GPS, BD2, GALILEO, SBAS. This tasked is handled by the module, which return numbers of satellites always > 10. I think the heading from HDT message is reliable enough.
. About the yaw situation, I am looking for a way to export the dataflash for further discussion. At the moment, when I turn off the COMPASS, restart the Cube, it returns yaw 0 degree and it keeps drifting because of using only gyro and accelerometer. To my understand, if everything works well, it must be the angle from HDT message, right?

Thanks.

Looking at the Copter-3.6 branch in Github, it seems that yaw from GPS is not supported. You will have to use the latest code from the master branch if you want to test this functionality. Please be aware that this code is the bleeding edge of development and that there are untested changes in this version. You use it at your own risk.

Hi,

Do you mean that I have to do it by modifying the code and compile it? If so, could you please let me know where do I have to start.

Thanks.

No, there are daily builds of the code here: http://firmware.ardupilot.org/ You can download the most current version of copter for your hardware and upload it. Mission Planner also allows you to select ‘Beta’ versions of the firmware to upload too.

Thanks,

I have came http://firmware.ardupilot.org/Copter/ and https://github.com/ArduPilot/ardupilot but can not see the “Release notes” of this firmware (4.0) http://firmware.ardupilot.org/Copter/latest/CubeBlack/git-version.txt

Hi, I have tried it with 4.00 and it works pretty well. However, the NMEA message are read from GPS2 port which I change to GPS1 later and it does not work anymore (with the same configuration). Any ideas?

Thanks!

I am glad that you got it working. There is not a lot of information in your post that might shed light on what your latest issue is. You seem to be saying that you got heading information from your GPS attached to the GPS2 port but not when attached to the GPS1 port? Once again, a dataflash log would likely provide valuable information… Do you have more than one GPS module attached? Is your GPS module/s correctly detected at boot? Have you checked your GPS_XXX2 parameters against your GPS_XXX parameters? Do you have GPS auto switch enabled?

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