On 24/01/2005 at 21:17 Durk Talsma wrote:
>What I am really looking for is a hint where I can find the code in

Hi Durk,

I obtain ground elevation for taxiing AI traffic in AILocalTraffic.cxx,
lines 1569 - 1602 (or thereabouts).  Note that this is not a cheap
operation, and you should only do it for traffic in a location which
already has a tile loaded - otherwise it triggers tile loading, resets the
scenery cache to the wrong location, and probably has other undesirable
side effects as well.

I'm still not entirely sure how all this works, but when I dug into it once
it seems that the way I do it can mess with the tile cache unless I'm not
determining elevation for the tile currently at the center of the cache (or
something like that).  FG could really do with a clear, unambiguous,
documentated elevation API of the GetGroundElevation(lat, lon) type that
would not mess with the tile cache, and not bother giving accurate
elevations for unloaded tiles.  Until then, a lot of subsystem writers have
/ will spend a significant amount of time figuring out how to get a ground
elev, and wondering what they're breaking whilst doing it.

As Curt says, regardless of the above, ground elev will always be expensive
- if the airport has a node arc layout you could dynamically cache lookups
for following traffic, interpolate between reasonable differences, etc,

Cheers - Dave

This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

Flightgear-devel mailing list

Reply via email to