I launch a flightgear. But the default there is a aircraft. It can be appointed by the parameter "--aircraft",such as "--aircraft=f16".But I want to place two aircrafts in the same flightgear,such as " A aircraft is f16 and B aircraft is f18". what should I do? By the way, If I want to control the two aircrafts by network data, it is feasible?

It's not possible with a single computer with only one FG running. However, you said yourself that you want to control the aircraft via network, so there must be another computer, right?If you use only 2 computers, you don't need a server for MP. The computers can talk to each other directly.

I launch a flightgear. But the default there is a aircraft. how can I control two aircraft?

Flightgear is supposed to be a realistic simulation. Since real pilots also contol one aircraft at a time and neither control two aircraft from the same cockpit nor somehow bilocate to fly two aircraft at once (airlines would be so happy to cut personnel costs in half...), this also doesn't work in Flightgear.

Maybe a better way to proceed would be to actually describe what you want this functionality for? There are AI scenarios for wingmen, there is AI traffic, there is multiplayer,... why don't these features work for you?

sgofferj wrote in Tue Feb 21, 2012 5:38 am:It's not possible with a single computer with only one FG running. However, you said yourself that you want to control the aircraft via network, so there must be another computer, right?If you use only 2 computers, you don't need a server for MP. The computers can talk to each other directly.

thanks. In your opinion, the FG can not distinguish two aircrafs? According to your advice, I want to send some data to "f16",but other data to "f18", how to do this?

OK, my mind is as follows: I ever use vega(vega prime) to simulation. In Vega, you can assign any aircraft in your program. And, the Vega can distinguish them by an unique ID. In running, you can send data to every aircraft by network.I wonder if FG does this.

Simple answer: No, FlightGear does not work this way.Amplified answer: Currently, there is exactly one FDM controlling exactly one aircraft model in one session of FlightGear.

We have a very clever guy working on integrating HLA into FlightGear. Once that is implemented, the idea is already there to be able to virtually walk along a number of parked aircraft on the apron, click on any of them, enter the cockpit and go for a flight. But that's definitely still a long way to go.

It's not all that unrealistic to ask for this, there are many academic projects that could profit from such a capability.This has also been frequently discussed on the devel list, just see all the pointers and links here: http://wiki.flightgear.org/An_Integrate ... fic_SystemThe majority of issues pointed out there, links back to long term contributors, if not even core developers.

It would be possible to create a scripted workaround using Nasal, so that you could run several scripted FDMs and switch between different aircraft (i.e. position, orientation, velocities properties), then copying/aliasing the properties for a single cockpit panel.

in 2003, Andy Ross (YaSim/Nasal developer) wrote:FlightGear is an old code base, and lots of the old assumptions (likea single aircraft) need to be teased out of the code before progresscan be made on new features. This kind of work isn't glamorous, andoften requires more effort than the new development does. But it'snot brain surgery either. The problem with some great new features isthat they show up with code that is "ready" to integrate, but withoutthe integration work done. So they languish in the CVS tree untileveryone forgets about them. I can recall at least one occasion wherea unused module got replaced by a simpler (and arguably lessfunctional) one precicely because the original never got integratedvery well and the replacement actually worked.

completely off topic:

Thorsten wrote:Flightgear is supposed to be a realistic simulation. Since real pilots also contol one aircraft at a time and neither control two aircraft from the same cockpit nor somehow bilocate to fly two aircraft at once (airlines would be so happy to cut personnel costs in half...), this also doesn't work in Flightgear.

There was once a NASA project, dedicated to enabling airliners to be remotely controlled.

The idea was that pilots could let the autoflight system fly most of the time (until some "event" (i.e. TCAS RA) occurs that requires real pilot interaction), so that under normal circumstances only departures and approaches would be flown by pilots via remote control (i.e. data uplink/downlink). In a way, you'd be multiplexing pilots across several aircraft.

The same method is already used to control UAVs (i.e. military drones) which do fly in the same class C airspace as airliners do.

It's not all that unrealistic to ask for this, there are many academic projects that could profit from such a capability.

Okay, maybe you guys see something I don't, but I simply don't get it.

I'm sitting in front of my laptop which has one screen on which I see one cockpit. I have one main input device (my mouse) and my keyboard.

Now, I could just possibly imagine plugging in a second screen and getting to see a second cockpit. I can just barely imagine plugging in a second mouse to control things in this second cockpit. But what is beyond my comprehension is why I would want to do that - that'd be terribly confusing. And what is way, way beyond my comprehension is why I would want to do it without using a network and the multiplayer protocol.

Actually, I do agree with your perspective - but, for example, there are many scenarios and situations where support for multiple FDM instances would be really useful.

Just think about the AI traffic system which has meanwhile come up with its own "pseudo FDM" in C++ space, i.e. using a performance database.

At the moment, AI traffic will be basically agnostic to anything weather related. Think about turbulences etc - But, it would be possible to actually instantiate a separate FDM process/thread and use it to control AI traffic realistically, so that local weather effects would have an impact on AI traffic, too.

The wiki has plenty of pointers to discussions where people actually came up with good ideas on how to implement this.

At the moment, AI traffic will be basically agnostic to anything weather related. Think about turbulences etc - But, it would be possible to actually instantiate a separate FDM process/thread and use it to control AI traffic realistically, so that local weather effects would have an impact on AI traffic, too.

Well, think it through - the difference is the same as between local light and the lightfields.

Local Weather provides weather at your location. Implicitly, it knows weather at any other location, i.e. if you would go to any other location, it could tell you what the weather is - but you're limited to one location per frame. But what you need for AI traffic is explicit information, the weather field, i.e. the ability to provide weather for any number of locations in the scene - and that's a rather different beast. Not conceptually, but as far as performance goes.

Right now I know there's at most one single thermal active at any given time. It'd be much more complex to allow for an arbitrary number, or to compute the real wind for any wind turbine in the scene, or the real turbulence for any AI aircraft in the scene. So you'd have to in fact spend far more brainpower and performance than 'just' creating another instance of an FDM to make it realistic.

Btw, the question wasn't 'How do I get a second FDM instance for AI planes?', it was 'How do I control two aircraft?' and for me these are distinct questions.

Thorsten wrote in Mon Feb 27, 2012 11:02 am:Btw, the question wasn't 'How do I get a second FDM instance for AI planes?', it was 'How do I control two aircraft?' and for me these are distinct questions.

Yes, but supporting more than a single FDM instance would obviously be required, which is probably why Torsten replied in a similar fashion:

Torsten wrote:Simple answer: No, FlightGear does not work this way.Amplified answer: Currently, there is exactly one FDM controlling exactly one aircraft model in one session of FlightGear.

Supposing that we think in AI model as a 3D body with a set of propreties, and then, once we already know how to send informations via UDP port from "Matlab-Simulink" to our Flightgear instance (with the purpose to create our own virtual "FDM" running outside flightgear), why not send additional information via this same port or another to modify the properties of our AI model such as latitude, aoa, engine power and so on?we have two external FDM acting as source of information for controlling two models, one is a properly said aircraft and other is AI model that could be a missile or an aircraft.