If I have the two following equations:
$$\begin{align} A &=\phantom{-}G \cos x -F \sin(y-x) \\ B &= -F\cos(y-x)-G\sin x \end{align}$$
and $A$, $B$, $F$, $G$, and $y$ are all known, what is the easiest method of calculating $x$?
For context: I need to be able to solve this equation for $x$ to determine the angular position of a pedal on a bike using accelerometer data. I will be coding the solution in arduino code.
To be totally honest, I am not the greatest at maths and have no real starting point. I looked into Cramer's rule but that will not work for this application.
All help is appreciated!
Write $$\sin(y-x)=\frac{G\cos(x)-A}{F}$$ and $$\cos(y-x)=\frac{-B-G\sin(x)}{F}$$ Squaring both equations and adding both we get
$$1=\left(\frac{G\cos(x)-A}{F}\right)^2+\left(\frac{-B-G\sin(x)}{F}\right)^2$$ Can you proceed? Now we get $$F^2=A^2+B^2+G^2-2GA\cos(x)+2BG\sin(x)$$