Hi Gonzalo,
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?
Additionally, could you please suggest how I could use the bounding box
method?
thanks,
Michael.
From: Gonzalo Aguilar Delgado <[EMAIL PROTECTED]>
Reply-To: FlightGear developers discussions
<flightgear-devel@lists.sourceforge.net>
To: FlightGear developers discussions
<flightgear-devel@lists.sourceforge.net>
Subject: Re: [Flightgear-devel] collision avoidance
Date: Fri, 02 Jun 2006 13:58:18 +0200
Hi all!
Best thing to do would be bounding boxes. It's fast to calculate and
relative accurate.
You can calculate bounding box for each object one time and use every
time!
> On Friday 02 June 2006 01:44, Mick - wrote:
> > I'm trying to create a type of collision avoidance capability, and
would
> > need AGL data from in front of the aircraft.
> > Could someone suggest where (in the code) I could get "projected
elevation"
> > information, for example, AGL data 10 meters in front. My
understanding is
> > that AGL is taken from the nose of the aircraft.
> In C++ code src/Scenery/scenery.hxx one of:
>
> FGScenery::get_elevation_m;
> FGScenery::get_cart_elevation_m;
>
> should do what you need.
> Dependent on how often you need to compute that and how far away from
the
> actual aircraft you need to know that the groundcache accessible from
> FGInterface might be faster.
> That provides you with the same information in a small area around the
> aircraft (usually only the bonunding sphere of the aircraft model plus a
few
> meters) in a more performant way.
>
> Greetings
>
> Mathias
>
--
Gonzalo Aguilar Delgado - Ingeniero en Informática
[ Seguridad & Medios de pago ]
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel