Durk Talsma wrote:
Hi Folks,
Since I haven't seen any response to my question I guess it's either so hard that nobody knows the answer, or it just slipped by while everybody was fighting each other last week. :-)
Anyways, I'm still interested in potential solutions.
Cheers, Durk
On Saturday 22 January 2005 18:01, Durk Talsma wrote:
Hi,
I would like to experiment a little bit with adding current terrain elevation detection for AI models. Is there a function to do this, i.e.
double fgGetElevation(double lat, double lon);
I found that the current user location is read from /environment/ground-elevation-m but that's the elevation at the user location and not at the position of the AI plane.
The reason I'm looking into this is that even at EHAM, which is quite flat
there are already some very visible artifacts due to variations in ground
elevation. So we'd need to address this sooner or later.
Hi Durk,
The terrain elevation system could stand to be looked at a bit. I think there is still a lurking bug where the wrong elevation can be returned under some circumstances immediately after a tile boundary is crossed. There are some optimizations in the current system that assume you are reading ground elevation from the same tile or same position stream as before.
Be aware that looking up terrain elevation from a TIN is an expensive operation so we don't want to do very many of these lookups per frame. Perhaps your AI system could do one lookup per frame and rotate through the model list so the entire list is updated ever "n" frames ... or prioritize models that are on/near the ground over models that are high above the ground where it really doesn't matter so much.
Does that answer your question?
Curt.
-- Curtis Olson http://www.flightgear.org/~curt HumanFIRST Program http://www.humanfirst.umn.edu/ FlightGear Project http://www.flightgear.org Unique text: 2f585eeea02e2c79d7b1d8c4963bae2d
_______________________________________________ Flightgear-devel mailing list [email protected] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
