After you have successfully deployed the Simulink® model on the Parrot® minidrone, you can use the Flight Control Interface to start and stop the motors on the drone. The Flight Control Interface also provides additional options to control the drone flight, and it also displays some of the errors (if any) after the drone starts.
The Parrot Flight Control Interface uses port
TCP/IP communication with the drone to obtain its status and errors (if any).
Therefore, do not use port
24099 for other TCP/IP and UDP
communication using the TCP/IP and UDP blocks in the Simulink model.
The Flight Control Interface opens automatically after the deployment of the model on Parrot minidrone is successful, if you had selected the option Launch Parrot Flight Control Interface automatically after build in the Configuration Parameters dialog box in Simulink. However, you can also open this interface by one of these options:
Click the hyperlinked text (
here) available in the
Diagnostic Viewer at the end of a successful deployment.
At the MATLAB® command prompt, type:
Drag the PowerGain slider to change the power gain of
motors. For example, if you want the speed of motors to be 20% of the value
that is set in the controller logic, drag the slider to
20. By default, the power gain is set at 10%. For an
initial test, a lower power gain is always recommended.
By default, the duration of flight is set to the Simulation Stop Time of the Simulink model. However, you can change the flight duration in the Flight Control Interface. To do this, clear the Use Simulation Stop Time as Flight Duration check box and specify a value in the Flight Time field.
Click START. The motors on the Parrot minidrone start after a few seconds.
The motors do not start if there is a Bluetooth® connection error between the Parrot minidrone and the host computer.
The motors stop after the flight duration time is reached.
The Flight Control Interface also displays some of the errors, if any, that resulted in a shutdown of the drone after you had clicked the START button. For example, see the below image that shows the interface after the drone shut down due to optical flow errors:
When the motors on the Parrot minidrone start, the Flight Control Interface changes to display the STOP button. After the motors stop (when the flight duration time is reached), proceed with the next step, Using the Flight Control Interface to Obtain the Log Files.
You can also use the STOP button to force stop the motors before the completion of the flight duration.