The goal of this proposed research project is to achieve true onboard autonomy in real time for small UAVs in the absence of remote control and external navigation aids. Three major areas have been explored. In the area of UAV flight control, an automatic trajectory generation framework is developed. It consists of waypoint planning at upper level and LQR based trajectory generation in the lower level. The Deep reinforcement learning based framework reduces the control trust by more than 15% with much less computing complexity compared to state-of-the-art approaches.