This repo contains 3 components:
- Logger : Data acquisition and transmission using UDP
- UDP_Repeater : Centralisation of all the locations and redistribution to the clients
- Client : An instance connecting to the UDP_Repeater and generating both KML files and a video feed
- cmake (optional)
- gpsd, libgps
- Python2
- Python3
Two options, cmake or by hand:
$ mkdir build
$ cd build
$ cmake ..
$ make
$ gcc -o logger logger.cpp -lgps -lm
$server : hostname of the server hosting UDP_Repeater
$serverUDPPort : UDP port on the server hosting UDP_Repeater receiving the data from the logger
$serverTCPPort : TCP port on the server hosting UDP_Repeater receiving clients' TCP connections
Simply run the following command:
$ ./logger $machineName $server 1234
With $machineName being MotoX, CarX, HeliX or PlaneX if you want a pretty icon in google earth.
First, make sure that both $serverUDPPort and $serverTCPPort are accessible from outside. You do so using netcat!
After checking, you can run the repeater by running the following command:
$ ./udp_repeater.py $serverUDPPort $serverTCPPort
That should be all.
Simply run client.py, as shown here:
$ ./client.py $server $serverTCPPort
As new vehicles send their data, you should see more and more files in your home directory called 'Open_in_Google_Earth_RT_GPS_${machineName}.kml' and 'RT_GPS_${machineName}.kml'. Please open Google Earth and open all the files named 'Open_in_Google_Earth_RT_GPS_${machineName}.kml'. Google Earth will then poll on the second type of files to show the position of the vehicles. Congrats!