alexferrer / xplane_thermals

Xplane plugin to generate more realistic thermals
GNU General Public License v2.0
28 stars 7 forks source link

More cleanups and unit tests #23

Closed uhertlein closed 8 years ago

uhertlein commented 8 years ago

Hi Alex,

Please take a look at the following commits (I haven't yet found a way to create pull requests for individual commits):

Cheers, /uli

alexferrer commented 8 years ago

I am going to guess that the "lat" parameter in calcLift once stood as "alt" to be able to include the drift calculation. That functionality got moved for performance reasons. (It is cheaper to adjust the perceived position of the plane than re-computing every single thermal) Thanks for the fixes..

uhertlein commented 8 years ago

BTW: do you remember where world.latlon2meter = 111,200 came from? Could it be a typo, I would have expected 1 NM * 60 = 1852m * 60 = 111,120m

alexferrer commented 8 years ago

https://en.wikipedia.org/wiki/Geographic_coordinate_system The earth is not perfectly round, so It is an approximation anyway...

As long as both the thermals and the airplane positions are calculated with the same constant, everything should work ok.