def CubicSpline_Coeff_fn(deltaT, x_init, x_end, xdot_init, xdot_end):
    """
        This function is used to calcualte the coefficients for the cubic spline
	    The cubic spline is expressed to be : y(t) = a*t^3 + b*t^2 + c*t + d
    """
    a = (2.0*x_init - 2.0*x_end + deltaT*xdot_end + deltaT*xdot_init)/(deltaT * deltaT * deltaT)
    b = -(3.0*x_init - 3.0*x_end + deltaT*xdot_end + 2.0*deltaT*xdot_init)/(deltaT * deltaT)
    c = xdot_init
    d = x_init
    return a, b, c, d