5.1 How to Use This Chapter
RflySim adopts the Model-Based Design (MBD) philosophy for the control and safety testing of unmanned systems. The development workflow consists of five stages: modeling → controller design → Software-in-the-Loop (SIL) simulation → Hardware-in-the-Loop (HIL) simulation → real flight testing. Through MATLAB/Simulink automatic code generation technology, the controller can be seamlessly downloaded to hardware for HIL simulation and real flight testing.

MATLAB/Simulink provides a multirotor controller design interface where users (beginners, students, or engineers) can leverage their knowledge to rapidly design and verify controllers. Once the controller design is complete, the platform's code generation and download functionality converts Simulink control algorithms into C/C++ code, compiles them into PX4 autopilot firmware, and automatically flashes the firmware to the autopilot. The platform also provides HIL simulation testing, allowing users to preliminarily evaluate flight performance on a real Pixhawk autopilot system and identify potential issues before real flight. After passing HIL tests, the Pixhawk autopilot is installed on the multirotor hardware system for indoor and outdoor flight experiments to evaluate control algorithm performance.
Chapter Introduction Document
The introduction document for this chapter is located at: 🔗[Installation Directory]\RflySimAPIs\5.RflySimFlyCtrl\Intro.pdf🔗
API Reference
The development API reference for this chapter is located at: 🔗[Installation Directory]\RflySimAPIs\5.RflySimFlyCtrl\API.pdf🔗
PPT Courseware
The PPT courseware for this chapter is located at: 🔗[Installation Directory]\RflySimAPIs\5.RflySimFlyCtrl\PPT.pdf🔗
All Example Files
For all examples in this chapter, see the Readme documentation located at: 🔗[Installation Directory]\RflySimAPIs\5.RflySimFlyCtrl\Readme.pdf🔗