Basic Experiment | CopterSim returns prompt message experiment
01 Experiment name and purpose
Sending back prompt message experiment: In the flight control, we often need to publish some text messages to reflect the current operating status of the system. This function can be realized by sending the uORB message of "mavlink_log".
02Experimental effect
Implement postback message display in CopterSim and QGC.
03Operating environment
①: Please refer to the recommended configuration: https://doc.rflysim.com/1.1InstallMethod.html
②: Make sure that the compilation command when installing the platform is: droneyee_zyfc-h7_default, and the firmware version is: 1.12.1. For other supporting flight controllers, please refer to: http://doc.rflysim.com/hardware.html
04
Experimental procedure
Step 1:
Open the MATLAB software, open the px4demo_mavlink_rc.slx file in MATLAB, and click the compile command in Simulink.
Step 2:
Click the View diagnostics command at the bottom of Simulink, and a diagnostic dialog box will pop up to view the compilation process. If Build process completed successfully pops up in the diagnostic box, it means that the compilation is successful. The left picture shows the generated compilation report.
Step 3:
Use the USB data cable to link the flight controller and the computer. Enter: PX4Upload in the MATLAB command line window and run it or click PX4 PSP: Upload code to Px4FMU, a CMD dialog box will pop up, showing that the firmware is being uploaded to the flight controller, waiting for the upload to succeed.
Step 4:
Open the QGroundControl software. Confirm that the drone rack and other settings are as follows:
Step 5:
After the upload is successful, double-click to open the "*\Desktop\RflyTools\HITLRun.lnk" or "*\PX4PSP\RflySimAPIs\HITLRun.bat" file, enter the inserted flight control Com port number in the pop-up CMD dialog box, and the Start RflySim3D, CopterSim, QGroundControl software, wait for the status box of CopterSim to display: PX4: GPS 3D fixed & EKF initialization finished.
Step 6:
The time variable that will be output in real time in the status box of CopterSim and the message bar of QGC.