Relative distance/direction between two GPS RTK boards

I’m looking to get a precise distance/direction between two moving objects. They will be close together (<100m) and have a radio connection. I only care where the objects are in relation to each other – absolute position doesn’t matter. Is it possible to use two GPS-RTK-SMA modules and have one act as sort of a moving base station? I’d rather avoid needing an internet connection to get the correction data. Is a setup like this possible?

Hi,

A “Moving Base” set-up will give you the accurate relative (not absolute) position of a Rover compared to a Base. The Rover will generate RELPOSNED (Relative Position North East Down) messages - if you enable them. There’s a nice paper about it on the u-blox website:

https://content.u-blox.com/sites/defaul … 093%29.pdf

There is a Rover example in the GNSS library:

https://github.com/sparkfun/SparkFun_u- … mation.ino

Because the base will be moving, you don’t want to do a “Survey In”. That’s only for applications with a fixed base. You can use this Base example to help, but you need to comment out all of the myGNSS.enableSurveyMode and myGNSS.getSurveyInValid() code. Also RTCM message 1005 (UBX_RTCM_1005) is only for fixed base applications. Replace that with UBX_RTCM_4072_0.

https://github.com/sparkfun/SparkFun_u- … CMBase.ino

I hope this does the trick,

Paul

Thanks! That helps a lot. Are there limitations on what module can be used for this setup?

specifically:

https://www.sparkfun.com/products/15005

vs.

https://www.sparkfun.com/products/16481

The NEO-M8P can generate and use RTCM, it can be used as both base and rover, and can generate RELPOSNED data, but it is single band (L1). In RTK mode, it offers a horizontal position accuracy of 2.5cm +/- 1ppm CEP. The heading accuracy is 0.3 degrees for a 1m baseline in Moving Base mode.

The ZED-F9P is the top-of-the-range dual band (L1+L2) base/rover. That’s probably the one you need, unless the NEO-M8P meets your accuracy needs (and budget).

The ZED-F9R makes an excellent RTK Rover, but can’t be used as a Base.

Enjoy!

Paul

Thanks! For the NEO-M8P-2, are there specific antenna requirements? For example, would a low-cost antenna work (such as https://www.sparkfun.com/products/14986)? 2.5cm accuracy is more than enough. +/- 50cm is probably my requirement. I assume the ZED-F9P needs a better antenna being dual band?

That antenna would be a good choice for the NEO-M8P. Correct, the ZED-F9 needs a dual-band antenna.

Best wishes,

Paul

Thanks! This has been very helpful. I now have two NEO-M8P modules and am testing. A few questions:

  1. Is there a way to check to see if the corrections are being properly applied on the rover? I have the two modules linked via radio and I’m wondering how to check to make sure everything is working.

  2. I’m using ‘pushRawData’ to accept the correction data that is sent via the radio of the base to the rover. This function says input data is not checked in terms of being valid. Is there a function to validate the incoming data?

The ZED-F9 has a message UBX-RXM-COR which indicates the differential correction input status: whether the correction messages are ‘good’ and are being ‘used’. But it looks like that’s not supported on the M8…

I think the best you can probably do is to look at the three accuracy estimates (accN, accE, accD) in the UBX-NAV-RELPOSNED message. If those are hovering around ~200, then you know the accuracy is 2.00cm. The accuracy is measured in units of 0.1mm.

If the data is valid, the NEO will use it. If the accuracy is around 200 then you know the corrections are working. If the accuracy is still around 16000 (1.6m) then you know the corrections aren’t working…

Thanks for the reply. I’m getting all zeros for those values. What does that indicate?

All zeros probably indicates that the Rover is not getting or is not able to use the corrections.

Unfortunately, I don’t have any NEO-M8P’s here to test. I’ve just tried two ZED-F9P’s and I’m getting RELPOSNED data from the Rover with accuracies around 1cm (see attached).

All I can suggest is that you try to get the Base and Rover working together on the bench, side by side, with the corrections going directly from Base to Rover via UART. Once you have that working, you can think about re-introducing your radio link.

Best wishes,

Paul

Thanks. I’ve connected the two via i2c and eliminated the radio.

It looks like I’m getting some RTCM messages on the rover, but for some reason the moving base isn’t sending 4072.0 (see screenshot of messages parsed by the rover). I have it configured:

  bool response= true;
  response &= myGNSS.enableRTCMmessage(UBX_RTCM_4072_0, COM_PORT_UART1, 1);
  response &= myGNSS.enableRTCMmessage(UBX_RTCM_1077, COM_PORT_UART1, 1);
  response &= myGNSS.enableRTCMmessage(UBX_RTCM_1087, COM_PORT_UART1, 1);
  response &= myGNSS.enableRTCMmessage(UBX_RTCM_1230, COM_PORT_UART1, 10); //Enable message every 10 seconds

What would cause this message not to get sent by the base to the rover?

Also, I noticed that there are two different firmware downloads for the NEO-M8P, one for ‘reference’ and one for ‘rover’. Do I need to flash different firmware? Both of the GPSs report 1.40REF - which I assume is the ‘reference’ version.

There are two versions of the NEO-M8P: -0 and -2. -0 is rover only. -2 is base / rover. Our board is based on the -2. Agreed, it looks like that’s also called the “reference” version.

The new version of the firmware for both boards: 1.43. It is definitely worth upgrading - using the “reference” version for NEO-M8P-2. My guess is that 4072-0 wasn’t supported with 1.40 but will be with 1.43.

Please let me know how you get on - thanks!

I upgraded both to 1.43REF. I’m still not seeing the 4072.0 message. 1077, 1087, and 1230 are there (see screenshot). Is there a configuration I’m missing maybe? Or could it be that I don’t have enough satellites in view? I have the antennas outside but they are next to the side of the house so they only have a view of half the sky.

Capture.PNG

Hi,

Sorry you’re having so many issues here.

Can you describe your set-up in a bit more detail?

Are you using two microcontroller boards? Do you have one board connected to each NEO - via I2C?

Are you using the microcontroller serial ports to pass the RTCM messages from base to rover - or have you linked the NEO UART ports?

What baud rate are you using?

I’m just wondering if you’re overloading the serial connection…

Please try switching to the MSM4 messages 1074 (GPS), 1084 (GLONASS). They’re shorter and will use less bandwidth.

The NEO-M8P can only use 2 GNSS systems concurrently, so you’re right to stick with GPS + GLONASS.

Making sure the antennas can see the whole sky will definitely help…

Thanks,

Paul

Hi @trogdor_999,

I know it has been a while, but did you get the NEO-M8P RELPOSNED working?

I got a pair of NEO-M8P’s ages ago but then completely forgot about them. Sorry about that. I was working on a ZED-F9P RELPOSNED example earlier today and it made me remember about your issue…

I’ve just set them up as a moving base plus rover pair. I have them connected to my PC via USB and am running two copies of u-center to configure them. I have upgraded both to 1.43REF.

The base is outputting RTCM3 1074 + 1084 + 1230 on UART1. I have its UART1 set to 9600 baud (the default) and have set the Protocol Out to RTCM3-only to disable the NMEA messages.

I have linked the base UART1 TX to the rover UART1 RX. I’ve also linked GND to GND.

I have a FTDI cable monitoring the serial link from the base to the rover. I’m using a third copy of u-center to monitor the data.

I have told the base to output 4072.0 but it is not being transmitted… I don’t see it via the FTDI cable.

But the rover seems happy. It has a 3D/GNSS/FIXED solution and is outputting valid RELPOSNED data:

So everything does seem to be working more or less as expected. Apart from that missing 4072.0 message…

Note that I’m not using the Arduino library and I2C to push the RTCM data. I’m trying to keep it simple and just use UART1 to transfer the data.

Apologies again for the delay - and I hope this helps,

Paul

Hah! Figured it out…!

The u-blox documentation says:

"

27.3.1 MB Reference Configuration

Configuring a receiver to operate in MB reference mode is done in two steps:

• The receiver must be set in Time Mode disabled using the configuration message UBX-CFGTMODE3.

• The RTCM3 correction stream must be configured following the rules detailed in the RTCM3

Configuration section. Each RTCM message must be individually enabled using UBX-CFG-MSG.

"

You can’t assume the receiver is in Time Mode Disabled. You have to explicitly disable it by sending CFG-TMODE3 0-Disabled. As soon as I did that, the base started outputting 4072.0. The rover went to FLOAT and started outputting RELPOSNED.

Also, you were right to use MSM7 (1077 + 1087), not MSM4 (1074 + 1084). There is another note which says “The moving baseline reference message (type 4072, sub-type 0) should only be used in combination with MSM7 observation messages.”

In summary, here’s what works:

Base:

CFG-PRT UART1 Protocol Out 5-RTCM3 (this disables the NMEA output)

CFG-MSG UART1 RTCM3 1077

CFG-MSG UART1 RTCM3 1087

CFG-MSG UART1 RTCM3 1230

CFG-MSG UART1 RTCM3 4072.0

CFG-TMODE3 0-Disabled

Connect Base UART1 TX to the Rover UART1 RX. Connect GND to GND. Enjoy your RELPOSNED!

Best wishes,

Paul

I’ve opened an issue for this:

https://github.com/sparkfun/SparkFun_u- … issues/184

Thanks! I’m trying this now.