opensubscriber
   Find in this group all groups
 
Unknown more information…

f : flightgear-devel@lists.sourceforge.net 17 November 2009 • 10:19AM -0500

[Flightgear-devel] multiple instances of given ai aircraft
by Alex Romosan

REPLY TO AUTHOR
 
REPLY TO GROUP






while flying out of jfk today i noticed once again multiple instances of
a given ai aircraft. looking at the properties tree i noticed that there
were multiple aircraft with the same call sign. after a bit of detective
work i noticed that the number of aircrafts corresponds to the number of
entries for that given aircraft in AI/Traffic. For example Delta0080 is
listed 7 times departing from jfk, once for each day of the week, and
that's how many aircraft were drawn on the screen.

after trying to understand the scheduler code i think i finally came up
with a patch:

--- src/Traffic/Schedule.cxx    3 Sep 2009 20:18:34 -0000       1.40
+++ src/Traffic/Schedule.cxx    17 Nov 2009 02:15:32 -0000
@@ -372,7 +372,7 @@
          SG_LOG (SG_GENERAL, SG_DEBUG, "Traffic manager: " << registration << " is scheduled for a flight from "
             << dep->getId() << " to " << arr->getId() << ". Current distance to user: "
              << distanceToUser);
-         if (distanceToUser < TRAFFICTOAIDISTTOSTART)
+         if (distanceToUser < TRAFFICTOAIDISTTOSTART && ((*i)->getDepartureTime()-now<1800))
            {
              string flightPlanName = dep->getId() + string("-") + arr->getId() +
                string(".xml");

which basically creates the AI model only if the departure time is 30
mins or less from now. i don't know if this is the correct solution, but
i believe the reason we see multiple instances of a given AI aircraft is
because we draw a new plane for each entry in the schedule. hope this
helps.

--alex--

--
| I believe the moment is at hand when, by a paranoiac and active |
|  advance of the mind, it will be possible (simultaneously with  |
|  automatism and other passive states) to systematize confusion  |
|  and thus to help to discredit completely the world of reality. |

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@list...
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.