Clear Filters
Clear Filters

How to send new inputs on Pack net_fdm Packet for FlightGear?

2 views (last 30 days)
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

Gabriel Henrique Costa e Silva
Edited: Gabriel Henrique Costa e Silva on 12 Jan 2023
Through the article published by Marco Sagliano whose title is "Open-Source Visualization of Reusable Rockets Motion: Approaching Simulink - FlightGear Co-simulation" is presented how to send, via Simulink to FlightGear, 20 states (signals). These signals can be specified according to the users need creating a xml configuration file (generic protocol). In the article, which is public available, the necessary codes for implementation and explanations are presented.
For the Mathworks team: it might be interesting to add in simulink's Aerospace Blockset library a block that implements what was indicated in the article, at least for me it was very interesting to have a component that allows the freedom for sending signals that can be structured "in the FlightGear side" via generic protocol.

More Answers (1)

Shivam Malviya
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
Hope this helps!
Regards,
Shivam Malviya
  1 Comment
Gabriel Henrique Costa e Silva
Edited: Gabriel Henrique Costa e Silva on 12 Jan 2023
Hi Shivam,
I would like to thank you for your attention and detailed response.
However, even when enabling the other signals by the "Pack net_fdm Packet for FlightGear" the block doesn't present the specific signals for my application (I need several inputs for signals for the multiple rotors due to the unusual configuration of the aircraft I am studying).
I'll detail in a new answer how I was able to get what I needed.

Sign in to comment.

Categories

Find more on Aerospace Applications in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!