Hi,

On Thursday 11 June 2009 12:03:10 James Turner wrote:
> However, I also feel that many of the concerns about the performance
> of geodetic computations and conversions date from quite a few years
> ago. While I don't think we should be wasteful, and they are
> numerically heavy to work with, Mathias' helpers hide the complexity,
> and I would be surprised if the computations are more than noise on a
> profile run, compared to the FDMs, rendering and so on.

In former years the conversions were done using an iteration method. I do not 
know the exact convergence speed of that method but that was roughly 
O(something with altitude). Also the constant in that O-term was considerable.
When I remember right, the iteration method converged *very* slow at bogous 
altitudes. And this made fg hang in some cases.

Since some time we have a closed formula for the conversion that needs some 
trigonometric stuff, some divisions and some square roots.
I have never really compared the iteration against the closed formula. But 
given the code I had in mind, I believe that this closed formula is about that 
amount of computation you had to do for few of the iteration steps the 
iteration method had needed. And the closed formula is O(1).

So that conversion function is expected to be faster because of the 
algorithmical changes and because of the growth in computation power of 
current cpu's ...

I would also not expect that to have a measurable impact on performance.
... we have very different performance problems that - when solved - push such 
a simulation to very different speeds.

> I'd say use whichever is easiest, and cleanest, for you.
As long as you don't do thousands or more of them per frame this is probably 
the way to go.

Greetings

Mathias

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to