Unpack net_ctrl Packet from FlightGear

Unpack net_ctrl variable packet received from FlightGear

  • Library:
  • Aerospace Blockset / Animation / Flight Simulator Interfaces

  • Unpack net_ctrl Packet from FlightGear block

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.

Ports

Input

expand all

FlightGear packet to be unpacked, specified as an array.

Data Types: uint8

Output

expand all

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 pressure

  • 1 — Low oil pressure

  • 2 — 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 — Off

  • 1 — 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 — False

  • 1 — 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 up

  • 1 — 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

expand all

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

NameUnitsTypeWidthDescription

aileron

1 (dimensionless)

double

1

Normalized aileron position [-1,1]

elevator

1 (dimensionless)

double

1

Normalized elevator position [-1,1]

rudder

1 (dimensionless)

double

1

Normalized rudder position [-1,1]

aileron_trim

1 (dimensionless)

double

1

Normalized aileron trim position [-1,1]

elevator_trim

1 (dimensionless)

double

1

Normalized elevator trim position [-1,1]

rudder_trim

1 (dimensionless)

double

1

Normalized rudder trim position [-1,1]

flaps

1 (dimensionless)

double

1

Normalized flaps position [-0,1]

spoilers

1 (dimensionless)

double

1

Normalized spoilers position [0,1]

speedbrake

1 (dimensionless)

double

1

Normalized speedbrake position [0,1]

flaps_power

1 (dimensionless)

uint32

1

Power for flaps (1 = power available)

flap_motor_ok

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

NameUnitsTypeWidthDescription

num_engines

uint32

1

Number of valid engines

master_bat

uint32

4

Master battery switch

master_alt

uint32

4

Master alternator switch

magnetos

uint32

4

Magnetos switch

starter_power

uint32

4

Power to starter motor (1 = starter power available)

throttle

1 (dimensionless)

double

4

Normalized throttle position [0,1]

mixture

1 (dimensionless)

double

4

Normalized mixture lever position [0,1]

condition

1 (dimensionless)

double

4

Normalized condition [0,1]

fuel_pump_power

uint32

4

Power to fuel pump 1 = on)

prop_advance

1 (dimensionless)

double

4

Propeller advance [0,1]

feed_tank_to

uint32

4

Feed tank to switch

reverse

uint32

4

Reverse switch

engine_ok

uint32

4

Engine status indicator

mag_left_ok

uint32

4

Left magneto status indicator

mag_right_ok

uint32

4

Right magneto status indicator

spark_plugs_ok

uint32

4

Spark plugs status indicator (0 = failed plugs)

oil_press_status

uint32

4

Oil pressure status indicator (0 = normal, 1 = low, 2 = full failure)

fuel_pump_ok

uint32

4

Fuel management status indicator

num_tanks

uint32

1

Number of valid tanks

fuel_selector

uint32

8

Fuel selector. (0 = off, 1 = on)

xfer_pump

uint32

5

Specifies transfer from array value to tank specified by value

cross_feed

uint32

1

Cross feed valve (0 = false, 1 = on)

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

NameUnitsTypeWidthDescription

brake_left

double

1

Left brake pedal position pilot

brake_right

double

1

Right brake pedal position pilot

copilot_brake_left

double

1

Left brake pedal position copilot

copilot_brake_right

double

1

Right brake pedal position copilot

brake_parking

double

1

Brake parking position

gear_handle

uint32

1

Gear handle position (1 = gear handle down, 0 = gear handle up)

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

NameUnitsTypeWidthDescription

master_avionics

uint32

1

Master avionics switch

comm_1

Hz

double

1

Comm 1 frequency

comm_2

Hz

double

1

Comm 2 frequency

nav_1

Hz

double

1

Nav 1 frequency

nav_2

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

NameUnitsTypeWidthDescription

wind_speed_kt

knot

double

1

Wind speed

wind_dir_deg

deg

double

1

Wind direction

turbulence_norm

double

1

Turbulence norm

temp_c

deg C

double

1

Ambient temperature

press_inhg

inHg

double

1

Ambient pressure

hground

m

double

1

Ground elevation

magvar

deg

double

1

Local magnetic variation

icing

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'
Introduced in R2012a
Для просмотра документации необходимо авторизоваться на сайте