Equation of a great circle passing through two points

Solution 1:

In the following, we consider that we are working on a unit sphere ($\|V_1\|=\|V_2\|=1$).

If your longitude and latitude coordinates are $(\theta_k,\lambda_k) \ k=1,2.$ Let

$$V_1=\begin{bmatrix}\cos \theta_1 \cos \lambda_1 \\ \sin \theta_1 \cos \lambda_1 \\ \sin \lambda_1 \end{bmatrix} \ \ \ V_2= \begin{bmatrix}\cos \theta_2 \cos \lambda_2 \\ \sin \theta_2 \cos \lambda_2 \\ \sin \lambda_2 \end{bmatrix}$$

Set $V_3=V_1+V_2$, and $V_4=\dfrac{V_3}{\|V_3\|}$: it is the desired point.

If one desires the spherical coordinates of $V_4$ out of its cartesian coordinates $(a,b,c)$, it suffices to set : $$\lambda = \text{asin}(c) \ \ \ \text{and} \ \ \ \theta = \text{asin}(\dfrac{b}{\cos \lambda})$$

Remark : if one wants a parametrized equation for the great circle passing through $V_1$ and $V_2$, here is a classical way to obtain it (cometimes called "orthonormalization"). It suffices to obtain an orthogonal basis of plane $(P)$ defined by $V_1$ and $V_2$. This is easily done by taking as first vector $V_1$ and as a second vector a linear combination $V=\alpha V_1+\beta V_2$ such that $\|V\|^2=1$ and $V \perp V_1 \iff V \cdot V_1=0$, generating two equations with two unknowns (let us recall that we have assumed that $\|V_1\|=\|V_2\|=1$):

$$\begin{cases}\alpha^2 +\beta^2+ 2 d \alpha \beta &=&1\\\alpha+d \beta=0\end{cases}\tag{1}$$

(where $d$ is defined as the dot product $d:=V_1\cdot V_2$) which is amenable to a quadratic equation with two solutions (in general) because its discriminant is $>0$.

Let $W_1=\alpha V_1+\beta V_2$ be one of these two solutions ; the looked for parametric equation of the great circle passing through $V_1$ and $V_2$ is

$$V = \cos(t) V_1 + \sin(t) W_1$$