With the rapid development of electronic information technology, the performance of embedded microcontroller is constantly improved, and the software of UAV flight control system is also developing in the direction of multi-function and multi-task. Traditional flight control software is usually written in C language, resulting in its scalability and modular design is limited. In view of the relatively consistent core content of the flight control system software, object-oriented thought and component technology are introduced to carry out modular design and implementation of the core part, improve the scalability and flexibility of the system, and facilitate the rapid addition of new functions. Based on the analysis of the shortcomings of the existing flight control software design, this paper proposes to use C++ language to componentize the driver code, design each submodule in the form of classes, and build the overall software framework according to the dependence relationship of the software level. Through component technology, the design and implementation of the driving component are completed, and the design principle of the driving component is discussed, and the implementation process of the component is explained in detail through the concrete code, and the derivation relationship between the components is analyzed. The subscription-release communication mechanism based on component relationship is designed, the communication interface between modules is standardized, and the independence of each module of flight control software is improved. Based on the driver component, the design and implementation of each task thread are completed, the data interaction and synchronization relationship between the task threads are discussed in detail, and the implementation details and execution process of the task thread are analyzed in combination with specific components. The relationship between the driver component and the task is sorted out, the integration of flight control software is completed, and the expansibility of the driver component and the independence of the task thread are analyzed. Through functional tests, including mission execution efficiency, cycle delay, and the effectiveness of the inertial navigation module, and test flights on the quadrotor platform, the results show that the optimized flight control software has significantly improved in performance and stability. The research and optimization in this paper not only enhance the scalability and modularization design of UAV flight control system, but also provide a valuable reference for the development of flight control software in the future.
Read full abstract