For the first drone operator, it is difficult to master the techniques of flight altitude, flight speed and shooting angle. The main task of this paper is to analyze how to adjust the flying height, flight speed and shooting angle of the drone and use the drone to take satisfactory photos. Mainly complete the following four questions. In the first part, we analyze the geometric relationship between the flying height and the camera's acquisition range area. Then, we set a pixel accuracy score index as the criterion. The sum of the weighted capture area and the pixel accuracy score is taken as the objective function, the flight height does not exceed the height limit area, and the unit pixel point is greater than 800 as the constraint condition. An optimization model for the accuracy of drone shooting was established. We use computer simulation to solve the accuracy method step by step. We obtain that the height range of the drone is [25 m, 100 m], and the optimal aerial height is 33 m when θ = 60º. In the second part, based on the first part, we independently analyzed the numerical relationship between the shooting angle and the camera acquisition range area. The sum of the captured area and the pixel accuracy score after updating the weight is the objective function, the shooting angle is the decision variable, and the UAV shooting accuracy score optimization model is used. The golden section algorithm is used to solve this problem. When the flying speed of the drone is 40 m/s and the flying height is 33 m, the optimal range of the shooting angle of the drone is [56.2248º, 77.4972º]. In the third part, we established a small UAV system model and a ground target model based on the knowledge of robotics. We generated motion trajectories of discrete and continuous states of the object. The recursive target tracking algorithm is used to continuously adjust the UAV shooting angle to ensure that the target is within its shooting area. Finally, the corresponding values of the two shooting angles with respect to time are obtained. The range of angle changes is [42.18º, 79.87º] and [32.81º, 79.89º]. In the fourth part, we generated 1 skyscraper, 2 signal towers, 3 telephone poles, 3 residential buildings, for a total of 9 obstacles. We present a new RRT* algorithm for path planning based on the obstacles encountered by UAVs during flight, that is, using the cost function to select the node with the minimum cost in the field of expanding nodes as the parent node, and the two new nodes are recalculated. We use MATLAB to select a reasonable obstacle avoidance strategy, and the global optimal route is obtained by smoothing processing. Finally, we verify the rationality of the model. Through computer simulation, we determine the three-dimensional field of flight speed constant, flying height and shooting angle with respect to the score, which proves model stability and robustness.