| Today,with the rapid development of science and technology,virtual reality technology frequently appears in various fields.Its convenience and high feedback have high application value in scientific research.Combining flapping-wing aircraft with virtual reality technology to enable flapping-wing aircraft to perform virtual simulation and functional experiments in the virtual world is a cross-fusion of the mechanical field and today’s emerging technologies.It has great research significance and application prospects.This paper analyzes and researches in the world’s mainstream development engines,chooses to use Unity3 D engine as the platform and carries out the virtual simulation and functional algorithm research of flapping-wing aircraft.The main tasks completed are as follows:(1)Carry out motion simulation design for the transmission mechanism and driving mechanism of the flapping-wing mechanism of a flapping-wing aircraft.By establishing a kinematic model and developing the motion algorithm of each functional component based on this,it is then scripted and mounted on the flapping-wing type.All parts of the aircraft are used to realize the motion simulation of its flapping wing mechanism.(2)The task of flapping-wing aircraft requires the construction of virtual scenes.Build a multi-street and multi-building system urban scene and realize the day and night and weather changes in the scene and real-time lighting rendering.By drawing the field surface model,establishing the landform of the field scene,and developing the algorithm of randomly generating the map tree model,a virtual scene of the field complex landform with the function of randomized scene construction is obtained.(3)Functional algorithms are developed for the tasks to be completed by the flapping-wing aircraft.Based on the A-star algorithm,developed map information processing algorithms,autonomous aircraft path planning algorithms,aircraft path finding algorithms and path display algorithms in urban areas.Based on the urban area function algorithm,the grid information detection,recording and processing algorithm,and the aircraft autonomous route planning algorithm are developed for the field scene.In addition,the newly developed path optimization algorithm to prevent the aircraft from rising and falling sharply in flight and the algorithm for autonomously setting random target points enable the aircraft to have an autonomous roaming function.Through the powerful visualization technology of the Unity3 D engine,real-time observation of the operating state of the flapping-wing aircraft during flight in a realistic environment can be achieved,which solves the single manifestation of traditional dynamics simulation software.In the future,it can be combined with professional simulation software to achieve high visualization of real data in highly realistic virtual scenes. |