lightrail-vehicle-updated
event type: com.mbta.rtr.lightrail-vehicle-updated
.
Message from RTR indicating information about the location and status of light rail vehicles provided by RTR. RTR sources this information from the OCS and/or the vehicle AVLs.
Related to RFC-25
Data
Fields in the event's data
:
directionId
(integer): Direction in which the vehicle is headed. Derived from the direction in GTFS's trips.txt.lastAvi
(string): The last AVI code that was emitted from the vehicle. If you are internal to the MBTA, see the RTR documentation on AVI codesvehicleId
(string): Unique identifier of the vehicle from OCSrouteId
(string): Route that RTR thinks the vehicle is serving. See GTFS's trips.txt.consist
(array[string]): Array containing car numbers of the train in orderorientation
(enum, values: ["AB", "BA"]): Whether the 'rear' or 'front' of each train is facing forward for each train in the consist. B means backward, A means forwardnextStopId
(string): Identifier for the next stop that the vehicle is at / approaching. This will be a stop in GTFS parlance (location_type = 0
), as opposed to a station (location_type = 1
). See GTFS's stops.txt documentation.stopStatus
(enum, values: ["STOPPED_AT", "INCOMING_AT", "IN_TRANSIT_TO"]): What the train is doing in relation to the next stoplat
(number): Most recent latitude of the vehiclelon
(number): Most recent longitude of the vehicleheading
(number): Most recent direction the vehicle is pointing, measuerd in degrees from Magnetic North
Examples
- LightRailVehicleUpdated
{
"data": {
"directionId": 1,
"lastAvi": "875",
"vehicleId": "G-10023",
"routeId": "Green-D",
"consist": [
"3644",
"3862"
],
"orientation": "AB",
"nextStopId": "70203",
"stopStatus": "IN_TRANSIT_TO",
"lat": 42.21469,
"lon": -71.03305,
"heading": 26.69
},
"id": "1",
"source": "ctd.mbta.com/rtr-1234",
"specversion": "1.0",
"time": "2025-03-12T00:01:00.110000Z",
"type": "com.mbta.rtr.lightrail-vehicle-updated"
}
Schema
Loading com.mbta.rtr.lightrail-vehicle-updated...