documentclass | title | author |
---|---|---|
physycomen |
nmea_to_json |
Di Cristina, Fabbri, Sinigardi |
This tool has been written in order to convert NMEA data into our standard .json format for GNSS coordinates
CMake, boost and a C++11 compatible compiler are required. To build the executable, clone the repo and then type
mkdir build ; cd build ; cmake .. ; cmake --build .
With CMake you can also deploy projects for the most common IDEs.
Contains jsoncons as a git submodule.
nmea_to_json.exe -i input.txt -o output.json -f [output style, 'a' (no quotes) for array or 'o' for object]
where input.txt
must be an existing NMEA ASCII-encoded file while output.json
is the name of the output file.
The optional -f specifies the style of the output .json file. If omitted, the object-style will be used.
$GPRMC,135221.000,V,4429.94755,N,01121.18915,E,0.0,-18.4,300615,,E*40
$GPRMC,135222.000,V,4429.94755,N,01121.18915,E,0.0,-18.4,300615,,E*43
$GNRMC,140502.20,A,4430.12967,N,01121.89356,E,7.201,56.95,300615,,,A*40
$GNRMC,140503.00,A,4430.12729,N,01121.89572,E,9.035,58.54,300615,,,A*4F
$GNGGA,135148.00,4429.97640,N,01121.21051,E,1,08,1.63,41.9,M,45.5,M,,*7F
$GNGGA,135148.20,4429.97639,N,01121.21050,E,1,08,1.63,41.9,M,45.5,M,,*72
Object-style:
{
"gps_record_0000001":
{
"lat":44.5021611,
"lon":11.3648926
},
"gps_record_0000002":
{
"lat":44.5021381,
"lon":11.3648768
}
}
array-style:
[
{
"lat":44.5021611,
"lon":11.3648926
},
{
"lat":44.5021381,
"lon":11.3648768
}
]
More details about file formats is available here.