The Design, Implementation and Trajectory Generation for Small UAVs