Re: [Flightgear-devel] Re: terrain elevation at a given position

2005-05-23 Thread Martin Spott
Frederic Bouvier wrote:

> That should be easier when the source overhaul will be finished.

To divert a well-known (TM) phrase: "Gopher it"  ;-))

Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: terrain elevation at a given position

2005-05-23 Thread Frederic Bouvier
Quoting Martin Spott <[EMAIL PROTECTED]>:

> Melchior FRANZ wrote:
>
> > If I need elevation for the signs, I run fgfs solely for this purpose.
> > Here it's easy: Just set /position/longitude-deg and /position/latitude-deg
> > and wait until fgfs sets the appropriate /position/ground-elev-m for it.[1]
> >
> > It's not as much fun as it sounds, though:
>
> I know, my suggestions might sound a bit boring. Still I'm convinced
> that this might be a great job for a FlightGear apprentice developer.
> In private conversation Frederic Bouvier once suggestet to pick the
> appropriate FlightGear Scenery Designer sources and 
>
> "It shouldn't be too difficult. Just a matter of wrapping up the
> FGSD_TriangleObject class into a main function."

The biggest problems would be to remove unwanted dependancies that this class
drag, and to build a tile cache.

That should be easier when the source overhaul will be finished.

-Fred

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: terrain elevation at a given position

2005-05-23 Thread Martin Spott
Melchior FRANZ wrote:

> If I need elevation for the signs, I run fgfs solely for this purpose.
> Here it's easy: Just set /position/longitude-deg and /position/latitude-deg
> and wait until fgfs sets the appropriate /position/ground-elev-m for it.[1]
> 
> It's not as much fun as it sounds, though:

I know, my suggestions might sound a bit boring. Still I'm convinced
that this might be a great job for a FlightGear apprentice developer.
In private conversation Frederic Bouvier once suggestet to pick the
appropriate FlightGear Scenery Designer sources and 

"It shouldn't be too difficult. Just a matter of wrapping up the
FGSD_TriangleObject class into a main function."


Cheers,
Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


RE: Re : [Flightgear-devel] Re: terrain elevation at a given position

2005-05-23 Thread Norman Vine
 BONNEVILLE David writes:
> 
> That is the problem ;-)
> I am diving into SG code, but if Norman or somebody helped by Norman know 
> where
> i could find it, feel free to post a maessage :D

I haven't kept current with the code but AFAIK the elevation routines
live in FGFS / src / scenery / hitlist.xxx

The containing scenery tile for the point you are requesting elevation
for *must* be loaded into the scenegraph for these to work

I have forgotten exactly how to insure that an arbritrary tile is loaded 
and the code has probably changed anyway since I last worked on it

HTH

Norman
 
> > But if you say "at runtime", you possibly mean to get terrain elevation
> > while flying, so you can't simply teleport the aircraft to some lon/lat
> > just to read out a value. In this case you have to search for terrain
> > intersecion code in sg. I'm no expert in that. But Norman has already
> > pointed people there at several occasions, and you'll certainly find
> > something about it in the archives.

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re : [Flightgear-devel] Re: terrain elevation at a given position

2005-05-23 Thread BONNEVILLE David

That is the problem ;-)
I am diving into SG code, but if Norman or somebody helped by Norman know where
i could find it, feel free to post a maessage :D

David


> But if you say "at runtime", you possibly mean to get terrain elevation
> while flying, so you can't simply teleport the aircraft to some lon/lat
> just to read out a value. In this case you have to search for terrain
> intersecion code in sg. I'm no expert in that. But Norman has already
> pointed people there at several occasions, and you'll certainly find
> something about it in the archives.



___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


[Flightgear-devel] Re: terrain elevation at a given position

2005-05-23 Thread Melchior FRANZ
* BONNEVILLE David -- Monday 23 May 2005 10:52:
> I think Melchior will answer me the first [...]

Sorry, you didn't win the coffee machine! This was too easy to guess!



> How could I get the terrain elevation at a given lat/lon at runtime ?
> Could you point me to the right way ?

If I need elevation for the signs, I run fgfs solely for this purpose.
Here it's easy: Just set /position/longitude-deg and /position/latitude-deg
and wait until fgfs sets the appropriate /position/ground-elev-m for it.[1]

It's not as much fun as it sounds, though:

- you don't really know when fgfs is done. Waiting too short causese
  wrong values. Waiting too long causes gastric ulcer.

- you may not set the position to bucket boundaries, or fgfs won't set
  the elevation at all

But if you say "at runtime", you possibly mean to get terrain elevation
while flying, so you can't simply teleport the aircraft to some lon/lat
just to read out a value. In this case you have to search for terrain
intersecion code in sg. I'm no expert in that. But Norman has already
pointed people there at several occasions, and you'll certainly find
something about it in the archives.

m.


[1] http://members.aon.at/mfranz/flightgear/getelev  [6 kB]

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d