Hi,

On Montag 11 Juli 2005 12:38, BONNEVILLE David wrote:
> I'm not sure I understand what you've proposed me.
> You suggest me to add the few lines before I prepare the ground cache ?
Yes.
One thing: I believe that tile loading is done asyncronously so, that call 
will just schedule the tile to be loaded. You will then have some loops 
without success. When it is finally loaded you will have the data available.
That stuff depends on the geometry information available.
Somebody might correct me ...

> Do 
> I have to set the altitude to something high to be sure no terrain will be
> over ?
That depends.
That prepare_ground_cache call will collect geometry which intersects a ball 
of the given radius at the given 3D Point into the cache. Additionally a 
single croase ground value is stored for the altitude below the given point.
(Aehm, as I look at the code, the croase value is just the highes ever, but 
that should change ...)
If the aircraft is far above ground that croase value is returned for queries. 
In case the aircraft is near ground the cached triangles are checked for 
above ground level.

So, if you just have lat/lon and want to know the highest point at that 
position, a high altitude is ok.
But if you want to get the finegrained values in an area of some place in the 
world, you need to make shure that the  area you need is in the cache, that 
means the altitude should match the position of your vehicle. Otherwise you 
will get a cache with geometry for a place you are not really interrested 
in ...

> Do your few lines will ensure the required ground will be loaded ? 
See above.

> In fact I don't understand why my code doesn't work cause I ask the
> altitude for an object I can see if I set its altitude manually, that makes
> me think the tile is already loaded ...
You are talking about altitude above sea level?
You don't need any tiles/geometry for altitude computations.

Anyway, if you still cannot make it work, feel free to send me a snapshot of 
your changes (offlist). I will look into that ...

   Greetings

         Mathias

-- 
Mathias Fröhlich, email: [EMAIL PROTECTED]

_______________________________________________
Flightgear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to