Behind the scenes with MBTA data.

An explanation of how the MBTA tracks vehicles using GPS and other various tools.

Transit agencies have two primary big data questions: where are the passengers (and where do they want to go) and where are the transit vehicles. In previous posts we described how we measure ridership and infer origins and destinations. In this post we give an overview of how we track our vehicles.  

Knowing MBTA vehicles’ locations is critical for our services: it allows us to manage our service, measure our performance, and provide passengers with predictions of upcoming vehicle arrivals. How we get that information varies among the different modes, and each tracking technology has different advantages and limitations that affect how we handle it. We have vehicle tracking on almost all our vehicles, with the exception of the Mattapan Line trolleys and the commuter ferries. With this basic “vehicle v in place p at time t” data we can derive headways (time between trains) and travel times for performance measurement (like the MBTA Dashboard) and make predictions to put on signs and in our real-time data feed. This post will describe the different systems we use to track heavy rail, light rail, buses, and commuter rail.

Heavy Rail (Red, Blue, and Orange lines)

For heavy rail, train locations come from the signal system, which also enforces safe distances between trains. The subway tracks are divided into “blocks” that are a few hundred feet long (at least the length of a full train). When a train is in a block it triggers a track circuit that indicates to the signal system that that block is occupied. This indication of block occupancy is sent back to the control center and also recorded in a database. The database knows which blocks are stations, which tells us when a train enters and leaves a station by recording when it entered and left that block. Because this data is derived from the signal system, the raw data is very reliable but there is limited access to it because the signal system is safety-critical. The data passes through two MBTA systems before being available in our public data feed and incorporated into our performance metric software, and each transfer is an opportunity for data loss.

Light Rail (Green Line)

Vehicle location on the Green Line is more complicated than the other lines and combines elements of both above-ground and below-ground vehicle tracking. To read about the Green Line, see this post.


Vehicle locations on buses are part of a broader vehicle technology suite called TransitMaster that the MBTA uses to manage bus service.  TransitMaster uses a combination of GPS and the vehicle’s odometer to determine the bus’ location. Location data then is used to play the correct stop announcements, request priority at certain traffic lights, and plot the vehicles’ locations on maps to help dispatchers manage service. The locations are also sent to a server that makes the predictions for future stop arrivals that are then used by websites and apps to tell you when the next bus is coming. When a bus reaches certain stops that we call time points, this data is recorded in a performance management server that compares it to the schedule and determines if the bus was on time. 

One reason we focus on time points for performance management is that we actually don’t get the bus’ location at every stop. Though the vehicle’s GPS is continuously tracking its location so it can play the correct stop announcements, it only transmits it back to the dispatch and performance systems once every 60 seconds in what is known as a heartbeat message. To compensate for this, the software on the bus knows where the time points are and records the bus’ arrival there, even if it’s between heartbeat messages. The time point message is then sent back to dispatch in addition to the heartbeat message. To summarize, the real-time information and performance reporting programs get bus locations at least once every minute, and get additional data when buses pass time points.

Commuter Rail

The Commuter Rail system actually has two positioning systems that operate simultaneously. One is the signaling system which operates much like the subway signal system. Because Commuter Rail lines are much longer and the stations are further apart the blocks can be miles long, which does not provide good detail. To supplement the block system, each train also has GPS that functions similarly to buses’ and Green Line vehicles’ GPS systems- reporting locations back to a central server which then distributes them for both performance management and real-time customer information.

Services without Location Data

Currently ferries, the Mattapan Trolley, and buses run by private contractors (710, 712, 713, 714, and 716) don’t have any positioning systems. This means, unfortunately, that we cannot provide customers with real-time information on these services and also must rely on manual data collection for performance management.