This paper addresses the problem of collision avoidance with moving obstacles for unmanned aerial vehicles. It is assumed that obstacle detection and tracking can be achieved 60 seconds prior to collision. Such a time horizon allows on-board trajectory re-planning with updated constraints due to intruder and ownship dynamics. This trajectory generation problem is solved using a direct method, meaning the problem is transcripted to a nonlinear programming problem and solved with an optimization method. The main challenge in trajectory generation framework is to reliably provide a feasible (safe and flyable) trajectory within a deterministic time. In order to improve the method's reliability, a Monte Carlo analysis is used to investigate the convergence properties of the optimization process, the properties of the generated trajectories and their effectiveness in obstacle avoidance. The results show that the method is able to converge to a feasible and near-optimal trajectories within two seconds, except in very restrictive cases. Moreover, the dynamic feasibility of the generated trajectories is verified with nonlinear simulations, where the trajectory generation is integrated with the six degree-of-freedom nonlinear model of a fixed-wing research vehicle developed at Cranfield University. The results show that the generated trajectories can be tracked with a proposed two-degree-of-freedom control scheme. The improved convergence, fast computation and assured dynamic feasibility pave the way for on-board implementation and flight testing.