|
|
3 anni fa | |
|---|---|---|
| .. | ||
| data | 4 anni fa | |
| icon | 4 anni fa | |
| rtjs | 4 anni fa | |
| README.md | 3 anni fa | |
| geojson_from_gtfs_txt.py | 4 anni fa | |
| gtfs-realtime-succinct.proto | 4 anni fa | |
| gtfs-realtime.proto | 4 anni fa | |
| gtfs-realtime_pb.js | 4 anni fa | |
| gtfs_example_read.py | 4 anni fa | |
| gtfs_example_write.py | 4 anni fa | |
| pb-compile | 4 anni fa | |
| pb2json.js | 4 anni fa | |
| ridelogic_avls.py | 4 anni fa | |
| synthetic_avls_source.py | 4 anni fa | |
This directory is for experimental code
To create a protobuf to JSON converter:
browserify pb2json.js --s pb2json > pb2jsonlib.js
To get a rudimentary real time bus map, execute the following:
cd ../html/
while [ true ] ; do
wget -q 'https://realtimetcatbus.availtec.com/InfoPoint/GTFS-Realtime.ashx?&Type=VehiclePosition&serverid=0' -O VehiclePosition.pb.tmp ;
mv VehiclePosition.pb.tmp VehiclePosition.pb ;
echo '...' ;
sleep 10 ;
done
cd ../html/
python3 -m http.server
And then point your web browser to http://localhost:8000
pip3 isntall gtfs-realtime-bindings
sudo apt-get install -y python3-protobuf libprotoc-dev libprotobuf-dev protobuf-compiler python-protobuf