Your Computer-Aided Dispatch / Automatic Vehicle Location (CAD/AVL) system already knows where every bus is and which block it is running. That is most of the work already done. Producing GTFS-Realtime from CAD AVL data is largely a translation problem, not a new data-collection project. The one condition is that each live vehicle is correctly matched to the trip IDs in your static feed. Get that match right and a valid feed is within reach. Get it wrong and even perfect location data produces a feed apps cannot use.

This is the production side of the picture. GTFS-Realtime, explained and GTFS-RT vehicle positions and trip updates define what the feeds are; how live arrivals reach Google Maps covers the consumer end. This piece traces the pipeline in between: how a raw AVL ping becomes a protobuf entity that Google Maps, Apple Maps, and transit apps will accept.

What Does GTFS-Realtime From CAD AVL Need?

Producing GTFS-Realtime from CAD AVL data needs four things per vehicle. It needs a current position with a timestamp, the trip_id the vehicle is serving, its progress along that trip, and a delay or predicted time. Your CAD/AVL already captures the first and, through block assignment, the second. The feed generator supplies the rest.

What Data Does GTFS-Realtime Take From Your AVL?

Strip a GTFS-Realtime feed down to its inputs and the list is short. A VehiclePosition entity needs coordinates, a timestamp for when that position was measured, and the identity of the trip the vehicle is on. A TripUpdate entity needs that same trip identity plus a delay or predicted time for the stops still ahead. Everything else is derived.

Your AVL hardware produces the raw material continuously: latitude, longitude, heading, and speed on every reporting cycle. The dispatch side of CAD/AVL supplies the piece the raw GPS cannot: which run, block, and trip that vehicle is assigned to right now. A bare GPS tracker gives you a dot on a map. A CAD/AVL system gives you a dot that knows it is bus 214 working block 7, trip 40821. That trip assignment is what turns a location into transit data, because it is the link back to the published schedule every consuming app reads.

How Does a Vehicle Position Become a TripUpdate?

A position and a prediction are two different jobs. The position is close to a direct copy: take the latest ping, attach the trip_id, set current_status and current_stop_sequence, stamp it, and emit a VehiclePosition. The gtfs.org vehicle positions reference lists the exact fields.

A TripUpdate takes one more step. The generator compares where the vehicle actually is against where the schedule says it should be at this moment, and expresses the gap as a delay in seconds. A bus that reached stop 6 ninety seconds after its scheduled time is running about 90 seconds late, and that delay is projected forward across the trip’s remaining stops. Consumer apps read that delay against the static timetable to compute the countdown a rider sees. Because delay does not accumulate evenly, a good generator refines the number stop by stop rather than applying one flat offset to the whole run.

AVL ping, vehicle 214 Position and trip VehiclePosition Where the bus is now Stop 6, in transit trip_id 40821 TripUpdate When it arrives Stop 6, 90 s late trip_id 40821 trips.txt row 40821 route_id 7, service_id WKDY
One AVL ping, two entities, one join key

Why Does Trip-to-Block Matching Decide Whether the Feed Is Any Good?

A block is the sequence of trips one vehicle runs across a service day, and each trip in that block carries a trip_id defined in your static GTFS. Matching the live vehicle to the correct trip in its block is the decision that determines feed quality. trip_id is the join key. A VehiclePosition says “vehicle 214 is on trip 40821.” A TripUpdate says “trip 40821 is 90 seconds late.” A consuming app pairs the moving dot with the countdown by matching that one value. No other field does the job.

This is why a weak static feed makes a strong real-time feed impossible. If the trip_id in your live feed does not exist in the static feed, the prediction attaches to nothing and the app discards it. Sometimes the block assignment lags: the vehicle has started its next trip while the feed still reports the previous trip_id. The dot and the countdown then fall out of step at the seam between trips. The real-time layer can only ever be as reliable as the static schedule its IDs point back to. Building GTFS-Realtime from CAD AVL data starts, in practice, with a clean static feed.

What Breaks the Pipeline?

Most production failures are not exotic. They fall into a handful of predictable categories, and each has a clear tell.

What breaksCauseWhat a rider sees
Unmatched tripsA live trip_id is missing from the static feedMoving dot with no countdown, or no dot at all
Trip-to-block lagVehicle advances to its next trip before the feed doesBus appears to approach a stop it already passed
Clock skewThe onboard clock drifts from real timePredictions that are wrong by a fixed offset
Stale positionsA vehicle loses signal and nothing fills the gapOne bus freezes or vanishes while others update

Clock skew is the quiet one. GTFS-Realtime timestamps are absolute times. A device clock that is 40 seconds fast makes every prediction from that vehicle wrong by 40 seconds, even when the location and matching are perfect. Stale positions are the other frequent culprit, on rural and edge-of-coverage routes. When a feed does go stale, when a GTFS-Realtime feed goes stale walks through diagnosis. How reliable a GTFS-RT feed must be covers the standards a feed has to hold to avoid it.

Do You Build This or Does Your Platform Produce It for You?

Both paths exist. Open-source generators can turn an AVL stream into GTFS-Realtime, and an agency with in-house developers can run one. What that route asks for is ongoing. You keep the trip-to-block matching correct through every schedule change, monitor freshness, handle signal dropouts, renew certificates, and hold the update cadence the apps expect. The Google Transit GTFS-Realtime guidance and the gtfs.org real-time best practices describe the bar the finished feed has to clear regardless of who builds it.

The alternative is a platform that produces the feed from the same trip assignment it already uses for dispatch, so the matching is not a separate integration to maintain. The complete GTFS feed set argument extends this: when the schedule and real-time feeds come from one dataset, the IDs cannot drift apart because there is only one set of them. For the produced artifact end to end, GTFS publishing in TransitFare Cloud shows how the feed is generated and hosted.

Where TransitFare Fits

TransitFare is a transit technology company founded in 2012 that builds Real-Time Tracking & CAD/AVL and GTFS tools for small and mid-sized transit agencies running 10 to 50 vehicles. It generates GTFS-Realtime directly from its own CAD/AVL trip assignment, so vehicle positions and trip updates carry the same trip_id. A software-only rollout typically takes about 4 weeks and a hardware-backed deployment about 12 weeks. The platform has a strong production reliability record.

The feed your riders see is the bus data you already collect, matched to your schedule and published on time. Explore Real-Time Tracking & CAD/AVL to see how the pipeline runs as one system, or read how reliable a GTFS-RT feed must be for the standards it has to hold.

FAQ

Can My Existing CAD/AVL Produce a GTFS-Realtime Feed?

Usually yes, because it already captures the two things the feed needs: live vehicle positions and each vehicle’s trip assignment. What sits between them is a generator. It matches every position to a trip_id in your static GTFS, computes a delay against the schedule, and emits VehiclePosition and TripUpdate entities on a regular cycle.

What Is the Join Key Between the Position Feed and the Trip Update Feed?

The trip_id. A vehicle position reports which trip a bus is serving, and a trip update reports the predicted times for that same trip. Consuming apps pair the two by matching the trip_id, so both feeds must be generated from the same trip assignment on every cycle or they fall out of step.

Why Does a Bad Static Feed Break Real-Time Data?

Because real-time entities reference trip_id and stop_id values from the static feed. If the live feed names a trip the static feed does not contain, the prediction has nothing to attach to and consumers discard it. A clean, current static schedule is a prerequisite for a usable real-time feed, not a separate concern.

How Current Does the Feed Have to Be?

Consumer guidance generally wants vehicle positions and trip updates no more than about 90 seconds old, refreshed on the order of every 30 seconds. Google’s quality benchmarks use the same 90-second feed age. Holding those numbers is an operational discipline, not a one-time setup. Battery-electric fleets add a second telemetry stream over the same connection, covered in electric bus telematics.