Generate Run Script
Generate FlightGear run script on current platform
Libraries:
Aerospace Blockset /
Animation /
Flight Simulator Interfaces
Description
The Generate Run Script block generates a customized FlightGear run script on the current platform.
To generate the run script, fill in the required information in the Parameters fields, then click Generate Script.
In the dialog box, fields marked with an asterisk (*) are evaluated as MATLAB® expressions. The other fields are treated as literal text.
Examples
HL-20 Project with Optional FlightGear Interface
Model NASA HL-20 lifting body and controller modeled in Simulink® and Aerospace Blockset™, using FlightGear for visualization.
Parameters
From the list, select the target platform on which you want to execute the
run script. This platform can differ from the platform on which you create
the run script. Select Default
if you want to generate a
run script to run on the platform from which you create the run
script.
Win64
Linux
Mac
Programmatic Use
Block Parameter:
Architecture |
Type: character vector |
Values:
'Win64' | 'Linux' | 'Mac' |
Default:
'Default' |
From the list, select the direction of the data flow:
Send
Creates the run script to set up the sending of the
net_fdm
control model from Simulink to FlightGear.Receive
Creates the run script to set up the receiving of the
net_ctrl
control model from FlightGear to Simulink.Send-Receive
Creates the run script to set up FlightGear to receive and broadcast data to and from Simulink.
Note
Selecting the
Send-Receive
option does not mean that you receive the same data that you sent (for example, you might not see control surface position data). With this option, you see primarily user input (such as data input via joystick) and environmental data.
Programmatic Use
Block Parameter:
dataFlow |
Type: character vector |
Values: 'Receive' |
'Send-Receive' |
Default:
'Send' |
Specify the name of the folder containing the model geometry that you want
in the
FlightGear
\data\Aircraft
folder.
Programmatic Use
Block Parameter:
GeometryModelName |
Type: character vector |
Values:'HL20' |
Default:
'HL20' |
ID of supported airport, selected from a list of supported airports available in the FlightGear interface, under Location.
Programmatic Use
Block Parameter:
'AirportId' |
Type: character vector |
Values:'KSFO' |
Default:
'KSFO' |
Specify the runway ID.
Programmatic Use
Block Parameter:
RunwayId |
Type: character vector |
Values:'10L' |
Default:
'10L' |
Initial altitude of the aircraft, in feet.
Programmatic Use
Block Parameter:
InitialAltitude |
Type: character vector |
Values:'7224' |
Default:
'7224' |
Initial heading of the aircraft, in degrees.
Programmatic Use
Block Parameter:
InitialHeading |
Type: character vector |
Values:'113' |
Default:
'113' |
Offset distance of the aircraft from the airport, in miles.
Programmatic Use
Block Parameter:
OffsetDistance |
Type: character vector |
Values:'4.72' |
Default:
'4.72' |
Offset azimuth of the aircraft, in degrees.
Programmatic Use
Block Parameter:
OffsetAzimuth |
Type: character vector |
Values:'0' |
Default:
'0' |
Select this check box to direct FlightGear to automatically install required scenery while the simulator is running. Selecting this check box requires a stable Internet connection. For Windows® systems, you may encounter an error message while launching FlightGear with this option enabled. For more information, see Install Additional FlightGear Scenery.
Programmatic Use
Block Parameter:
InstallScenery |
Type: character vector |
Values:'off' |
'on' |
Default:
'off' |
Select this check box to disable FlightGear shader options. Your computer built-in video card, such as NVIDIA® cards, can conflict with FlightGear shaders. Consider selecting this check box if you have this conflict.
Programmatic Use
Block Parameter:
DisableShaders |
Type: character vector |
Values:'off' |
'on' |
Default:
'off' |
Network IP address of the machine on which MATLAB runs. This value is read-only.
Programmatic Use
Block Parameter:
OriginAddress |
Type: character vector |
Values:'127.0.0.1' |
Default:
'127.0.0.1' |
Network flight dynamics model (fdm) port. For more information, see the Send net_fdm Packet to FlightGear block reference.
Programmatic Use
Block Parameter:
DestinationPort |
Type: character vector |
Values:'5502' |
Default:
'5502' |
Network control (ctrl
) port. For more information, see
the Receive net_ctrl Packet from
FlightGear block.
Programmatic Use
Block Parameter:
OriginPort |
Type: character vector |
Values:'5505' |
Default:
'5505' |
Network IP address of the machine on which the MATLAB software runs.
Programmatic Use
Block Parameter:
LocalAddress |
Type: character vector |
Values:'127.0.0.1' |
Default:
'127.0.0.1' |
Output file name. The file name is the name of the command that you use to start FlightGear with these initial parameters.
Note
The run script file name must be composed of ASCII characters.
Use these file extensions:
Platform | Extension |
---|---|
Windows |
.bat
|
Linux® and macOS |
.sh
|
Programmatic Use
Block Parameter:
OutputFileName |
Type: character vector |
Values:'runfg.bat' |
Default:
'runfg.bat' |
Specify the name of the FlightGear installation folder.
Note
FlightGear must be installed in a folder path name composed of ASCII characters.
Programmatic Use
Block Parameter:
FlightGearBaseDirectory |
Type: character vector |
Values:'C:\Program
Files\FlightGear' |
Default: 'C:\Program
Files\FlightGear' |
Click Generate Script to generate a run script for FlightGear. Do not click this button until you have entered the correct information in the dialog box parameters.
Version History
Introduced before R2006a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: United States.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)