Pack net_fdm Packet for FlightGear
Generate net_fdm
packet for FlightGear
Libraries:
Aerospace Blockset /
Animation /
Flight Simulator Interfaces
Description
The Pack net_fdm Packet for FlightGear block creates, from
separate inputs, a FlightGear net_fdm
data packet compatible with a
particular version of FlightGear flight simulator. This block accepts all signals
supported by the FlightGear net_fdm
data packet. These signals are
arranged into six groups:
Position/attitude inputs
Velocity/acceleration inputs
Control surface position inputs
Engine/fuel inputs
Landing gear inputs
Environment inputs
To enable or disable the inputs for these groups, select the associated block parameter. The block input ports change depending on the requested signal groups. The block inserts zeros for packet values that are part of inactive signal groups.
The Aerospace Blockset™ product supports FlightGear versions starting from v2.6. If you are using a FlightGear version older than 2.6, the model displays a notification from the Simulink® Upgrade Advisor. Consider using the Upgrade Advisor to upgrade your FlightGear version. For more information, see Supported FlightGear Versions.
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.
Ports
Input
Position/Attitude Inputs
Longitude, specified as a scalar, in rad.
Dependencies
To enable this port, select the Show position/attitude inputs check box.
Data Types: double
Latitude, specified as a scalar, in rad.
Dependencies
To enable this port, select the Show position/attitude inputs check box.
Data Types: double
Altitude, specified as a scalar, in m.
Dependencies
To enable this port, select the Show position/attitude inputs check box.
Data Types: double
Roll, specified as a scalar, in rad.
Dependencies
To enable this port, select the Show position/attitude inputs check box.
Data Types: single
Pitch, specified as a scalar, in rad.
Dependencies
To enable this port, select the Show position/attitude inputs check box.
Data Types: single
Yaw, specified as a scalar, in rad.
Dependencies
To enable this port, select the Show position/attitude inputs check box.
Data Types: single
Velocity/Acceleration Inputs
Angle of attack, specified as a scalar, in rad.
Dependencies
To enable this port, select the Show velocity/acceleration inputs check box.
Data Types: single
Sideslip angle, specified as a scalar, in rad.
Dependencies
To enable this port, select the Show velocity/acceleration inputs check box.
Data Types: single
Roll rate, specified as a scalar, in rad/sec.
Dependencies
To enable this port, select the Show velocity/acceleration inputs check box.
Data Types: single
Pitch rate, specified as a scalar, in rad/sec.
Dependencies
To enable this port, select the Show velocity/acceleration inputs check box.
Data Types: single
Yaw rate, specified as a scalar, in rad/sec.
Dependencies
To enable this port, select the Show velocity/acceleration inputs check box.
Data Types: single
Calibrated airspeed, specified as a scalar, in knots.
Dependencies
To enable this port, select the Show velocity/acceleration inputs check box.
Data Types: single
Rate of climb, specified as a scalar, in feet/sec.
Dependencies
To enable this port, select the Show velocity/acceleration inputs check box.
Data Types: single
North velocity in body frame, specified as a scalar, in ft/sec.
Dependencies
To enable this port, select the Show velocity/acceleration inputs check box.
Data Types: single
East velocity in body frame, specified as a scalar, in feet/sec.
Dependencies
To enable this port, select the Show velocity/acceleration inputs check box.
Data Types: single
Down velocity, specified as a scalar, in feet/sec.
Dependencies
To enable this port, select the Show velocity/acceleration inputs check box.
Data Types: single
North velocity in body frame relative to local airmass, specified as a scalar, in ft/sec.
Dependencies
To enable this port, select the Show velocity/acceleration inputs check box.
Data Types: single
East velocity in body frame relative to local airmass, specified as a scalar, in ft/sec.
Dependencies
To enable this port, select the Show velocity/acceleration inputs check box.
Data Types: single
Down velocity in body frame relative to airmass, specified as a scalar, in ft/sec.
Dependencies
To enable this port, select the Show velocity/acceleration inputs check box.
Data Types: single
X acceleration in body frame, specified as a scalar, in ft/sec2.
Dependencies
To enable this port, select the Show velocity/acceleration inputs check box.
Data Types: single
Y acceleration in body frame, specified as a scalar, in ft/sec2.
Dependencies
To enable this port, select the Show velocity/acceleration inputs check box.
Data Types: single
Z acceleration in body frame, specified as a scalar, in ft/sec2.
Dependencies
To enable this port, select the Show velocity/acceleration inputs check box.
Data Types: single
Amount of stall [0-1], specified as a scalar.
Dependencies
To enable this port, select the Show velocity/acceleration inputs check box.
Data Types: single
Slip ball deflection, specified as a scalar, in degrees.
Dependencies
To enable this port, select the Show velocity/acceleration inputs check box.
Data Types: single
Control Surface Position Inputs
Normalized elevator position, specified as a scalar.
Dependencies
To enable this port, select the Show control surface position inputs check box.
Data Types: single
Normalized elevator trim tab position, specified as a scalar.
Dependencies
To enable this port, select the Show control surface position inputs check box.
Data Types: single
Normalized left flap position, specified as a scalar.
Dependencies
To enable this port, select the Show control surface position inputs check box.
Data Types: single
Normalized right flap position, specified as a scalar.
Dependencies
To enable this port, select the Show control surface position inputs check box.
Data Types: single
Normalized left aileron position. specified as a scalar.
Dependencies
To enable this port, select the Show control surface position inputs check box.
Data Types: single
Normalized right aileron position, specified as a scalar.
Dependencies
To enable this port, select the Show control surface position inputs check box.
Data Types: single
Normalized rudder position, specified as a scalar.
Dependencies
To enable this port, select the Show control surface position inputs check box.
Data Types: single
Normalized nose wheel position, specified as a scalar.
Dependencies
To enable this port, select the Show control surface position inputs check box.
Data Types: single
Normalized speedbrake position, specified as a scalar.
Dependencies
To enable this port, select the Show control surface position inputs check box.
Data Types: single
Normalized spoilers position, specified as a scalar.
Dependencies
To enable this port, select the Show control surface position inputs check box.
Data Types: single
Engine/Fuel Inputs
Number of engines, specified as a scalar.
Dependencies
To enable this port, select the Show engine/fuel inputs check box.
Data Types: uint32
Engine state (off, cranking, running), specified as a vector.
Dependencies
To enable this port, select the Show engine/fuel inputs check box.
Data Types: uint32
Engine RPM, specified as a vector, in rev/min.
Dependencies
To enable this port, select the Show engine/fuel inputs check box.
Data Types: single
Fuel flow, specified as a vector, in gal/hr.
Dependencies
To enable this port, select the Show engine/fuel inputs check box.
Data Types: single
Fuel pressure, specified as a vector, in psi.
Dependencies
To enable this port, select the Show engine/fuel inputs check box.
Data Types: single
Exhaust gas temperature, specified as a vector, in deg F.
Dependencies
To enable this port, select the Show engine/fuel inputs check box.
Data Types: single
Cylinder head temperature, specified as a vector, in deg F.
Dependencies
To enable this port, select the Show engine/fuel inputs check box.
Data Types: single
Manifold pressure, specified as a vector, in psi.
Dependencies
To enable this port, select the Show engine/fuel inputs check box.
Data Types: single
Turbine inlet temperature, specified as a vector, in deg F.
Dependencies
To enable this port, select the Show engine/fuel inputs check box.
Data Types: single
Oil temperature, specified as a vector, in deg F.
Dependencies
To enable this port, select the Show engine/fuel inputs check box.
Data Types: single
Oil pressure, specified as a vector, in psi.
Dependencies
To enable this port, select the Show engine/fuel inputs check box.
Data Types: single
Number of fuel tanks, specified as a scalar.
Dependencies
To enable this port, select the Show engine/fuel inputs check box.
Data Types: uin32
Fuel quantity per tank, specified as a vector, in gal.
Dependencies
To enable this port, select the Show engine/fuel inputs check box.
Data Types: single
Landing Gear Inputs
Number of wheels, specified as a scalar.
Dependencies
To enable this port, select the Show landing gear inputs check box.
Data Types: uint32
Weight on wheels switch, specified as a vector.
Dependencies
To enable this port, select the Show landing gear inputs check box.
Data Types: uint32
Landing gear normalized position, specified as a vector.
Dependencies
To enable this port, select the Show landing gear inputs check box.
Data Types: single
Landing gear normalized steering, specified as a vector.
Dependencies
To enable this port, select the Show landing gear inputs check box.
Data Types: single
Landing gear normalized compression, specified as a vector.
Dependencies
To enable this port, select the Show landing gear inputs check box.
Data Types: single
Environment Inputs
Altitude above ground level, specified as a scalar, in m.
Dependencies
To enable this port, select the Show environment inputs check box.
Data Types: single
Current UNIX time, specified as a scalar, in sec.
Dependencies
To enable this port, select the Show environment inputs check box.
Data Types: uint32
Offset in seconds to UNIX time, specified as a scalar, in sec.
Dependencies
To enable this port, select the Show environment inputs check box.
Data Types: int32
Visibility (for visual effects), specified as a scalar, in m.
Dependencies
To enable this port, select the Show environment inputs check box.
Data Types: single
Output
Packet generated for FlightGear, specified as an array.
Data Types: single
| double
| uint32
Parameters
Select this check box to include the position and altitude inputs in the
FlightGear net_fdm
data packet.
Dependencies
Select this check box to enable these input ports.
Signal Group 1: Position/Altitude Inputs
Name | Units | Type | Width | Description |
---|---|---|---|---|
| rad | double | 1 | Geodetic longitude |
| rad | double | 1 | Geodetic latitude |
| m | double | 1 | Altitude above sea level |
| rad | single | 1 | Pitch |
| rad | single | 1 | Roll |
| rad | single | 1 | Yaw |
Programmatic Use
Block Parameter:
ShowPositionAttitudeInputs |
Type: character vector |
Values:
'off' | 'on' |
Default:
'on' |
Select this check box to include the velocity and acceleration inputs in
the FlightGear net_fdm
data packet.
Dependencies
Select this check box to enable these input ports.
Signal Group 2: Velocity/Acceleration Inputs
Name | Units | Type | Width | Description |
---|---|---|---|---|
| rad | double | 1 | Angle of attack |
| rad | single | 1 | Sideslip angle |
| rad/sec | single | 1 | Roll rate |
| rad/sec | single | 1 | Pitch rate |
| rad/sec | single | 1 | Yaw rate |
| knot | single | 1 | Calibrated airspeed |
| feet/sec | single | 1 | Rate of climb |
| feet/sec | single | 1 | North velocity in body frame |
| feet/sec | single | 1 | East velocity in body frame |
| feet/sec | single | 1 | Down velocity |
| feet/sec | single | 1 | North velocity in body frame relative to local airmass |
| feet/sec | single | 1 | East velocity in body frame relative to local airmass |
| feet/sec | single | 1 | Down velocity in body frame relative to airmass |
| feet/sec2 | single | 1 | X acceleration in body frame |
| feet/sec2 | single | 1 | Y acceleration in body frame |
| feet/sec2 | single | 1 | Z acceleration in body frame |
| — | single | 1 | Amount of stall [0-1] |
| degrees | single | 1 | Slip ball deflection |
Programmatic Use
Block Parameter:
ShowVelocityAccelerationInputs |
Type: character vector |
Values:
'off' | 'on' |
Default:
'off' |
Select this check box to include the control surface position inputs in
the FlightGear net_fdm
data packet.
Dependencies
Select this check box to enable these input ports.
Signal Group 3: Control Surface Position Inputs
Name | Units | Type | Width | Description |
---|---|---|---|---|
| 1 (dimensionless) | single | 1 | Normalized elevator position |
| 1 (dimensionless) | single | 1 | Normalized elevator trim tab position |
| 1 (dimensionless) | single | 1 | Normalized left flap position |
| 1 (dimensionless) | single | 1 | Normalized right flap position |
| 1 (dimensionless) | single | 1 | Normalized left aileron position |
| 1 (dimensionless) | single | 1 | Normalized right aileron position |
| 1 (dimensionless) | single | 1 | Normalized rudder position |
| 1 (dimensionless) | single | 1 | Normalized nose wheel position |
| 1 (dimensionless) | single | 1 | Normalized speedbrake position |
| 1 (dimensionless) | single | 1 | Normalized spoilers position |
Programmatic Use
Block Parameter:
ShowControlSurfacePositionInputs |
Type: character vector |
Values:
'off' | 'on' |
Default:
'off' |
Select this check box to include the engine and fuel inputs in the
FlightGear net_fdm
data packet.
Dependencies
Select this check box to enable these input ports.
Signal Group 4: Engine/Fuel Inputs
Name | Units | Type | Width | Description |
---|---|---|---|---|
| — | uint32 | 1 | Number of engines |
| — | uint32 | 4 | Engine state (off, cranking, running) |
| rev/min | single | 4 | Engine RPM |
| gal/hour | single | 4 | Fuel flow |
| psi | single | 4 | Fuel pressure |
| deg F | single | 4 | Exhaust gas temperature |
| deg F | single | 4 | Cylinder head temperature |
| psi | single | 4 | Manifold pressure |
| deg F | single | 4 | Turbine inlet temperature |
| deg F | single | 4 | Oil temperature |
| psi | single | 4 | Oil pressure |
| — | uint32 | 1 | Number of fuel tanks |
| gal | single | 4 | Fuel quantity per tank |
Programmatic Use
Block Parameter:
ShowEngineFuelInputs |
Type: character vector |
Values:
'off' | 'on' |
Default:
'off' |
Select this check box to include the landing gear inputs in the FlightGear
net_fdm
data packet.
Dependencies
Select this check box to enable these input ports.
Signal Group 5: Landing Gear Inputs
Name | Units | Type | Width | Description |
---|---|---|---|---|
| — | uint32 | 1 | Number of wheels |
| — | uint32 | 3 | Weight on wheels switch |
| — | single | 3 | Landing gear normalized position |
| — | single | 3 | Landing gear normalized steering |
| — | single | 3 | Landing gear normalized compression |
Programmatic Use
Block Parameter:
ShowLandingGearInputs |
Type: character vector |
Values:
'off' | 'on' |
Default:
'off' |
Select this check box to include the environment inputs in the FlightGear
net_fdm
data packet.
Dependencies
Select this check box to enable these input ports.
Signal Group 6: Environment Inputs
Name | Units | Type | Width | Description |
---|---|---|---|---|
| m | single | 1 | Altitude above ground level |
| sec | uint32 | 1 | Current UNIX time |
| sec | int32 | 1 | Offset in seconds to UNIX time |
| m | single | 1 | Visibility in meters (for visual effects) |
Programmatic Use
Block Parameter:
ShowEnvironmentInputs |
Type: character vector |
Values:
'off' | 'on' |
Default:
'off' |
Specify the sample time (-1 for inherited).
Programmatic Use
Block Parameter:
SampleTime |
Type: character vector |
Values: scalar |
Default:
'1/30' |
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: .
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)