I had this idea to project the Earth onto a 2D map using elliptical cylinders that could be unrolled.
(The Earth can be well approximated by rotating an ellipse on its axis to create an oblate spheroid. This in turn means only 60 horizontal elliptical secant cylinders would be enough to convert the planet to 2D map areas with a max error of less than 1 in 10000 as far as I can tell)
Long story short the lateral movements on the 2D map would correspond to a movement along an ellipse (when viewing the elliptical cylinder from the side).
So I would know the following:
- The elliptical parameters.
- The arc length moved (=2D_map_y).
- The origin from which the arc length movement began (y=0 both in the 2D map and for the ellipse/real space coordinates).
The elliptical integrals for finding arc lengths are beyond my math abilities and working backwards from there seems even more difficult.
I'm unashamedly looking for a potential answer/approximation without necessarily understanding it fully that I could put into a program. Precision of 1:10000+ would be sufficient.
There may be a fancier solution, but what I will do is to use the function "aelip(c, theta, a, b)". (c being the distance moved on the curve and theta being the starting location/angle moved from)
I will make this function myself by constructing a fake ellipse using many circle or line segments. The amount of segments used will determine the level of precision.
I can do this because unlike the circumference of an ellipse it is easy to calculate precise points on the elliptic curve itself. Three points on the elliptic curve should give me a circle with a locally closely fitting curve.
My program can then iterate through the segments to arrive at an angle from a specific movement on the curve.
Cheating you say? Well most of you likely don't think about what your calculator does when you press "PI", "cos" or such either.
I will update this answer with my code when it is done.
EDIT: It turns out that the existing mapping system UTM already maps to an elliptical cylinder from what I understand.
They use the so called Universal Transverse Mercator series by Krüger. I understand it as a series approximation of the ellipse instead of my proposed programmatic approach.
You can read about them here:
https://en.wikipedia.org/wiki/Transverse_Mercator_projection#Ellipsoidal_transverse_Mercator
https://en.wikipedia.org/wiki/Transverse_Mercator:_Redfearn_series
EDIT2: I finished my programmatic solution, see here: https://github.com/Realpra1/EllipseMath
It's not optimized, but it seems to work and it's more precise than Ramanujan's best estimate formula as far as I can tell.
It's probably a lot slower than some series based estimate, but I said I would do it and post the code.