Conflict detection and resolution algorithms for UAVs collision avoidance