Hi, On Sunday 11 June 2006 06:53, Mick - wrote: > I've managed to get Mathias' suggestion of using get_elevation_m but with > strange AGL values. > I used calc_gc_lon_lat from simgear/math/polar3d.hxx for getting the > latitude/longitude from > x-meters away, then feeding the resulting lat/lon values into > get_elevation_m, but it seems this might not be correct (result is not > wgs84?). When flying over the ocean, I get an varying AGL value of 10-20ft. > With this said, could you suggest an alternative?
I have tried that out. That what you describe works here. The ocean surface is not exactly at 0m elevation. It varies between 0m elevation and about -1m. That is normal since the vertices are at exactly 0m, the triangle surfaces must be beond that somewhere in the middle. May be our maximum altitude value bites you. You may need to set that to something similar than the aircrafts altitude. The problem is that the down direction for the lookup is not perpandicular to the geodetic earths surface but directed towards the earths center ... > Additionally, could you please suggest how I could use the bounding box > method? Well, that depends on what you need. Hierarchical bounding boxes is something different than I suggest. It helps for a different problem. If you need that, I have not understood what you need. Collision avoidance can be meant with not hitting the ground. I expect that you need that. Collisions can also happen with other aircraft/whatever in 3D. If this is what you need than, the elevation value is not aprioriate for you. For that problem it is best to use hierarchical bounding boxes. The scenegraph already has some (poor) hierarchical bounding box structure in it. If you need that it might be a good starting point to reuse that. If you have further problems, feel free to ask. Greetings Mathias -- Mathias Fröhlich, email: [EMAIL PROTECTED] _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel