Re: [Flightgear-devel] Crashes on reset/re-position

2010-07-27 Thread Durk Talsma
Hi,

On Wednesday, July 21, 2010 09:12:43 pm Dave wrote:
> Yikes - is that ancient code still used?  I thought it had been ripped
> out long ago - I would certainly agree with disabling it by default.  I
> developed that code on Linux (gcc 3.x I think) and I've since discovered
> with the kln89 code that that compiler would let me write code that
> wouldn't segfault for me, but which would segfault if compiled and run
> via. MSVC.
> 

I just push a batch of local commits to gitorious flightgear, which changes 
the default compilation behaviour on automake systems to exclude the 
compilation of the ATCDCL module. I tested FlightGear for a couple of hours 
locally, and all seems to run fine. But, please let me know if anything is 
broken. If you do run into trouble, please try to recompile using:

./configure --enable-atcdcl

and this should get the original behavior back.

Also note, that the current change comes with a slight regression in 
functionality: Most notably, the AI/ATC airport frequency look up currently 
doesn't work, and ATIS is also temporarily gone. In addition, the GUI settings 
for AI traffic are currently not functional.

As a general plan of approach, I'll try to link the AI traffic gui settings to 
the AIModels system, and then bring back the ATIS and Frequency look up (if 
still desired).

FWIW, I originally wanted to wait until all the replacement code was done, but 
currently the confusion that arises around AI Traffic, AIModels, and traffic 
manager code is growing too big to my taste. In addition, Dave's own 
suggestion to disable this old system was the final incentive that made me 
decide to push this  change onto gitorious.

Cheers,
Durk

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] AI and Traffic Manager

2010-07-27 Thread Durk Talsma
Hi John,


On Monday, July 26, 2010 04:47:41 pm John Wojnaroski wrote:
> Thanks Durk,
> 
> I was looking at the wiki page and that was helpful.
> 
> Still trying to decipher what launches the traffic.  Is it a case where
> the traffic manager is instantiated and automagically searches and
> creates AI objects?  That being the case, then the demo xml files in the
> AI directory while still functional are NOT the way to create a
> scenario.  It wasn't clear on the wiki page how that all ties together;
> i.e. will the traffic manager create and position AI aircraft on the
> ramp if KSFO is specified as the departure airport.  Is there some time
> span prior to departure that the specified aircraft object will be
> created, start and taxi to meet the departure time.

In essence, there are three ways, in which you can drive AI models; 1) through 
the multiplayer system; 2) by means of a script, and 3) trhough the traffic 
manager. When you use the script (i.e. the demo xml) files, you have extremely 
tight control over the AI model, but then the AIModel in question won't really 
respond intelligently to the environment (in the sense of interacting with 
other traffic).

The traffic manager is, on the other hand, a more global level of description. 
You just specify which aircraft are available, and which flights need to be 
done, and the system itself tries to resolve all the routing, ATC, etc etc.

The way it works, is globally this: the traffic manager reeds all the aircraft 
and flight information from the traffic xml datafiles. Then , once 
FlightGear's main loop starts running, it iterates over over each aircraft 
entry (at a rate of one per frame), and it seeks to find work for it. For, 
this, it searches through the list of available flights, and assigns the first 
one that has the same  key as the aircraft itself. Flight 
are rankordered chronologically, so the first available flight is closest to 
the current time. If a flight is entirely in the past, it's departure and 
arrival time are  updated the the repeat time factor, until it is in the 
future again. During flight assignment, a whole chunk of flights are assigned 
to the aircraft, such that the next flight needs to depart from the same 
airport as where the previous flight arrived. 

If the current flight for a particular aircraft is partially in the past 
(departure time in past, arrival time in the future), an AI model is created 
in air, along with a flightplan that will allow it to finish its flight. If 
both the departure and arrival time are still in the future, the AIModel will 
be placed at the airport,.


> 
> In the real world, arriving aircraft taxi to the gate, passengers
> deplane, and the bird is serviced and scheduled for the next flight.
> While that would be an awesome feature, I gather that is not how the AI
> world works. Intriguing idea though, don't you think?  Create a list of
> available equipment by carrier at a particular airport that is depleted
> as aircraft are scheduled/assigned and replenished as aircraft arrive
> with some delta time to represent service time.

That would be nice, but I'm just not ready to tackle that. ...

> 
> Wow, that's a lot of work and data you created for the AI world!
> 

Thanks for the comments by the way, I hope to add a more conceptual 
introduction, as written above to the wiki page. Please let me know if you 
have any further questions.

Cheers,
Durk

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel