Google Protocol Buffers
https://developers.google.com/protocol-buffers
Go to proto/, compile the format file gps_trajectory.proto
protoc -I=. --cpp_out=. gps_trajectory.proto
This will generate proto/gps_trajectory.pb.h and proto/gps_trajectory.pb.cc
In the project root, create a build directory
mkdir build;
cd build;
Call cmake and make
cmake ..;
make;
Inside build/, call gpsproto on a test trajectory file:
./gpsproto ../test.pbf test_out.pbf
test.pbf and test_out.pbf should be the same.
Each GPS sample can be annotated with the following attributes:
int32 car_id: car/driver iduint32 timestamp: linux time stamp of sampleint32 lon: longitude x 10^5int32 lat: latitude x 10^5int32 head: heading angle in degreesint32 speed: speed in meter/secondfloat x: easting in meters (e.g UTM coordinates)float y; northing in meters (e.g UTM coordinates)