Finding axis of ellipse described by $x=a\cos t+ h\sin t$,$y=b\sin t + g\cos t$

Hi I am in need of help here for my project. Basically I have managed to obtain this form of equation. Example: $a=-181,h=33,b=185.9$ and $g=18.3$. When I plot it on a graphing program, it looks like a ellipse. Basically I need to find all the different parameters of the ellipse. Initially I thought that a general rotation would solve the problem. Basically $x=A\cos t$ and $y=B\sin t$ would be a normal parametric equation of ellipse, and alpha is the angle I have rotated. Hence that would allow me to find the major and minor axis easily. However, as you can see solving the 2 equation actually yields 2 equations for $\alpha$ which are $\tan\alpha ={ -h\over b}$ and $\tan\alpha ={ g\over a}$. Obviously this cannot be true. Does anyone know of what to do? Is there a more general equation of ellipse that I am unaware of? Please advise, thank you very much.

One way to get an equation is to use

$\begin{pmatrix} x\\ y\end{pmatrix}=\begin{pmatrix} a&h\\ g&b\end{pmatrix}\begin{pmatrix} \cos(t)\\ \sin(t)\end{pmatrix}$, which means that when the matrix is invertible

$\begin{pmatrix} \cos(t)\\ \sin(t)\end{pmatrix}= {\begin{pmatrix} a&h\\ g&b\end{pmatrix}}^{-1} \begin{pmatrix} x\\ y\end{pmatrix}$

then use $\cos^2(t)+\sin^2(t)=1$

That is $(bx-hy)^2+(-gx+ay)^2=(ab-gh)^2$ and in your example it is $(185.9x-33y)^2+(-18.3x-181y)^2=34251.8^2$

Now there are no linear terms, so you see that your ellipse is just a rotation of one centered at the origin. If you want you can get the semiaxes from this form by diagonalising the matrix

$\begin{pmatrix} b^2+g^2&-ag-bh\\ -ag-bh&a^2+h^2\end{pmatrix}$.

Hint:

The parametric equation $$\left( \begin {matrix} a \cos t + b \sin t\\ c \cos t + d \sin t \end{matrix} \right)$$ represents an ellipse with center in the origin and the points on the simmetry axis are the points that have maximum and minimum distance from the origin. So you can find this points searching the extrema of the function:

$y=(a \cos t + b \sin t)^2 +(c \cos t + d \sin t)^2$

Note that you can solve the equation $y'(t)=0$ for $x=\tan(t)$ and you allways find an equation of the form $x^2+ kx-1=0$, so the solutions are of the form

$\tan(t_1) \tan(t_2)=-1$

i.e the two axis are orthogonal.