Board index FlightGear Support Interfacing

Comunication Protocol

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

Comunication Protocol

Postby daweed » Thu Oct 24, 2019 12:24 pm

Hello all,

Actually I use the 'Generic Protocol' to run my interface with FG. Where should I start if I needed a new way to work?

Today when I need to modify the value of a property, i am forced to return all the values of the various properties managed by the interface.

If tomorrow I wish for example to return a stream that would allow me to send for example only a few things
Code: Select all
like:props
value and that the number of properties at each iteration is variable.
Example

Code: Select all
Loop n:
heading:180: spead:250: flaps:0

Loop n + 1:
gear:down


1°) Would it be a good idea to do that?

2) would it require a recompilation of FG to integrate this new protocol?

I read the documentation on the I.O, the language C, C++ is not currently in my knowledge, I do not really know where to look.

Thanks in advance.

PS: If this is not a good idea, where do I go to ?
Stay on the generic protocol and all return to each round of the loop ?
Another procotole ?

PS2: I do not have a problem with the 'Generic Protocol', all is working well, I just want to lighten the amount of data transmitted to FG, especially when the data is not necessary because it has not been changed.

PS3 : sorry to have edited the message so many times, I had invalid characters that I could not find
Linux Mint 18.3
AMD FX 4300 Quad-Core Black Edition|20 Go RAMGeForce GTX 750 Ti
FG Interface
Lyon Saint Exupery Scenery

ATC on LFLL on Friday 19:00 UTC => 22:00 UTC
daweed
 
Posts: 338
Joined: Thu Dec 11, 2014 10:45 am
Location: LFKP LFLL
Callsign: daweed
OS: Linux Mint 19.2

Re: Comunication Protocol

Postby SurferTim » Thu Oct 24, 2019 1:17 pm

I would develop two different protocol files. One for the fast stuff, and another for the slow stuff.
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: Comunication Protocol

Postby xcvb » Thu Oct 24, 2019 7:54 pm

There is the Telnet interface that you can use to change single values (http://wiki.flightgear.org/Telnet_usage).

For my application I used the native FDM protocol. This protocol isn't flexible at all, but it gives you all the FDM values (e.g. heading and speed) at a high sampling rate. Maybe this can reduce the load on the generic protocol.
xcvb
 
Posts: 108
Joined: Sat Mar 14, 2015 2:08 pm
Version: GIT
OS: Linux

Re: Comunication Protocol

Postby daweed » Fri Oct 25, 2019 12:46 pm

Hello everyone, Thank you for your answer, I started with telnet, I have been working on the FG interface for a few years now [the video POC 1 is dated 14/02 :)] and I quickly saw that telnet does not would not fit my project. In fact, using the TCP connection with the generic protocol, I just ask myself the question [and the forum :)], because at each iteration of the loop, I send all the properties managed by the interface, if that will save resources not to send everything, but only what has changed. In this way, I'm trying to figure out how I could configure my own way of processing data with FG, it will probably require writing a lib [which is able to process the new protocol] but I do not know where to start.

As I said, everything works perfectly with the generic protocol

See for example https://www.youtube.com/watch?v=8MODOU447EE

Cordially.
Linux Mint 18.3
AMD FX 4300 Quad-Core Black Edition|20 Go RAMGeForce GTX 750 Ti
FG Interface
Lyon Saint Exupery Scenery

ATC on LFLL on Friday 19:00 UTC => 22:00 UTC
daweed
 
Posts: 338
Joined: Thu Dec 11, 2014 10:45 am
Location: LFKP LFLL
Callsign: daweed
OS: Linux Mint 19.2

Re: Comunication Protocol

Postby SurferTim » Fri Oct 25, 2019 1:04 pm

If everything is on the same localnet, I prefer UDP. Very fast.

Break your transmissions into fast (20 per sec) and slow (1 per sec). Use different ports for each.

Just my opinion.
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