Hi,

On Monday, January 21, 2013 12:01:54 Yingcai Bi wrote:
> I am a starter here.I'm doing a university project. I need to control two
> aircrafts for close formation with two Simulink at the same time.
> I do as vbnhu's post in
> viewtopic.php?f=4&t=3165&p=174710#p174710<http://www.flightgear.org/forums/v
> iewtopic.php?f=4&t=3165&p=174710#p174710>, and met the same jitter problem.
> One plane flies well and another jitters.
> 
> fgfs --aircraft=c172p --fdm=network,localhost,5501,5502,5503
> --multiplay=in,25,localhost,5701 --multiplay=out,25,localhost,5702
> fgfs --aircraft=c172p --fdm=network,localhost,5507,5508,5509
> --multiplay=in,25,localhost,5702 --multiplay=out,25,localhost,5701
> 
> 
> Then, I tried the LAN fgms, There are two computers for two simulink
> controlled fgfs, one computer as the fgms. There is still the jitter
> problem.
> Now, I find the implementation of network control with simulink in
> viewtopic.php?f=36&t=16200<http://www.flightgear.org/forums/viewtopic.php?f=
> 36&t=16200> .
> 
> I wonder if I must implement the multiplayer protocol in simulink and if
> the jitter problem can be avoided. Any suggestion from anybody? Thank
> you,all.

If you relay one aircraft by the net fdm and then the multiplayer you will add 
some latency just by that store and forward. This is then made worse and 
jittery by the main loop doing this store and forward controled by the 
independent frame rates of those both simulations and not by any simulation 
time slices. The input of the net fdm is also not time slice synchronized - at 
least if I remember right.
Then on top of that the incomming multiplayer code tries to even out jitter in 
the incomming multiplayer packets which accounts for some extra latency that 
will probably hurt your application too.

I am currently working on something that will probably arrive too late for you 
if you need that about now. The hla components will enable correct time 
slicing over more participants and components.

May be for your particular case: If your simulink models live in the same 
matlab, it could help if the data for both aircraft is sent by the same atomic 
network packet. But that also involves hackery in matlab as well as in 
flightgear.

Greetings

Mathias

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to