public double calculateCo2Consumption(Vehicle vehicle) {
        double co2 = 0;
        System.out.println(vehicle.getCargo());
        for (Route route : routeList) {
            if (vehicle instanceof Truck) {
                co2 += (route.getKm() * ((vehicle.getAverageConsumption() * (vehicle.getTypeOfFuel() == FuelType.Diesel ? FuelType.Diesel.getLiterPer100km() :  FuelType.Patrol.getLiterPer100km())) + (0.0005 * vehicle.getCargo() * 0.0265)) * (route.getSlope() >= 0 ? (1 + (route.getSlope() / 10000)) : 1) * route.getRouteType().getFactor()) * (((Truck) vehicle).isAdBlue() ? 0.93 : 1);
            } else {
                co2 += route.getKm() * ((vehicle.getAverageConsumption() * (vehicle.getTypeOfFuel() == FuelType.Diesel ? FuelType.Diesel.getLiterPer100km() :  FuelType.Patrol.getLiterPer100km())) + (0.005 * vehicle.getCargo() * 0.0265)) * (route.getSlope() >= 0 ? (1 + (route.getSlope() / 10000)) : 1) * route.getRouteType().getFactor();
            }
        }
        return co2;
    }