Durk,

On Monday, August 01, 2011 11:18:02 Durk Talsma wrote:
> On 30 Jul 2011, at 21:31, Stuart Buchanan wrote:
> > So, I quickly wrote an alternative to the current Nasal  system
> > geodinfo(), using the groundcache instead of the  current scenery
> > method.
> 
> This sounds very interesting: As far as I can tell, the AI system still
> makes use of scenery.get_elevation_m(), as shown in AIBase.cxx (line 516):
> 
> 516 bool FGAIBase::getGroundElevationM(const SGGeod& pos, double& elev,
> 517                                    const SGMaterial** material) const {
> 518     return globals->get_scenery()->get_elevation_m(pos, elev, material,
> 519                                                    model.get());
> 520 }
> 
> I always thought that get_elevation_m would be using the ground cache
> itself, but apparently that is not the case? If so, it seems to me that
> changing the AI system to actually use the ground cache could yield
> another performance increase.
> 
> If you have any pointers on how this could be changed in an efficient way,
> I'd be happy to hear about it. :-)

Ok, the lengthy explanation hof the ground cache works in the previous mail 
might help to understand what you can do.

I think that using the bv-trees and the whole scenegraph would make sense for 
the AI module. That is basically the same than what I would suggest as a 
simple solution for the weather module.

Alternatively I can imagine to have each AI model have its own groundcache. In 
this case somehow bigger than the very short time groundcache of the aircraft. 
May be big enough to cover the movement of one AI model for some seconds. Then 
during these few seconds - or as long as the aircraft is just sufficiently 
inside the cache - make queries into the local cache.

Also, I hope to get that improoved with a seperate AI component in a HLA 
federation.

Greetings

Mathias

------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to