Tracks Milano, IT public transport vehicles by reverse engeneering their system to track how many minutes are left untill the vehicle arrives at the station, along with tracking the vehicle IN REAL TIME with extreme accuracy (± 5 meters)
pepperjackdev
Check their projects out: Snake, Maze, Platformer, Traffic Dodger
andre-cmd-rgb
Check their projects out: Ghost Chat, Github Cyberpunk/Neon Theme, My Personal Website, Web OS Gui
Guerra
Check their projects out: Learning C, History
Once you ship this you can't edit the description of the project, but you'll be able to add more devlogs and re-ship it as you add new features!
Spent 6 hours making a DEMO version of the website as I cannot create a demo with all functionalities.
Check it out!
https://milanopt-tracker-demo.onrender.com
I. DID. IT!
I FIXED EVERYTHING! (Add 2 hours to the since last devlog as it has not yet updated :/)
MilanoPT by Leonardo Monforte – Devlog N.8
🗺️ Loads & caches Milan GTFS data (routes, stops, shapes, trips)
📍 Interactive map (using Leaflet.js): all stops, clustered for clarity
👆 Click any stop: see lines & real-time wait times!
🚇🚋🚌 Track any line (Metro, Tram, Bus): draws route, shows all stations, color-coded
🕒 REAL-TIME VEHICLE TRACKING: highlights arriving stations, animates vehicle icons along the route using ONLY the very limited API offered by Milano ATM.
🧭 Vehicle icons show type & direction they are heading towards
🕹️ User controls: track line, reset map, zoom to vehicle (more to come!)
📌 See your location: When promted, allow access of your location to see your real-time location on the map!
🛡️ Robust error handling & debug logging (backend)
See video below for a showcase!
Not much progress right now...
Just fixing the last bugs and adding a new (secret!) feature and ill be done for today I think, maybe I might post one more tonight and call it a day.
Bye bye :D
WE GOT PROGRESS
The vehicle is now moving well on the map!
This is incredible, and I am feeling very proud of the work
See video below to see it follow the line and get to the destination!
(Still ome bugs as only one of the vehicles is moving and its waaay too fast, but I hope to fix that it near no time!)
Some updates.
Attempting to create the animation using a faster more reliable and more accurate script called leaflet.marker-motion but no sucess so far, getting 404's and 302' everywhere!
As soon as I get a fix, ill update this log.
BIG Progress
Today was a productive one. I finally got the transport logic working, vehicles now move smoothly from one station to the next using the wait times, just as planned. Toi make it smooth, I added a feature that allows the vehicle markers to accelerate and slow down depending oin how much time the next station is reporting.
For example:
If the upcoming station says 3 minutes then the vehicle adjust its speed to get there in 3 minutes on the map too. If the station switches suddently from 3 to 1 minute, the vehicle speeds up smoothly and slows down smoothly as well to account for the delay.
I actually went outside and tested the system for 2 hours straight myself, going on every form of public transport with my PC running the code to see if it was accurate. There are still some uncertaintes especially when ARRIVING at a station (the time says 0 minutes so I have to figure out the speed for that) the rest is super accurate! Very proud.
The system tracks their movements accurately, updating everything in real-time. I also cleaned up the database structure, making it much more efficient and easier to scale later. It’s solid now.
The METRO (M1, M2, M3, M4, M5) is still giving me trouble, some bugs are holding it back, but I’m putting that aside for now. I’ve been at this for 10 hours today, and that’s more than enough. Tomorrow, I’ll dig into the METRO issues and get that part running too. One step at a time.
Created custom markers for Tram, Bus, and Metro. Added their markers correctly on the map.
Attempting to make them follow the path line to approach the next station