Board index FlightGear Support Interfacing

Flightgear slows down when give input data using tcp socket.

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

Flightgear slows down when give input data using tcp socket.

Postby Kalai » Sun Dec 10, 2017 3:58 pm

I am sending the hardware inputs via arduino to PC using serial communication. Also I have written python script which read those serial data sent by arduino. Those data are then sent to flightgear using TCP socket connection. I have tested this with landing gear up/down input and it works. :D But the problem I face is once the data is sent to flightgear via socket, flightgear slows down. For example while flight is rolling on runway it moves like frame by frame. Also I hear a switch throw sound continuously once flightgear start receive data from socket. Can anybody help why it hangs and slow movement of frames.
Kalai
 
Posts: 6
Joined: Mon Nov 27, 2017 7:29 pm

Re: Flightgear slows down when give input data using tcp soc

Postby Hooray » Sun Dec 10, 2017 6:35 pm

some more info would be good actually. You could start by sharing your protocol file. Even though it would be better to have a self-contained test case to see if the problem can be reproduced, e.g. using a Python script to replace the arduino part (I understand most people around here won't have an arduino available?)

Is the protocol constantly updating the corresponding properties, or doing that selectively ?
Have you confirmed that the problem can be reproduced by using a diffferent I/O mechanism (e.g. the telnet/props protocol) ?

The point being that this could be a simple thing like different subsystems writing to the same properties ("fighting" for it), or a number of other things.
But ultimately we need to be able to reproduce the problem - and if you cannot come up with a reduced test case, it would still be good to post a few screenshots, and ideally a youtube video illustrating the problem, showing the relevant parts of your I/O setup.

Otherwise it will be next to impossible to tell what is going on, because we'd be only guessing - even if it should be a really simple thing unfortunately.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Flightgear slows down when give input data using tcp soc

Postby wkitty42 » Mon Dec 11, 2017 2:05 pm

my question is which aircraft are you working with... not all craft are designed and built the same way... on one you might be able to toggle property X to get the gear to raise or lower but on another craft, it may be a different property... the thing with the switch click sounds like the craft has a listener for the property toggle and that listener plays a sound... when you toggle the property, i you're also triggering that listener but your not doing something else that untriggers the listener... so what craft is it that you are working with??
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04


Return to Interfacing

Who is online

Users browsing this forum: No registered users and 2 guests