Advanced Path Planning and Collision Avoidance Algorithms for UAVs