The current UAV technology is developing rapidly and there are various UAV concepts such as hybrid vertical take-off and landing (VTOL) UAV in addition to traditional UAV. The main solution direction of these UAV concepts lies in the compatibility of vertical take-off and landing and long endurance and high load. However, in some complex environments, such as post-earthquake debris, or uneven mountainous terrain, UAV take-off and landing still has great difficulties. Therefore, this paper designs a landing gear that can adapt to complex ground conditions and its corresponding landing algorithm based on DJI's publicly available UAV model. First, a movable landing gear controlled by a linear actuator is used to adapt to a variety of complex terrains. Then, we designed a UAV foot similar to a 3D carved needle with oil-hydraulic cushioning to make it fit more to the complex ground and stand stably on the ground. Then, we obtained the mathematical relationship between the linear actuator and the landing gear moving end based on the simplified mathematical model of the UAV model, and applied it in the subsequent landing algorithm. And then, in detecting the landing point, we use the column coordinate system for coordinate simulation while the algorithm written in C language to get the most suitable UAV landing point. Finally, we have simulated the UAV landing using MATLAB and the results show the high engineering value.