ZED-F9R .ubx raw with IMU simoultaneous logging

Hi,

I have the “SparkFun ZED-F9R GPS Breakout” connected to a Redboard ESP32 with SD Card and use the SparkFun_u-blox_GNSS_v3 Library and to log the .ubx raw file trhough SPI. It works fine up to 20 Hz.

In the time I also tried to log some NMEA data together (in the generated .ubx file) but then noticed that the calculated PPK files weren’t of the same quality (had windows of satellite loss) and went back to only .ubx raw.

What I’m now interestedm in is to log the IMU data (possibly at the maximum rate), but I cannot find a proper example which logs the IMU data, only the “Example2_getIMUData”. I can try to add these commands and output in the SPI code for the .ubx but I guess there will be the same problem had before with NMEA.

I read of others trying to log two files separately in parallel but then also having problem with the microcontroller code or memory. Also important for the post analysis is that the data timing is synchronized in some way.

Maybe there’s a better way to log both data (.ubx raw and IMU) on the SD Card?

Thanky you

Hi,

My advice would be to:

Start with the DataLoggingExample5_Fast_RXM example

Modify it to use SPI instead of I2C. You can use the SPI code from Example 6:

https://github.com/sparkfun/SparkFun_u- … no#L32-L54

Then modify it to include the ESF INS data. The code you need to add is:

  myGNSS.setAutoESFINS(true, false); // Enable automatic ESF INS messages: without callback; without implicit update
  
  myGNSS.logESFINS(); // Enable RXM SFRBX data logging

Also add this code to stop logging:

myGNSS.setAutoESFINS(false, false); // Disable the automatic ESF INS messages

I hope this helps,

Paul

Also, if you try to log NMEA at 20Hz, the data rate from the GSV messages will be huge. Try logging the NMEA at 1Hz - with the RAWX + SFRBX at the full 20Hz:

https://github.com/sparkfun/SparkFun_u- … #L238-L249

hi, thank you for the prompt reply.

I tried to modify the “DataLoggingExample5_Fast_RXM” example to include the commands in the SPI example and I can see that in the generated log file I have some more information, still trying to extrapolate them to see if they’re the IMU: unfortunately from U-Center isn’t possible, I only see the packets.

anyway once generated an RKLIB .obs file I also see that the frequency has reduced from 20 Hz (from the previous “SPI code from Example 6”) to only 7 Hz.

Do you know if and how it is possible to increase the frequency again?

In the end the NMEA aren’t important, final goal is to get the GPS/raw at 20 Hz + IMU at 100 Hz

Regards

Dan

Hi Dan,

Did you change this line? Change it to 20 for 20Hz:

https://github.com/sparkfun/SparkFun_u- … M.ino#L156

Then, if you do want NMEA at 1Hz, add:

  myGNSS.newCfgValset(VAL_LAYER_RAM);
  myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GGA_SPI, 20); // Ensure the GxGGA (Global positioning system fix data) message is enabled. Send every second.
  myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GSA_SPI, 20); // Ensure the GxGSA (GNSS DOP and Active satellites) message is enabled. Send every second.
  myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GSV_SPI, 20); // Ensure the GxGSV (GNSS satellites in view) message is enabled. Send every second.
  myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GST_SPI, 20); // Ensure the GxGST (Position error statistics) message is enabled. Send every second.
  myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_RMC_SPI, 20); // Ensure the GxRMC (Recommended minimum: position, velocity and time) message is enabled. Send every second.
  myGNSS.sendCfgValset();
  myGNSS.setNMEALoggingMask(SFE_UBLOX_FILTER_NMEA_GGA | SFE_UBLOX_FILTER_NMEA_GSA | SFE_UBLOX_FILTER_NMEA_GSV | SFE_UBLOX_FILTER_NMEA_GST | SFE_UBLOX_FILTER_NMEA_RMC); // Log only these NMEA messages

You can use our Python “UBX Integrity Checker” to tell you what messages your .ubx file contains and if it contains any errors:

https://github.com/sparkfun/SparkFun_u- … Checker.py

I hope this helps,

Paul