src/main/java/com/conveyal/gtfs/stats/StopStats.java
public int getAverageHeadwayForStop (String stop_id, LocalDate date, LocalTime from, LocalTime to) {
        List<Trip> tripsForStop = getTripsForDate(stop_id, date);

        return getStopHeadwayForTrips(stop_id, tripsForStop, from, to);
    }
public int getAverageHeadwayForStop (String stop_id, LocalDate date, LocalTime from, LocalTime to) {
        List<Trip> tripsForStop = getTripsForDate(stop_id, date);

        return getStopHeadwayForTrips(stop_id, tripsForStop, from, to);
    }
Get the average headway, in seconds, for all trips at a stop over a time window.
@param stop_id
@param date
@param from
@param to
@return avg. headway (in seconds)