Hi Vivian, testing your new groundvehicle class for AI scenarios in the context of a "train" of tanks and another of jeeps, I stumbled into their wandering in the air. The solution is two-fold : one, specify a starting altitude through the <altitude> tag in the groundvehicle's <entry> in the ai scenario, even though we're using a flightplan (maybe I could have just re-ordered things around to we don't do GetPitch et al. before popping the first waypoint, but this was simple ;)) This ensures we don't have zero as elevation in the initial calculations after applying my patch.
What my patch does is to stop using an arbitrary 10000m lookup for the geode checks, but rather use the current elevation in meter, to avoid finding anything else, including buildings, or other models, which was gradually building up to an error amounting to the whole "train" floating above ground. Been testing it in the very hilly terrain in between La Honda and the Stanford Accelerator center, at the upper edge of Palo Alto. They conform to the terrain way better after the patch, and setting an initial altitude. I'll leave it up to you to see if the patch has any applicability in your further work with the AIGroundVehicle class, but I wanted to point out the hovering higher and higher as time goes by behaviour and provide a solution :) Cheers, Nic -- Be Kind. Remember, everyone is fighting a hard battle.
AIGroundVehicle.cxx.patch
Description: Binary data
------------------------------------------------------------------------------ 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel