In a major assignment I am to determine the semi-major axis of an elliptic orbit for the star S2 around Sagittarius A*. I found some data that I have used to fit the points to an ellipse - however the equation I get is in terms of
$ax^2 + bxy + cy^2 + dx + ey + f = 0$
rather than
$ \frac{x^2}{a^2} + \frac{y^2}{ b^2}= 1$.
Can any of you smart people teach me how to 'translate' it, or if it's even necessary in order to determine the semi-major axis of the ellipse?
Think of the ellipse as a quadratic form: $$[x,y,1]\begin{bmatrix}a&b/2&d/2\\b/2&c&e/2\\d/2&e/2&-f \end{bmatrix}\begin{bmatrix}x\\y\\1 \end{bmatrix}=0 $$. Lets call the matrix in the middle $Q_0$ and then $[x,y,1]Q_0 \begin{bmatrix}x\\y\\1 \end{bmatrix}=0 $
Since you are allowed translate and rotate the coordinate system, you can push a 2d "rigid motion" matrix $E$ such that $[x,y,1] E^T Q_1 E\begin{bmatrix}x\\y\\1 \end{bmatrix}=0 $ and you can look for such and $E$ such that $Q_1=\begin{bmatrix} a'&0&0\\0&b'&0\\0&0&-1 \end{bmatrix}$
The general form of $E$ is $\begin{bmatrix}\cos(\theta)&\sin(\theta)&p_x \\-\sin(\theta)&\cos(\theta)&p_y\\ 0&0&1 \end{bmatrix}$