what is the best way to record GPS NMEA log?

asked 2021-07-31 06:09:05 -0500

YJ gravatar image

Hi all, We are building a robot on raspi + kinetic with the NMEA driver we found on ROS (https://github.com/ros-drivers/nmea_n...) to parse the NMEA sentences. We would like to keep all the NMEA sentences and store them into a file and wonder what is the best way to achieve it.

Three methods came to our mind. And we are not sure which one is better ( fast, less computing for raspi). Any suggestions are all welcomed.

1) write each NMEA sentence into a file whenever our robot receives a new sentence.

PROS: we won't miss any sentences, CONS: this might cause serious delay since there would be a lot of file I/O operation.

2) accumulate NMEA sentences, and write them into the file every 10 seconds.

PROS: less file I/O operation, CONS: we might lose some data (10 seconds is acceptable)

3) publish each NMEA sentence and record it into a rosbag.

PROS: no worry about file I/O, CONS: need to write parser to rewrite NMEA sentence into a file ( this is acceptable ).

edit retag flag offensive close merge delete