Program to monitor if a subwaytrain is currently at a station for the complete subway in Munich. The Code is derived from https://github.com/udacity/CppND-Program-a-Concurrent-Traffic-Simulation
- Open the subwaystation map '/data/mvg_subwaystations.png'
- read subwayline from file '/data/lines.csv'
- read a stationlist from file '/data/stations.csv'
- start a thread for every subwaystation
- in every thread:
- request the current departures via http with a request like this: https://www.mvg.de/api/fahrinfo/departure/de:09162:130?footway=0
- check if a subwaytrain is at the stationdraw a colored dot on the map at the station location
- remove all trains from station that have left the station
- cmake >= 3.11
- All OSes: click here for installation instructions
- make >= 4.1 (Linux, Mac), 3.81 (Windows)
- Linux: make is installed by default on most Linux distros
- Mac: install Xcode command line tools to get make
- Windows: Click here for installation instructions
- OpenCV >= 4.1
- The OpenCV 4.1.0 source code can be found here
- gcc/g++ >= 5.4
- Linux: gcc / g++ is installed by default on most Linux distros
- Mac: same deal as make - install Xcode command line tools
- Windows: recommend using MinGW
- install vcpkg
- https://vcpkg.io/en/getting-started.html
- git clone https://github.com/Microsoft/vcpkg.git
- ./vcpkg/bootstrap-vcpkg.sh
- curl
- vcpkg install curl
- curlpp
- vcpkg install curlpp
- protobuf
- vcpkg install protbuf
- jsoncpp
- vcpkg install jsoncpp
- Clone this repo
- Change CMAKE_PREFIX_PATH (line 8) in CMakeLists.txt ot your vcpkg install folder (eg. /home/workspace/vcpkg/installed/x64-linux)
- Make a build directory in the top level directory:
mkdir build && cd build
- Compile:
cmake .. && make
- Run it:
./CapStone
.
- The Project is mainly focussed on threads and reading data from files and from http requests.
- It uses classes whereever useful.
- To exchange information between the classes smart pointers are used
- Window does not start in fullscreen
- Unkown error (probably json related) ('Line 1, Column 1 Syntax error: value, object or array expected.)
- Not all stations seem to update properly