private static double nodalDelay(double speed, double proDelay, double packets, double distance){
        if (speed <= 0  || distance <= 0) {
            return (proDelay * packets) / 60;
        } else if (proDelay <= 0  || packets <= 0) {
            return (distance/speed) * 60;
        } else {
            // (distance km /speed km/hour) * 60 minutes
            // proDelay (seconds * packets)/60 seconds in a minute
            return (proDelay * packets)/60 + (distance / speed) * 60;
        }
    }