Before continuing, I thought I'd verify a few points with those in the know.
Through observation, I found that my calculated agl value (as discussed in
my
previous post) was close to that of "/position/ground-elev-ft" when using
the
current lat/lon values instead of those from
Point3D calc_gc_lon_lat( const Point3D& orig, double course, double dist ).
I did this in an attempt to compare against the /position/ground-elev-ft
value.
The resulting value was close but not the same. Having
converted between feet and meters, and degrees and radians for the purpose
of the calculations, would this have resulted in the slight difference in
value?
With my limited avionics knowledge, I assumed that:
(altitude-ft - ground-elev-ft) = altitude-agl-ft. Again, this is something I
want to verify
instead of assuming. So is it (somewhat) correct to assume that subtracting
the
current altitude from my "calculated agl" would give me the the
altitude-agl-ft?
thanks,
Michael.
From: Mathias Fröhlich <[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: Sun, 11 Jun 2006 12:21:23 +0200
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
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel