Board index FlightGear Support Interfacing

Interfacing Control Inputs from FlightGear to JSBSim

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

Interfacing Control Inputs from FlightGear to JSBSim

Postby thunderbolt » Tue Oct 22, 2019 6:43 pm

Hello all,

for sending live Joystick inputs directly to JSBSim, I am trying to find the respective spot in the FlightGear Code.

The overall goal is to look up the specific codesnippets in FlightGear, to learn how control inputs can be copied directly to JSBSim. As for my current understanding, JSBSim does only allow xml-script-based inputs. However, I need to send Joystick inputs for elevator, rudder, aileron and throttle directly to JSBSim.

This must already be integral part of the FlightGear Code, as FlightGear incorporates the JSBSim FDM as well.

Can anyone confirm this or has similar or further experiences?

Any help highly appreciated,
best regards,

thunderbolt

Posts: 1
Joined: Tue Oct 22, 2019 7:29 pm
thunderbolt
 
Posts: 3
Joined: Tue Oct 22, 2019 6:29 pm

Re: Interfacing Control Inputs from FlightGear to JSBSim

Postby SurferTim » Tue Oct 22, 2019 9:18 pm

Flightgear has UDP output capability.
It appears JSBSim has UDP capability, I presume input.

I send Flightgear data in and out via UDP packets.

Edit: From the Menu, select "Debug" and "Browse internal Properties". I believe the values you want are in
controls/flight
and
controls/engine/engine

If this hasn't frightened you off yet, I can help with the Flightgear side of the UDP output.
Are both these apps running in the same computer? Or at least same localnet?
Fly low, fly slow, land on a dime. Twin Otter DHC6-300+.
User avatar
SurferTim
 
Posts: 765
Joined: Sun Dec 09, 2018 5:49 pm
Location: Miramar Beach, FL
Callsign: Pirate
Version: 2019.2.0
OS: Ubuntu 18.04

Re: Interfacing Control Inputs from FlightGear to JSBSim

Postby thunderbolt » Wed Oct 23, 2019 2:37 pm

Hi,

JSBSim input capability is what I am looking for in this example. Does it work for JSBSim in the same way as UDP Streams are specified in FlightGear?

--generic=file,out,1,/tmp/data.xml,myprotol

<?xml version="1.0"?>
<PropertyList>
<generic>
<input>
<line_separator></line_separator>
<var_separator></var_separator>

<chunk>
<!-- First input chunk definition e. g. flight controls elevator, rudder, ... -->
</chunk>

<chunk>
<!-- Next input chunk definition etc... -->
</chunk>
</input>

</generic>
</PropertyList>
thunderbolt
 
Posts: 3
Joined: Tue Oct 22, 2019 6:29 pm

Re: Interfacing Control Inputs from FlightGear to JSBSim

Postby SurferTim » Wed Oct 23, 2019 3:14 pm

It does not appear they are similar.
Here is a manual for JSBSim. The relevant section starts at page 58 for input and page 59 for output.
http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf

That is all I figured out. I don't know anything else about JSBSim.
Fly low, fly slow, land on a dime. Twin Otter DHC6-300+.
User avatar
SurferTim
 
Posts: 765
Joined: Sun Dec 09, 2018 5:49 pm
Location: Miramar Beach, FL
Callsign: Pirate
Version: 2019.2.0
OS: Ubuntu 18.04


Return to Interfacing

Who is online

Users browsing this forum: No registered users and 1 guest