Main Content

Pack net_fdm Packet for FlightGear

Generate net_fdm packet for FlightGear

  • Pack net_fdm Packet for FlightGear block

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.

Ports

Input

expand all

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

expand all

Packet generated for FlightGear, specified as an array.

Data Types: single | double | uint32

Parameters

expand all

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

NameUnitsTypeWidthDescription

longitude

rad

double

1

Geodetic longitude

latitude

rad

double

1

Geodetic latitude

altitude

m

double

1

Altitude above sea level

theta

rad

single

1

Pitch

phi

rad

single

1

Roll

psi

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

NameUnitsTypeWidthDescription

alpha

rad

double

1

Angle of attack

beta

rad

single

1

Sideslip angle

dphi/dt

rad/sec

single

1

Roll rate

dtheta/dt

rad/sec

single

1

Pitch rate

dpsi/dt

rad/sec

single

1

Yaw rate

Vcas

knot

single

1

Calibrated airspeed

climb_rate

feet/sec

single

1

Rate of climb

v_north

feet/sec

single

1

North velocity in body frame

v_east

feet/sec

single

1

East velocity in body frame

v_down

feet/sec

single

1

Down velocity

v_wind_body_north

feet/sec

single

1

North velocity in body frame relative to local airmass

v_wind_body_east

feet/sec

single

1

East velocity in body frame relative to local airmass

v_wind_body_down

feet/sec

single

1

Down velocity in body frame relative to airmass

Axpilot

feet/sec2

single

1

X acceleration in body frame

Aypilot

feet/sec2

single

1

Y acceleration in body frame

Azpilot

feet/sec2

single

1

Z acceleration in body frame

stall_warning

single

1

Amount of stall [0-1]

slip_deg

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

NameUnitsTypeWidthDescription

elevator

1 (dimensionless)

single

1

Normalized elevator position

elevator_trim_tab

1 (dimensionless)

single

1

Normalized elevator trim tab position

left_flap

1 (dimensionless)

single

1

Normalized left flap position

right_flap

1 (dimensionless)

single

1

Normalized right flap position

left_aileron

1 (dimensionless)

single

1

Normalized left aileron position

right_aileron

1 (dimensionless)

single

1

Normalized right aileron position

rudder

1 (dimensionless)

single

1

Normalized rudder position

nose_wheel

1 (dimensionless)

single

1

Normalized nose wheel position

speedbrake

1 (dimensionless)

single

1

Normalized speedbrake position

spoilers

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

NameUnitsTypeWidthDescription

num_engines

uint32

1

Number of engines

eng_state

uint32

4

Engine state (off, cranking, running)

rpm

rev/min

single

4

Engine RPM

fuel_flow

gal/hour

single

4

Fuel flow

fuel_px

psi

single

4

Fuel pressure

egt

deg F

single

4

Exhaust gas temperature

cht

deg F

single

4

Cylinder head temperature

mp_osi

psi

single

4

Manifold pressure

tit

deg F

single

4

Turbine inlet temperature

oil_temp

deg F

single

4

Oil temperature

oil_px

psi

single

4

Oil pressure

num_tanks

uint32

1

Number of fuel tanks

fuel_quantity

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

NameUnitsTypeWidthDescription

num_wheels

uint32

1

Number of wheels

wow

uint32

3

Weight on wheels switch

gear_pos

single

3

Landing gear normalized position

gear_steer

single

3

Landing gear normalized steering

gear_compression

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

NameUnitsTypeWidthDescription

agl

m

single

1

Altitude above ground level

cur_time

sec

uint32

1

Current UNIX time

warp

sec

int32

1

Offset in seconds to UNIX time

visibility

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