Use Simulink® Projects (Simulink) to help organize large flight simulation modeling projects and makes it easier to share projects with others.
The Aerospace Blockset™ software supplies a Simulink projects template that you can use to create your own flight simulation application. This template uses variant subsystems, model variants, and referenced models to implement flight simulation application components such as:
An airframe that contains a 6DOF equation of motion environment model and actuator dynamics
An inertial measurement unit (IMU) sensor model
A visualization subsystem oriented for FlightGear
A model of the nonlinear dynamics of the airframe
A model of the linear dynamics of the airframe
From Simulink, select New > Simulink Project > Flight Simulation Example.
In Simulink Project, in Project name,
enter a project name, for example
In Project folder, enter a project
folder or browse to the folder to contain the project, for example
If the folder does not exist, the dialog prompts you to create it. Click Yes.
The software compiles the project, populates the project folders,
and opens the main model,
models and supporting files are in place for you to customize for
your flight simulation application.
The flight simulation project template contains the following folders
Contains the models for the Flight Control System (FCS) and its design. These models contain referenced models for different controller architectures needed for the design of aircraft simulation.
Contains the libraries used by the models.
Contains the linear dynamics of the airframe.
Contains the top-level simulation model,
Contains a model of the nonlinear dynamics of the airframe.
Contains C code. For simulation, it also has two folders that contain S-functions for simulation.
Contains scripts to run the model. These scripts do not run continuously during the simulation process.
Contains a sample test harness, including a test file,
and a script,
runProjectTests, that runs the designated
tests in the project.
Contains project-specific maintenance task utilities.
Contains files generated from every run. These files derive from source files, such as the MEX-file that you build from S-function C code.
In Shortcuts, Simulink projects creates shortcuts for common tasks such as:
Set up and clean up projects.
Add projects to MATLAB® paths.
Run project tests.
Start the top model.
To open the
flightSimulation double-click the Airframe subsystem.
Double-click the Nonlinear subsystem.
In the AC model, add your airframe dynamics.
Save the model.
To open the
flightSimulation, double-click the FCS subsystem.
In the Controller subsystem, add your controller algorithm.
Save the model.
Other things to try:
Simulate your model.
Explore the tests folder for sample tests for your application.