I would like to find set of possible elliptical orbits which pass 2 points in plane. I was searching for some solutions in orbital mechanics texts but I didn't found any.
There are several possible approaches but I'm not sure which is the best - both looks quite difficult to solve algebraically.
- using polar equation relative to focus with $(R_1,\phi_1),(R_2,\phi_2)$, being coordinates of points $$ R_1 = \frac{a(1-e^2)}{1-ecos(\phi_1-\theta)} $$ $$ R_2 = \frac{a(1-e^2)}{1-ecos(\phi_2-\theta)} $$ then for given $\theta$ solve for semimajor axis $a$ and eccentricity $e$
- using deffinition of elipse as a set of points of the same distance from both foci. Given 2 points of cartesian coordinates $(x_1,y_1),(x_2,y_2)$ and one focus in origin $(0,0)$. For each given distance parameter $L$ solve for coordinates of second focus $(x_f,y_f)$, $$ L = \sqrt{x_1^2 + y_2^2} + \sqrt{(x_1 - x_f)^2 + (y_1 - y_f)^2} $$ $$ L = \sqrt{x_2^2 + y_2^2} + \sqrt{(x_2 - x_f)^2 + (y_2 - y_f)^2} $$
- I can also first rotate the coordinate system (or my input points) by given angle (which is my arbitrary parameter) and then use some simplified equation of ellipse which has major axis parallel to x-axis which has just 2 degrees of freedom. But even after this rotation I don't see much simplification of algebraic solution.
Nevertheless, the resulting equations are difficult to solve.I solved it using sympy, but the solution is very long expressing hard to simplyfy. I would like some more elegant solution if there is any.
I would also like to implement this into computer as a part of orbital transfer optimization, so I would prefer some explicit expression which is fast to evaluate numerically ( for example goniometric functions are quite slow to evaluate )