
Let $F_1,F_2$ be the foci of the ellipse,
$|OA|=|OC|=|BF_1|=|BF_2|=a$,
$|OB|=b$, $\angle DOA=\theta$,
$|OD|=r$, $|DF_2|=u$, $|DF_1|=v$.
We know that
\begin{align}
|OF_1|=|OF_1|&=\sqrt{a^2-b^2}
\tag{1}\label{1}
,\\
u+v&=2a
\tag{2}\label{2}
.
\end{align}
By the
Stewart’s Theorem
\begin{align}
\triangle F_1F_2D:\quad
|DF_1|^2\cdot|OF_2|+
|DF_2|^2\cdot|OF_1|
&=|F_1F_2|\cdot(|OD|^2+|OF_1|\cdot|OF_2|)
\tag{3}\label{3}
,\\
(u^2+v^2)\sqrt{a^2-b^2}&=2\sqrt{a^2-b^2}\,(r^2+a^2-b^2)
\tag{4}\label{4}
,\\
u^2+v^2&=
2(r^2+a^2-b^2)
\tag{5}\label{5}
.
\end{align}
Combination of \eqref{2} and \eqref{5} gives
\begin{align}
uv&=2a^2-\tfrac12(u^2+v^2)
\tag{6}\label{6}
,\\
uv&=a^2+b^2-r^2
\tag{7}\label{7}
.
\end{align}
A pair of equations \eqref{2}, \eqref{7} results in
\begin{align}
u&=a-\sqrt{r^2-b^2}
\tag{8}\label{8}
,\\
v&=a+\sqrt{r^2-b^2}
\tag{9}\label{9}
,
\end{align}
since $u<v$ by construction.
Given that, we have all the side lengths of $\triangle OF_2D$
in terms of known values $a,b,r$,
and the angle $\theta$ now can be found
by the cosine rule:
\begin{align}
\theta&=\arccos\left(\frac ar\sqrt{\frac{r^2-b^2}{a^2-b^2}}\right)
\tag{10}\label{10}
.
\end{align}