On Samstag, 1. Mai 2004 13:54, Wolfram Kuss wrote:
> On Sat, 1 May 2004 09:15:09 +0200, you wrote:
> >I think we have three possible solutions from the FDM <-> Flightgear
> > interface point of view.
> >
> >1. Have a callback function in FGInterface which is able to provide you a
> >terrain level and a surface normal for a given lat/lon pair.
> >
> >2. On every update push *all* tiles in an environment of the aircraft to
> > the FDM and leave it to the FDM to fiddle with that information.
> >
> >3. Provide a callback function to query a surface tile for a given lat/lon
> >pair.
>
> I am not sure I understand 3, so excuse me should I just reformulate
> it:
>
> 4. There is one callback providing the level (altitude) for lat/lon.
> (and no normal!). The FDM is free to call it three times and from the
> three results create a normal, which does not need to coincide with
> the normal of any terrain poly. Actually, the normal computation might
> be part of flightgear (and not the FDM).
I really meant to get a normal from flightgear.
But you will get some average normal by the method you told about. Also
something to think about since it will make the normal steady dependent on
the lat/lon pair. Definitly better for numerical computations ...
What this method 3 was meant to do is to minimize the callback traffic by
having a FDM local tile cache and handling the actual queries to the
elevation data and normals based on this cache.
This is motivated by
1. A mail of Curt Olsen where he asked if it would be possible to handle the
FDM<->Flightgear data exchange via something like a netfdm. But if the
dataflow is squeezed through a socket, it is definitly better not to query
for each lat/lon pair which is required by the FDM.
2. The fact that at least for every gear this query is done once a timestep
and the code I prepare at the moment to get rid of this boring jitter needs
to recompute the gear forces more then one time in a timestep. This will
result in many such queries and thus these queries must be fast.
How this cache is built or how this data is available from within flightgear
is someting I have not looked at.
So, can somone help me out with a short descripion how flightgears surface can
be queried and what data such a query result holds? Or may be someone can
point me to some documentation about that?
Greetings
Mathias
--
Mathias Fr�hlich, email: [EMAIL PROTECTED]
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel