Pixhawk External GPS

Hello,

I am working on installing an external GPS. I am looking for information about what data the Pixhawk needs from the external GPS. From reading how other external GPSs are integrated with Pixhawk, some are using NMEA messages. While it’s supposed to be a convention it looks like vendors modify their NMEA message to suit their needs. Where can I find which NMEA messages can be read by the pixhawk and the exact sequence of the message? The plan is to use heading information from the GPS and not use a compass.

Been searching around for this data for a bit, but can’t seem to find it.

Thank you,

David

It is all in the GPS library.
https://github.com/ArduPilot/ardupilot/tree/master/libraries/AP_GPS

If you set your relevant GPS parameter to NMEA it should use the NMEA GPS driver

If you set it to AUTO it tries to detect which GPS you have and will probably ignore NMEA then

Skyscraper,

Thanks. Great info.

The GPS I am using doesn’t support VTG NMEA messages. So I reviewed the code and it looks like VTG is mostly redundant. Based on my reading, the code uses course and speed from VTG messages. But it looks like it has previously populated those variables from the RMC message data. Do you know if this would work if I commented out references to VTG?

Also, I am wondering why they are using speed and course from two messages? Are they validating the RMC information with VTG data?

How can I determine if other programs us VTG data?

Thanks,

Dave

Hi David,

I am no expert on GPS.

There are some GPS examples here


You could try hacking around with them to see if you can get to do what you want.

On Pixhawk the examples need a patch applied since there were some changes made to the code.
See here:

It is only a couple of lines, but dont forget to apply the make.inc file changes too ( if you build with make), else you will get linker errors.

Skysraper,

Thanks for your help. I finally got everything up and running. Took some time and was a frustrating experience, but it’s done.

Thanks,
Dave

David, did you determine what strings the pixhawk uses? Were you able to get it to run NMEA strings? Trying to get a secondary gps/rtk system setup for our drone.

Thank You
Zach

@zwheat,

We got it to work on the bench but never flew with it. Set GPSTYPE2 (not sure if that is the exact variable name) to NMEA, which I think is 5. From my testing it looks like GGA NMEA is sufficient. We didn’t continue the SBG Ellipse D integration because NMEA doesn’t include vertical velocity information, which helps the EKF generate a better naviagation solution. The main reason we wanted a very accurate GNSS system was for a stable hover - small horizontal and vertical deviations. To capture the benefit of an external GNSS/INS system there needs to be a compatible GPS driver in the ardupilot GPS library, for example, SBF for the Septentrio AsteRX. Yes there is a driver for NMEA but it lacks vertical velocity, which as I understand is only contained in binary files.

My knowledge is limited to my own experince and reading and may not be completely accurate. Hopefully those smarter than me will correct any erroroneous information I provided.

Good luck

skyvevor, Thats what I am trying to do as well, is get sub meter or better horizontal and vertical hover. I need to be able to keep my drone withing about a decimeter in both directions, and I have a couple RTK systems that can do that, but Im having difficulty determining how to get it into the pixhawk, hence my asking about the strings the gps needs. But Its interesting that NMEA doesnt include vertical velocity, as thats a major direction.

Is the SBF a brand, or a library? Im not familiar with the name

SBF is Septentrio Bin File, which is the file sent to the pixhawk from septentrio boards like the AsteRx. The bin file contains a bunch of postional data the EKF and the Pixhawk use calculate position. I don’t know if NMEA alone will keep you within a decimeter sphere. I am seeing amazing positional stabiliy with the AsteRX

What system are you using to get a SBF file? Our current setup does alright with stability, but it could be better. It seems to change from day to day haha. Im not sure NMEA will get us decimeter accuracy either, unless we output alot of money for an RTK system, but with the 2 systems that I have tried to get setup, one is a little large for a drone, and the other is such a pain to setup for each flight, and doesnt work all that great either.

The SBF file is the GPS driver for Septentrio AsteRx. I love the AsteRx easy to integrate with the pixhawk. Its expensive

Worth the money in your opinion?

If you need survey quality L1/L2 and value easy integration, it’s worth it. I’d buy another one.

We haven’t verified the vertical accuracy of the AsteRx yet but the horizontal RTK real time accuracy is +/- 6mm.