Unpack net_ctrl Packet from FlightGear
Unpack net_ctrl
variable packet received from
FlightGear
Libraries:
Aerospace Blockset /
Animation /
Flight Simulator Interfaces
Description
The Unpack net_ctrl Packet from FlightGear block unpacks
net_ctrl
variable packets received from FlightGear via the
Receive net_ctrl Packet from FlightGear block, and makes them
available for the Simulink® environment.
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
FlightGear packet to be unpacked, specified as an array.
Data Types: uint8
Output
Environment Outputs
Wind speed, specified as a scalar, in knots.
Dependencies
To enable this port, select the Show environment outputs check box.
Data Types: double
Wind direction, specified as a scalar, in deg.
Dependencies
To enable this port, select the Show environment outputs check box.
Data Types: double
Turbulence norm, specified as a scalar.
Dependencies
To enable this port, select the Show environment outputs check box.
Data Types: double
Ambient temperature, specified as a scalar, in deg C.
Dependencies
To enable this port, select the Show environment outputs check box.
Data Types: double
Ambient pressure, specified as a scalar, in inHg.
Dependencies
To enable this port, select the Show environment outputs check box.
Data Types: double
Ground elevation, specified as a scalar, in m.
Dependencies
To enable this port, select the Show environment outputs check box.
Data Types: double
Local magnetic variation, specified as a scalar.
Dependencies
To enable this port, select the Show environment outputs check box.
Data Types: double
Icing status, specified as a scalar, in deg.
Dependencies
To enable this port, select the Show environment outputs check box.
Data Types: uint32
Control Surface Position Inputs
Normalized aileron position [-1,1], specified as a scalar.
Dependencies
To enable this port, select the Show control surface position outputs check box.
Data Types: double
Normalized elevator position [-1,1], specified as a scalar.
Dependencies
To enable this port, select the Show control surface position outputs check box.
Data Types: double
Normalized rudder position [-1,1], specified as a scalar.
Dependencies
To enable this port, select the Show control surface position outputs check box.
Data Types: double
Normalized aileron trim position [-1,1], specified as a scalar.
Dependencies
To enable this port, select the Show control surface position outputs check box.
Data Types: double
Normalized elevator trim position [-1,1], specified as a scalar.
Dependencies
To enable this port, select the Show control surface position outputs check box.
Data Types: double
Normalized rudder trim position [-1,1], specified as a scalar.
Dependencies
To enable this port, select the Show control surface position outputs check box.
Data Types: double
Normalized flaps position [-0,1], specified as a scalar.
Dependencies
To enable this port, select the Show control surface position outputs check box.
Data Types: double
Normalized spoilers position [0,1], specified as a scalar.
Dependencies
To enable this port, select the Show control surface position outputs check box.
Data Types: single
Normalized speedbrake position [0,1], specified as a scalar.
Dependencies
To enable this port, select the Show control surface position outputs check box.
Data Types: single
Power for flaps, specified as a scalar. A value of
1
indicates that power is available.
Dependencies
To enable this port, select the Show control surface position outputs check box.
Data Types: uint32
Flap motor powered, specified as a scalar.
Dependencies
To enable this port, select the Show control surface position outputs check box.
Data Types: uint32
Engine/Fuel Outputs
Number of valid engines, specified as a scalar.
Dependencies
To enable this port, select the Show engine/fuel outputs check box.
Data Types: uint32
Master battery switch, specified as a vector.
Dependencies
To enable this port, select the Show engine/fuel outputs check box.
Data Types: uint32
Master alternator switch, specified as a vector.
Dependencies
To enable this port, select the Show engine/fuel outputs check box.
Data Types: uint32
Magnetos switch, specified as a scalar.
Dependencies
To enable this port, select the Show engine/fuel outputs check box.
Data Types: uint32
Power to starter motor, specified as a vector. A value of
1
indicates that power is available.
Dependencies
To enable this port, select the Show engine/fuel outputs check box.
Data Types: uint32
Normalized throttle position [0,1], specified as a vector.
Dependencies
To enable this port, select the Show engine/fuel outputs check box.
Data Types: double
Normalized mixture lever position [0,1], specified as a vector.
Dependencies
To enable this port, select the Show engine/fuel outputs check box.
Data Types: double
Normalized condition [0,1], specified as a vector.
Dependencies
To enable this port, select the Show engine/fuel outputs check box.
Data Types: uint32
Power to fuel pump, specified as a vector. A value of
1
indicates that pump is on.
Dependencies
To enable this port, select the Show engine/fuel outputs check box.
Data Types: uint32
Propeller advance [0,1], specified as a vector.
Dependencies
To enable this port, select the Show engine/fuel outputs check box.
Data Types: double
Feed tank to switch, specified as a vector.
Dependencies
To enable this port, select the Show engine/fuel outputs check box.
Data Types: uint32
Reverse switch, specified as a vector.
Dependencies
To enable this port, select the Show engine/fuel outputs check box.
Data Types: uint32
Engine status indicator, specified as a vector.
Dependencies
To enable this port, select the Show engine/fuel outputs check box.
Data Types: uint32
Left magneto status indicator, specified as a vector.
Dependencies
To enable this port, select the Show engine/fuel outputs check box.
Data Types: uint32
Right magneto status indicator, specified as a vector.
Dependencies
To enable this port, select the Show engine/fuel outputs check box.
Data Types: uint32
Spark plugs status indicator, specified as a vector. A value of
0
indicates that the plugs have failed.
Dependencies
To enable this port, select the Show engine/fuel outputs check box.
Data Types: uint32
Oil pressure status indicator, specified as a vector.
0
— Normal oil pressure1
— Low oil pressure2
— Failed oil pressure
Dependencies
To enable this port, select the Show engine/fuel outputs check box.
Data Types: uint32
Fuel management status indicator, specified as a vector.
Dependencies
To enable this port, select the Show engine/fuel outputs check box.
Data Types: uint32
Number of valid tanks, specified as a scalar.
Dependencies
To enable this port, select the Show engine/fuel outputs check box.
Data Types: uint32
Fuel selector, specified as a vector.
0
— Off1
— On
Dependencies
To enable this port, select the Show engine/fuel outputs check box.
Data Types: single
Specifies transfer from array value to tank, specified by value as a vector.
Dependencies
To enable this port, select the Show engine/fuel outputs check box.
Data Types: uint32
Cross feed valve, specified as a scalar.
0
— False1
— On
Dependencies
To enable this port, select the Show engine/fuel outputs check box.
Data Types: single
Landing Gear Outputs
Left brake pedal position pilot, specified as a scalar.
Dependencies
To enable this port, select the Show landing gear outputs check box.
Data Types: double
Right brake pedal position pilot, specified as a scalar.
Dependencies
To enable this port, select the Show landing gear outputs check box.
Data Types: double
Left brake pedal position pilot, specified as a scalar.
Dependencies
To enable this port, select the Show landing gear outputs check box.
Data Types: double
Right brake pedal position pilot, specified as a scalar.
Dependencies
To enable this port, select the Show landing gear outputs check box.
Data Types: double
Brake parking position, specified as a scalar.
Dependencies
To enable this port, select the Show landing gear outputs check box.
Data Types: double
Gear handle position, specified as a scalar.
0
— Gear handle up1
— Gear handle down
Dependencies
To enable this port, select the Show landing gear outputs check box.
Data Types: uint32
Avionic Outputs
Master avionics switch, specified as a scalar.
Dependencies
To enable this port, select the Show avionic outputs check box.
Data Types: uint32
Comm 1 frequency, specified as a scalar, in Hz.
Dependencies
To enable this port, select the Show avionic outputs check box.
Data Types: double
Comm 2 frequency, specified as a scalar, in Hz.
Dependencies
To enable this port, select the Show avionic outputs check box.
Data Types: double
Nav 1 frequency, specified as a scalar, in Hz.
Dependencies
To enable this port, select the Show avionic outputs check box.
Data Types: double
Nav 2 frequency, specified as a scalar, in Hz.
Dependencies
To enable this port, select the Show avionic outputs check box.
Data Types: double
Parameters
Select this check box to include the control surface position outputs from
the FlightGear net_ctrl
data packet.
Dependencies
Select this check box to enable these input ports.
Signal Group 1: Control surface position outputs
Name | Units | Type | Width | Description |
---|---|---|---|---|
| 1 (dimensionless) | double | 1 | Normalized aileron position [-1,1] |
| 1 (dimensionless) | double | 1 | Normalized elevator position [-1,1] |
| 1 (dimensionless) | double | 1 | Normalized rudder position [-1,1] |
| 1 (dimensionless) | double | 1 | Normalized aileron trim position [-1,1] |
| 1 (dimensionless) | double | 1 | Normalized elevator trim position [-1,1] |
| 1 (dimensionless) | double | 1 | Normalized rudder trim position [-1,1] |
| 1 (dimensionless) | double | 1 | Normalized flaps position [-0,1] |
| 1 (dimensionless) | double | 1 | Normalized spoilers position [0,1] |
| 1 (dimensionless) | double | 1 | Normalized speedbrake position [0,1] |
| 1 (dimensionless) | uint32 | 1 | Power for flaps ( |
| — | uint32 | 1 | Flap motor powered |
Programmatic Use
Block Parameter:
ShowControlSurfacePositionOutputs |
Type: character vector |
Values:
'off' | 'on' |
Default:
'off' |
Select this check box to include the engine and fuel outputs from the
FlightGear net_ctrl
data packet.
Dependencies
Select this check box to enable these input ports.
Signal Group 2: Engine/fuel outputs
Name | Units | Type | Width | Description |
---|---|---|---|---|
| — | uint32 | 1 | Number of valid engines |
| — | uint32 | 4 | Master battery switch |
| — | uint32 | 4 | Master alternator switch |
| — | uint32 | 4 | Magnetos switch |
| — | uint32 | 4 | Power to starter motor ( |
| 1 (dimensionless) | double | 4 | Normalized throttle position [0,1] |
| 1 (dimensionless) | double | 4 | Normalized mixture lever position [0,1] |
| 1 (dimensionless) | double | 4 | Normalized condition [0,1] |
| — | uint32 | 4 | Power to fuel pump |
| 1 (dimensionless) | double | 4 | Propeller advance [0,1] |
| — | uint32 | 4 | Feed tank to switch |
| — | uint32 | 4 | Reverse switch |
| — | uint32 | 4 | Engine status indicator |
| — | uint32 | 4 | Left magneto status indicator |
| — | uint32 | 4 | Right magneto status indicator |
| — | uint32 | 4 | Spark plugs status indicator ( |
| — | uint32 | 4 | Oil pressure status indicator (0 = normal, 1 = low, 2 = full failure) |
| — | uint32 | 4 | Fuel management status indicator |
| — | uint32 | 1 | Number of valid tanks |
| — | uint32 | 8 | Fuel selector. ( |
| — | uint32 | 5 | Specifies transfer from array value to tank specified by value |
| — | uint32 | 1 | Cross feed valve ( |
Programmatic Use
Block Parameter:
ShowEngineFuelOutputs |
Type: character vector |
Values:
'off' | 'on' |
Default:
'off' |
Select this check box to include the landing gear outputs from the
FlightGear net_ctrl
data packet.
Dependencies
Select this check box to enable these input ports.
Signal Group 3: Landing gear outputs
Name | Units | Type | Width | Description |
---|---|---|---|---|
| — | double | 1 | Left brake pedal position pilot |
| — | double | 1 | Right brake pedal position pilot |
| — | double | 1 | Left brake pedal position copilot |
| — | double | 1 | Right brake pedal position copilot |
| — | double | 1 | Brake parking position |
| — | uint32 | 1 | Gear handle position ( |
Programmatic Use
Block Parameter:
ShowLandingGearOutputs |
Type: character vector |
Values:
'off' | 'on' |
Default:
'off' |
Select this check box to include the avionic outputs from the FlightGear
net_ctrl
data packet.
Dependencies
Select this check box to enable these input ports.
Signal Group 4: Avionics outputs
Name | Units | Type | Width | Description |
---|---|---|---|---|
| — | uint32 | 1 | Master avionics switch |
| Hz | double | 1 | Comm 1 frequency |
| Hz | double | 1 | Comm 2 frequency |
| Hz | double | 1 | Nav 1 frequency |
| Hz | double | 1 | Nav 2 frequency |
Programmatic Use
Block Parameter:
ShowAvionicOutputs |
Type: character vector |
Values:
'off' | 'on' |
Default:
'off' |
Select this check box to include the environment outputs from the
FlightGear net_ctrl
data packet.
Dependencies
Select this check box to enable these input ports.
Signal Group 5: Environment outputs
Name | Units | Type | Width | Description |
---|---|---|---|---|
| knot | double | 1 | Wind speed |
| deg | double | 1 | Wind direction |
| — | double | 1 | Turbulence norm |
| deg C | double | 1 | Ambient temperature |
| inHg | double | 1 | Ambient pressure |
| m | double | 1 | Ground elevation |
| deg | double | 1 | Local magnetic variation |
| – | uint32 | 1 | Icing status |
Programmatic Use
Block Parameter:
ShowEnvironmentOutputs |
Type: character vector |
Values:
'off' | 'on' |
Default:
'on' |
Specify the sample time (-1 for inherited), as a scalar.
Programmatic Use
Block Parameter:
SampleTime |
Type: character vector |
Values: scalar |
Default:
'1/30' |
Version History
Introduced in R2012a
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.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- 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)