We present the design and implementation of an aircraft collision avoidance algorithm for Unmanned Aerial Vehicles (UAVs). Automatic Dependent Surveillance-Broadcast (ADS-B) is used to detect aircraft. The UAV needs to fly through pre-assigned waypoints while avoiding collisions with other aircraft. The aircraft are indifferent to the UAV. A collision with aircraft are detected by simulating the UAV's trajectory along the path of assigned waypoints using its closed-loop dynamics. A sampling based algorithm is used for collision avoidance path planning. A second collision check is performed on the generated path with the updated UAV and aircraft's states. The path will be re-planned if it leads to a collision. The algorithm was validated in Software-In-the-Loop Simulation (SITL). ADS-B data obtained from commercial aircraft flying over the Phoenix Skyharbor airport were used for simulating the collisions. The paper shows that the algorithm enables the UAV to avoid multiple aircraft with different approaching angles and speeds.