Board index FlightGear Support Interfacing

Native FDM Data Format  Topic is solved

Connecting two computers, using generic protocol, connecting with Matlab?

Native FDM Data Format

Postby Zago » Wed Oct 31, 2018 8:03 pm

Hello,

I want to use one of the built in FDMs to run Flightgear, but I also want to record the trajectory data to MATLAB as it runs. Since the Aerospace Blockset only has blocks for reading in net_ctrls packets I'm using the MATLAB function udp() to open a connection with the native-fdm protocol. I can successfully connect and stream data through the connection; however, my issue is interpreting the data. I've been searching the Wikis for a list that gives the order that properties are sent as well as their data type (float or double), so that I can convert the individual bytes into the data I need. Does a comprehensive list with this information exist and can someone point me to a link? Alternatively is there an existing MATLAB function for reading native-fdm packets that I don't know about? If neither exist, would the next best thing be to just write my own generic protocol XML file to send the data I need in an order and format that I know? Thanks!
Zago
 
Posts: 6
Joined: Wed Oct 31, 2018 7:54 pm

Re: Native FDM Data Format  

Postby curt » Wed Oct 31, 2018 8:19 pm

Hi Zago,

You can find the complete net-fdm struct declaration here:

https://sourceforge.net/p/flightgear/fl ... et_fdm.hxx

Best regards,

Curt.
Aerospace Engineering and Mechanics
University of Minnesota
curt
Administrator
 
Posts: 1168
Joined: Thu Jan 01, 1970 1:00 am
Location: Minneapolis, MN

Re: Native FDM Data Format

Postby hasan550 » Wed Jul 07, 2021 8:13 am

Good day!
I am flying a flightgear flight from simulink. I am modifying an XML file and using it in a non-standard format.
How can I find out a complete list of commands for accessing specific inputs in an XML file?
Let's say:
In FG_NET_FDM_VERSION = 25, the input is called:
float gear_pos [FG_MAX_WHEELS];

And in the XML file, I refer to it:
gear / gear [0] / position-norm
gear / gear [1] / position-norm
gear / gear [2] / position-norm

Can you please tell me how can I find out the complete list of commands for an XML file? I only know a part of them (
hasan550
 
Posts: 26
Joined: Wed Dec 23, 2020 7:51 am


Return to Interfacing

Who is online

Users browsing this forum: No registered users and 4 guests