How to send new inputs on Pack net_fdm Packet for FlightGear?
Show older comments
First, I would like to thank MathWorks for providing Aerospace Blockset™ software and for providing ways to interface with FlightGear Simulator.
I am currently developing an aircraft that features several rotors (8 lifters + 1 pusher) and control surfaces (1 rudder, 2 elevators, 2 ailerons), so the various input options available in Pack net_fdm Packet for FlightGear block are insufficient to perform the animation of the aircraft model.
I wonder if there is a means in which we can specify our own inputs from the Pack net_fdm Packet for FlightGear.
In a thwarted attempt I searched the saerofgpacknetfdm code in order to add new inputs to the message to be sent to FlightGear Simulator, however it is already compiled in mexw64 format, which made it impossible to add any form of new inputs.
Could you indicate any possible means of modifying or creating our own pack net_fdm via MATLAB/Simulink?
Accepted Answer
More Answers (1)
Shivam Malviya
on 10 Jan 2023
Hi Gabriel,
I understand you wish to visualize the aircraft simulation in FlightGear using the "Pack net_fdm Packet for FlightGear" block, and you need more input ports in the "Pack net_fdm Packet for FlightGear" block to be able to do that.
The "Pack net_fdm Packet for FlightGear" block accepts all signals supported by the FlightGear net_fdm data packet. These signals are divided into six groups:
- Position/attitude inputs
- Velocity/acceleration inputs
- Control surface position inputs
- Engine/fuel inputs
- Landing gear inputs
- Environment inputs
To enable the inputs for these groups, select the associated block parameter. The block input ports change depending on the requested signal groups. Refer to the following image for a better understanding.

Execute the following commands to open the example model, which uses all the input ports of the "Pack net_fdm Packet for FlightGear" block.
asbhl20
open_system("asbhl20/Viewer and Feedback/FlightGear/Pack net_fdm Packet for FlightGear")
Refer to the following links for a better understanding
- https://in.mathworks.com/help/releases/R2021b/aeroblks/packnet_fdmpacketforflightgear.html
- https://in.mathworks.com/help/releases/R2021b/aeroblks/hl-20-project-with-optional-flightgear-interface.html
Hope this helps!
Regards,
Shivam Malviya
1 Comment
Gabriel Henrique Costa e Silva
on 12 Jan 2023
Edited: Gabriel Henrique Costa e Silva
on 12 Jan 2023
Categories
Find more on Aerospace Applications in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!