Sparkfun Ublox Examples ZF9P Example 14 NTRIP Server

Hello,

I have been following the example project at https://learn.sparkfun.com/tutorials/ho … p-option-2

I have successfully completed the following tasks in the exercise

  1. my antenna is fixed

  2. collected my RXM-RAWX message using UCentre

  3. converted the UBX file to RINEX

  4. sent my RINEX file to CSRS-PPP Service

  5. received my summary email

  6. Entered the ECEF Coordinates into UBX - TMODE3. Can see RTCM Data flowing

  7. went with option 2 - ESP32. Successfully completed both the Blinking Light, WIFI and Bluetooth exercises

  8. Registered with RTK2GO. Have a mount name and password.

  9. Trying to complete Arduino u-blox GNSS library - examples → ZED-F9P → Example14_NTRIPServer

This is where I am hung up. I copied the code from the example 14. Have uploaded my wifi and mountpt information.

When I load it into the ESP it is coming back with the following error and the scripts won’t upload.


ESP32_RTK_BASE_STATION_WIFI:46:10: fatal error: SparkFun_u-blox_GNSS_Arduino_Library.h: No such file or directory

Multiple libraries were found for “WiFi.h”

compilation terminated.


Below is the first few lines of script (actual login names and passwords removed). Do you have any ideas how to get past this?

#include <WiFi.h>

// WiFi network name and password:

const char *ssid = “SSID”;

const char *password = “Password”;

WiFiClient ntripCaster;

#include <Wire.h>

const char casterHost = “rtk2go.com”;

const uint16_t casterPort = 2101;

const char mountPoint = “MNT Name”; //The mount point you want to push data to

const char mountPointPW = “MT password”;

#include <SparkFun_u-blox_GNSS_Arduino_Library.h> //http://librarymanager/All#SparkFun_u-blox_GNSS

SFE_UBLOX_GNSS myGNSS;

//Global Variables

It seems like the compiler is unable to find the SparkFun_u-blox_GNSS_Arduino_Library.h file. Make sure you have correctly installed the library in your Arduino IDE.

Hi CornGuy1,

For once, ChatGPT has got it right. It looks like you don’t have the SparkFun u-blox GNSS library installed. Or haven’t installed it correctly.

A couple of suggestions:

For the ZED-F9P, we recommend version 3 of our library: https://github.com/sparkfun/SparkFun_u-blox_GNSS_v3

The NTRIP Server example is: https://github.com/sparkfun/SparkFun_u- … Server.ino

This section of the ZED-F9P HookUp Guide will help: https://learn.sparkfun.com/tutorials/gp … no-library

Please let us know if you need more help with this.

Best wishes,

Paul

Hi Paul,

Thank you for the help.

The ESP32 is now broadcasting to RTK2GO. However, RTK2GO is only listing messages 1074(1),1084(1),1094(1),1124(1),1230(10). How do I add 1005?

Thanks,

Shawn

Hi Shawn,

Strange… It should be outputting 1005… Did you make any changes to the example? Please check that you are calling setStaticPosition correctly. Example14 sets the static position using ECEF (X/Y/Z) coordinates. It is possible to use LLH too.

For ECEF - to set the position in the RAM layer only (so it won’t be saved in Flash):

myGNSS.setStaticPosition(X-cm, X-0.1mm, Y-cm, Y-0.1mm, Z-cm, Z-0.1mm, false, VAL_LAYER_RAM);

For LLH:

myGNSS.setStaticPosition(Lat-degrees^-7, Lat-degrees^-9, Lon-degrees^-7, Lon-degrees^-9, Height-cm, Height-0.1mm, true, VAL_LAYER_RAM);

For less accurate positioning, you can also call:

myGNSS.setStaticPosition(X-cm, Y-cm, Z-cm, false, VAL_LAYER_RAM);

myGNSS.setStaticPosition(Lat-degrees^-7, Lon-degrees^-7, Height-cm, true, VAL_LAYER_RAM);

I hope this gets you going. Let us know if you need more help.

Best,

Paul

For example:

-1280208.308,-4716803.847,4086665.811 is SparkFun HQ in ECEF coordinates in metres. For setStaticPosition, we need to convert to cm and 0.1mm.

myGNSS.setStaticPosition(-128020831, -471680385, 408666581, false, VAL_LAYER_RAM);

myGNSS.setStaticPosition(-128020830, -80, -471680384, -70, 408666581, 10, false, VAL_LAYER_RAM);

For LLH, SparkFun is at: 40.09029751,-105.18507900,1560.238 (degrees, degrees, metres). Converting to degrees^-7, degrees^-9, cm and 0.1mm:

myGNSS.setStaticPosition(400902975, -1051850790, 156024, true, VAL_LAYER_RAM);

myGNSS.setStaticPosition(400902975, 10, -1051850790, 0, 156023, 80, true, VAL_LAYER_RAM);

Paul,

I missed entering my stations ECEF coordinates into the code. They were the original ECEF coordinates for the SparkFun HQ.

Perhaps this can be clarified in the HTML example that the ECEF coordinates need to be entered into the code around line 130.

Thank you and have a great day,

Shawn

It is working now.