Introduce
Collect, filter and record NMEA / RTCM data to SD card for RTK applications.
Users can then use those files for surveying and evaluating positioning.
SD Card driver on ESPrtk supports a variety of file formats, update cycles, NMEA filters, recording styles, etc.
This function can run as a parallel task with the main action on both Rover and Base.
RTK Rover
Save NMEA Data (from RX-UART-RTK) to SD Card
RTK Base
Save RTCM-RAW/.. Data (from RX-UART-RTK) to SD Card
Wiring SD Card to use with ESPrtk
ESPrtk | Micro SD Card |
---|---|
3.3V out | 3.3V |
GND | GND |
MISO_SD_Card | MISO |
MOSI_SD_Card | MOSI |
CS_SD_Card | CS |
SCK_SD_Card | SCK |
See more connect to SD Card adapter module here : Connect ESPrtk with RTK Receiver and other modules.
Configure:
File’s name:
Naming the file will store NMEA data. Maximum is 20 characters.
File format:
Supported file formats are “.log”, “.txt”, “.nmea”, “. nme”, “. gps”, “. ubx”, “. skt”, “. data”, “.dat”, “. bin”.
Recording type:
Suppose the file name is “my_test”. After restarting (by powering or pressing Reset button) ESPrtk will continue to write NMEA data.
- If “Append to old file” is selected: NMEA data will be added to the file with the fixed name “my_test”.
- If “Create and write on new file” is selected: ESPrtk will create a new file such as “my_test_2” and save the NMEA data into that file. On the next reboot, it will write to the file “my_test_3″…
Update cycle:
The update cycle only applies to Rover RTK (NTRIP Rover, MQTT Rover and Radio RTK Rover) when collecting NMEA messages and does not apply to cases of collecting RAW / RTCM.
It is understandable that this is the NMEA Logger rest time.
Unit is seconds. Maximum is 100000000 second.
For example, if Update cycle is 20 seconds. After 20 seconds, the NMEA Logger will be awakened, it will get enough NMEA messages before going to sleep. This process is repeated and calls it as an “Update Cycle”.
Enable / Disable type NMEA :
NMEA Logger will not save NMEA messages if it is not enabled.
This filtering feature only applies to ESPrtk configured as RTK Rover (NTRIP Rover, MQTT Rover and Radio RTK Rover).
How to use NMEA Logger on ESPrtk effectively ?
NMEA file storage path:
- NMEA file will be stored in “SD://NMEA_LOGGER/” folder.
I want to store NMEA for a long time and just want save location data:
Well, you need to save maximum storage space on the SD card.
Setting “Recording type” is “Append to old file” will help the messages to be stored in a single file.
Increase the Update cycle (sleep time) of NMEA Logger to 60 sencond or higher.You have to accept that some messages will be ignored when NMEA Logger is sleeping. This is the only way to ensure the SD card has enough memory for a long time.
Set “Max NMEA sentence” to 1 or 2.
And only select “GGA” (or just “RMC”) and do not select the remaining messages.
Of course the NMEA output on the GPS module needs to export GGA / RCM messages with a 1-hz cycle.
I have NMEA 10hz output with GGA-GSA-GSV-ZDA-DTM messages and a few messages are not listed in the enable table above, I want to store all NMEA messages and don’t want to lose any messages :
You need to speed up the performance of ESPrtk, which will help ESPrtk store at higher speeds.
Set “Recording type” is “Append to old file”.
Set the update cycle to 0 s. (ESPrtk will understand that it is a high-speed save mode.)
Set “Max NMEA sentence” to 50 or even higher.
Tick select all types of messages. select both “Other types”.
In the “Action Planning” tab, Rover’s “Other action” set is “Nothing” to allow ESPrtk to spend a lot of resources (time / RAM) for NMEA storage.
How do I know NMEA data has been saved to the SD card ? :
ESPrtk will report an error when communicating with a corrupted SD card:
- The configuration file for NMEA Logger is corrupt or does not exist.
- SD card not yet add.
- Can’t write to SD card.
- Cannot use SPI port for SD card when using Ethernet.
While writing to SD card, if the connection is suddenly interrupted, ESPrtk will not be able to detect the error and will not return an error until it restarts.
So, to make sure the data is fully written to the SD card, make sure the connection is stable and SD Card is always available with enough memory for your needs.
What file formats should I choose “.log”, “.txt” , or other?
Imported NMEA files can have any file extension, but .nmea, .nme, .gps, .txt, and .log are the most common. If you want a file to easily view internal data, select .log or .txt.
ESPrtk also supports some formats like .ubx, .stk, .log , .txt for Ublox Center and GNNSViewer. And some binary files like .dat, .data and .bin
I already have an NMEA file, what should I do with it?
You can open it with Notepad and see the raw messages it has saved. If you want to display those messages with a more intuitive look, you will need a NMEA log file viewer.
If it is a .ubx extension file, you can use Ublox Center software and open it. The software will read NMEA data and display the same information as how it receives data via the UART port. The only difference is that it is reading data from the file and you can change the read speed and playback.
If you want to display moving data, convert the file to .kml format and use Google Earth to view it.
There is an interesting tutorial here:
https://rodhern.wordpress.com/03/03/24/gps-data-logger-log-files-nmea-0183/
Performance management on ESPrtk when using NMEA / RTCM Logger:
For example, when using NTRIP as Rover (Client) , ESPrtk can perform 4 tasks at the same time:
- Export RTCM data to TX port.
- Send GGA to Server (or BLE Viewer).
- Save NMEA data to SD card
- Run the Event Log system recorder.
Don’t forget that the main work of ESPrtk now is to export RTCM data to TX2 port, any function running in parallel with it makes ESPrtk consume resources and processing time.
If you are interested in ESPrtk performance, turn off NMEA Logger mode by unchecking “Enable NMEA Logger”.
If required to use NMEA Logeer, the following values will increase performance on ESPrtk :
- Set the “Type write” is “Append to old file”.
- Set “Update Cycle” as large as possible.
- Set “Max NMEA sentence” as small as possible.
- Uncheck “enable NMEA sentences” as much as possible.