Board index FlightGear Development Scenery

Desperately need ground elevation information!

Questions and discussion about enhancing and populating the FlightGear world.

Re: Desperately need ground elevation information!

Postby Thorsten » Wed Sep 04, 2019 6:36 pm

geodinfo gets alot more info than just elevation, isn't it alot slower to use than geo.elevation for that reason, or am I missing something?


Since we had this years ago for weather - the expensive thing is looking up the right mesh surface - once you have found it, it's nearly irrelevant in terms of performance whether you only retrieve elevation or whether you get the full shbang of geodinfo,

It actually used to be *really* slow (like 10 calls per frame would pretty much de-rail your framerate) and Mathias Froehlich (the grand-master of FG rendering) did a pretty clever thing and made it run about a hundred times faster.

Migrating to higher resolution terrain ate part of that speedup, but - realistically - if Mathias could not make it any faster, I doubt anyone can - he is a very clever guy, and he basically designed the way the terrain rendering is organized (and he was one of the driving forces behind the OSG migration).

The fact that FG core is already supplying elevation data at the location of the aircraft


That's a special situation - there's a special cache running for the purpose of collision detection in the vicinity of the aircraft - from which this can be derived.

But this doesn't generalize - you can't run this for 'any location' and not slow down FG dramatically.
Thorsten
 
Posts: 11191
Joined: Mon Nov 02, 2009 8:33 am

Re: Desperately need ground elevation information!

Postby Alant » Wed Sep 04, 2019 8:48 pm

I was able to use the slow geodinfo since I am simulating a 1960's aircraft. The update frequency was determined by the rate at which the radar dish could carry out the scan and the radar´s angular resolution, My simulation updates the FLR at that rate with no detrimental effect on Flightgear performance. Perhaps if I were to simulate a more modern system I would need to look for a more efficient algorithm. As it is my system has the same performance as the original. (and the terrain following works as per original also - 200 ft Mach 1.2)
Alan
Alant
 
Posts: 916
Joined: Wed Jun 23, 2010 5:58 am
Location: Portugal
Callsign: Tarnish99
Version: from Git
OS: Windows 10

Previous

Return to Scenery

Who is online

Users browsing this forum: No registered users and 2 guests