code: public double getTripDistance (String trip_id, boolean straightLine) {
          return straightLine
                  ? GeoUtils.getDistance(this.getStraightLineForStops(trip_id))
                  : GeoUtils.getDistance(this.getTripGeometry(trip_id));
      }
docs: Get the length of a trip in meters.