net_ctrl packet from FlightGear
Animation/Flight Simulator Interfaces
The Receive net_ctrl Packet from FlightGear
block receives a network control and environment data packet,
from the simulation of a Simulink® model in the FlightGear simulator,
or from a FlightGear session. This data packet is compatible with
a particular version of FlightGear flight simulator. All the signals
supported by the FlightGear
net_ctrl data packet
are supported by this block. The signals are arranged into multiple
groups. Any group can be turned on or off. Zeros are inserted for
packet values that are part of inactive signal groups.
In Rapid Accelerator mode, if you run a model that contains
this block , the block produces zeroes (
does not produce deployable code. In Accelerator mode, the block works
For details on signals and signal groups, see Inputs and Outputs.
To determine the source IP address, you can use one of several techniques, such as:
Use 127.0.0.1 for the local computer (localhost).
Ping another computer from a Windows®
cmd.exe (or Linux® shell)
C:\> ping andyspc Pinging andyspc [220.127.116.11] with 32 bytes of data: Reply from 18.104.22.168: bytes=32 time=30ms TTL=253 Reply from 22.214.171.124: bytes=32 time=20ms TTL=253 Reply from 126.96.36.199: bytes=32 time=20ms TTL=253 Reply from 188.8.131.52: bytes=32 time=20ms TTL=253 Ping statistics for 184.108.40.206: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 20ms, Maximum = 30ms, Average = 22ms
On a Windows machine, type
use the returned IP address:
H:\>ipconfig Windows IP Configuration Ethernet adapter Local Area Connection: Connection-specific DNS Suffix . : IP Address. . . . . . . . . . . . : 192.168.42.178 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.42.254
Select your FlightGear software version:
Note: If you are using a FlightGear version older than 2.0, 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.
Enter a valid IP address as a dot-decimal string. This IP address must be the address of the PC from which FlightGear is run.
10.10.10.3. You can also use
a MATLAB expression that returns a valid IP address as a string. If
FlightGear is run on the local PC, leave the default value of
UDP port that the block accepts data from. The sender sends
data to the port specified in this parameter. This value must match
the Origin port parameter of the Generate Run Script block. It must be a
unique port number that no other application on the PC uses. The site,
lists commonly known UDP port numbers. To identify UDP port numbers
already in use on your PC, type:
netstat -a -p UDP
Specify the sample time (-1 for inherited).
Enable a received flag output port. Use this check box to determine if a FlightGear network packet has been received.
Contains the controls information from FlightGear in uint8 format.
|Windows and Linux|
744-by-1 vector (for FlightGear v3.4, v3.2, v3.0, v2.12, v2.10, v2.8, v2.6, v2.4, v2.0)
744-by-1 vector (for FlightGear v2.6*, v2.8*, v2.10*, v2.12*, v3.0*, v3.2*, v3.4*)
732-by-1 vector (for FlightGear v2.0, v2.4)
|Windows and Linux|
Scalar 0 or:
744 (for FlightGear v3.4, v3.2, v3.0, v2.12, v2.10, v2.8, v2.6, v2.4, v2.0)
Scalar 0 or:
744 (for FlightGear v2.6*, v2.8*, v2.10*, v2.12*, v3.0*, v3.2*, v3.4*)
732 (for FlightGear v2.0, v2.4)
* On a Macintosh system with FlightGear 2.6, 2.8, 2.10, 2.12, 3.0, 3.2, 3.4 you might see unexpected results (for example, very large or very small data values). For more information, see Macintosh Platform and FlightGear Version 2.6 or Later.