IvorW wrote:
An ellipsoidal projection about one great circle will
only provide an accurate projection
regarding distances, for a very small percentage of locations on Earth.
I know we've talked about simply calculating distances from point A to
point B on the surface of a sphere in the past, and rejected it because
you lose accuracy over small distances, due to rounding errors in cos()
and sin().
I wonder, if we used an arbitrary precision FP library like
Math::BigFloat does this problem go away? It doesn't provide trig
functions, but they can be derived thus:
cos(x) = 1 - x^2/2! + x^4/4! - x^6/6! + ... (x in radians)
and
sin(x) = x - x^3/3! + x^5/5! - x^7/7! + ...
This is guaranteed to give us accurate results provided we use
sufficiently accurate values for sin(x) and cos(x), I wonder what the
performance hit would be.
--
David Cantrell | Official London Perl Mongers Bad Influence
Obviously, Linux owes its heritage to UNIX but not its code.
We would not, nor will not, make such a claim
-- Darl McBride, CEO, SCO, 28 Aug 2002
talking to Jeff Gerhardt of Linux Journal