On Tuesday 07 February 2006 23:33, Christian Mayer wrote: > Durk Talsma schrieb: > > Notice that the routing algorithm is still far from perfect, but I > > thought it would be fun to share some of the initial experiments with you > > guys... > > What algorthim are you using? > > CU, > Christian > The routing algorithm is based on the ground network tracing algorithm. See src/Airports/groundnet.cxx; the findShortestRoute() and trace() functions.
The ground path here is stored as a series of nodes, and segments connecting each node. The trace() function is a recursive depth-first binary three search algorithm, that scans all the outbound connections from each node. The search is in principle exhaustive, but the following criteria stop the algorithm from descending further in into the tree: 1) Current node has already been visited (i.e. we're running round in circles). 2) the current node is the required end point. 3) the total length of the search path is longer than that of an already found route. The airnet routing algorithm is based on this, but many airroutes don't have direct airway to airway connections between them, so I've adapted the code split up the total route into sections and then I try to fit an airway route through each section. The last bit clearly still needs some cleaning up. Cheers, Durk ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel