Servers by jDrones

Use Heading from Dual GPS

gps
yaw
(Fabian Faul) #17

This sounds great. Is the 4G correction necessary? I think it should also work without and only from the difference between GPS1 and GPS2. Did you try that?

@Christopher_Milner I have two ArduSimple boards. Until now, they are not that precise but I will keep trying.

1 Like
(Reuben Finch) #18

I need the accuracy of the navigation, that’s why I’m using RTK corrections.

1 Like
(curt carroll) #19

No corrections are necessary to get accurate bearings between two receivers. Within 40km 2 GNSS receivers will have almost the exact same error. This is how cm accurate baselines are determined but you do not need corrections for this to work.
If you have carrier phase receivers accuracy at 50 cm will be about 2 deg 17 min,
accuracy at 1 meter accuracy will be about 1 deg 9 minutes,
accuracy at 2 meters about 0 deg 34 min.

1 Like
(Reuben Finch) #20

Have you verified this experimentally? How do you ensure that the two modules are calculating their position off the same satellites?

It seems to me there could potentially be quite a variation without the ability to synchronise which satellites are being used for the calculation.

(curt carroll) #21

Yes & No I have not other than looking at post processed data. I will rig up a test this week.
set 3 baselines for comparison CA, carrier phase & RTK GPS receivers.

Possibly if you were using 1GPS only & 1 Glonass only or had interference at only one GPS.
Like I said I run a test for ya.

(curt carroll) #22

I did run a test today. This does work. If you set up 2 gps just watch as the positions float together. With all corrections off max variations were +/- 6 cm (in 2 out of 20 comparisons). As you suspected, this occurred when one had 16 sv’s one had 17 sv’s. However for most (18 out of 20 comparisons) they were right on +/- 2cm.
For this test the units were 1 meter apart and ran for 1.5 hours. I started recording data after 5 minutes of position reporting.

1 Like
(curt carroll) #23

Here are some photos of a 2nd test situation. The 3rd observation you can see a 4.5 degree vertical error when different sv’s are used . The horizontal is much better still.
The receivers are 1.515 meters apart (field measured)

(Fabian Faul) #24

Thanks, for this test. We ran a similar test with an Ardusimple RTK. The problem is that it is far from the accuracy of a compass if you don’t have a huge vehicle. I have a copter on a F550 frame which does not even allow me to mount the GPS 1m apart.

(curt carroll) #25

Agreed! I do not think Dual GPS is applicable to RC anything. There are some nice compass out now that look like a much easier solution https://store.drotek.com/sensors

(Reuben Finch) #26

I understand if you are purely hobby users, but understand that for professional users of Ardupilot an aircraft/boat/rover with at least 1m span or length is not unusual. There are many use cases where either magnetic interference or not being able to physically move the craft into all the positions required to initialise magnetometers makes them less than ideal.

There is also the added benefit that GPS heading does not change over time, if you are wanting to repeat missions over multiple years magnetic declination changes quite quickly. This requires compensation that GPS heading does not.

1 Like
(curt carroll) #27

We must have different professional focus and you are a more advanced user. From my point of view & the GPS I have tested the error rates are not good at 1.5 meters. Agree there are some large craft out there but I don’t need that for my professional use. I have 1/4 scale planes that I fly for hobby. Still my professional drones are all under 7 lbs. I do survey work in town most of the time a big plane scares me around people.
Declination here in my town has changed 5 degrees in the last 150 years. I have 1860’s records and though it is changing slightly faster than normal right now it’s somewhat predictable unless you are close to the poles.

(Reuben Finch) #28

For the majority of users the magnetometers are cheap and provide an adequate heading. I think for those with large enough vehicles that are already running RTK the superior lock of GPS heading is well worth it.

1 Like
(Christopher Milner) #29

@Reuben_Finch did you consider the UBX RELPOSNED message? My setup is Pixhawk4 + RPi + Dual Ardusimple GPSs (diagram here). RPi sources RTCM messages over the internet and sends them to the Ardusimple set (only have to send to one of the GPSs). Then the other Ardusimple sends NMEA messages (did you know you can enable high accuracy in NMEA messages? You can!) to the pixhawk. However per the Ardusimple folks, here, the heading information is only in a UBX RELPOSNED message.

Any hints on what code in Ardurover is the closest starting point for me to write code to receive & interpret the RELPOSNED message?

Thanks-

(Reuben Finch) #30

It will be fairly easy to modify the AP_GPS_UBLOX h and cpp to add in the ‘RELPOSNED’ message.
It seems there’s really only the ‘relPosHeading’ value that is of any use in that message.
Then I would follow @tridge’s Heading from gps yaw fork to connect that value into the EKF3 code.

I’ve just noticed that this code has now been merged, so you will only have to replace the NMEA HDT message.

Given that this ‘RELPOSNED’ methodology is now possible, it might be worth working on this together then get @tridge to look over it, if we’re quick enough we might get it merged into the next stable release. It saves one UART. Just need someone to produce a dual F9P board to make it more convenient for smaller vehicles.

(Christopher Milner) #31

Got it. Will keep you posted. I will start by hardcoding the physical location of the 2 GPS antennas on the vehicle so my code will be far from a straight merge.

In my case the 2 antennas are on the longitudinal centerline of the vehicle, one (“Primary”) at the rotational center of the vehicle, i.e. between the 2 wheels, and the other approximately 1.1m forward of it. This means that the GPS position of the primary GPS is what I will use as the GPS position of the vehicle. When the rover rotates, this antenna does not move. I have found this to be important to get pivot turns to work. The secondary GPS is just used for heading…

I expect that others may choose different geometries, in particular, 2 GPSs at the same fore/aft station, one left and one right of the centerline. This geometry would require calculations to determine the position of the center of the vehicle.

Hence I think I should leave it up to others more familiar with ardu-code to figure out the appropriate parameter names & values/encoding necessary to parameter-ize the different scenarios of the positioning of the 2 antennas.

(Reuben Finch) #32

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
(Kenny Trussell) #33

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

(Christopher Milner) #34

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…

(Kenny Trussell) #35

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

(Bitdog) #36

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.