Board index FlightGear Support Interfacing

setting properties- UDP or Telnet

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

setting properties- UDP or Telnet

Postby bob755 » Fri Jan 05, 2018 6:15 pm

Hello,
I want to set a number of properties such as ailerons, rudder throttle etc from an exterlan Python script which receives inputs from an Arduino controller acting as a Joystick. I've been testing both the generic protocol with UDP and Telnet.

UDP is supposed to be more efficient than Telnet but is it possible to set certain properties using the generic protocol or do I have to send all the properties each time when only one changes?
Is this going to create an overhead? With Telnet one can set a single property when needed.

I'm wondering if there would be a performance issue when continuously sending 10 or so properties.
Which is the best approach?
bob755
 
Posts: 139
Joined: Mon Oct 30, 2017 2:21 pm

Re: setting properties- UDP or Telnet

Postby daweed » Sat Jan 06, 2018 7:00 pm

Hello,

With generic protocol, I didn't find a way to send only part of properties describe in the xml protocol file.
But i am sending to FG only when almost one property have change.
I am building the "string" with value of each properties to be sent, compute a MD5 hash of the string and compare with the old one from previous loop process.
if the hash is different, data are sent
Windows 10 / Linux Mint 20
AMD Ryzen 7 3700X |32 Go RAM GeForce RTX 3070 Ti 8 Go
FG Interface
Lyon Saint Exupery Scenery

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


Return to Interfacing

Who is online

Users browsing this forum: No registered users and 4 guests