You are given a model for an input signal of the form
$y(t) = a \cos(\omega t) + b \sin(\omega t) + c $
where the constants $a,b,c$, and $\omega$ are unknown.
You want to identify these unknowns from the values of this continuous-time signal at uniformly spaced instances, i.e. from $y(k T), k=0, 1, 2, ...$ where $T$ is the sampling period and is known. Further, it is assumed that the sampling conforms to the conditions of the sampling theorem, namely, that the sampling frequency $\left( \dfrac{2\pi}{T} \right)$ is higher than twice the frequency $\omega$.
Create an algorithm for identifying the unknown parameters.
Let $y_k = y(kT) = a \cos(k \omega T) + b \sin (k \omega T ) + c $
$ y_k $ is composed of a single sinusoid plus a constant.
It can be easily shown that the annihilator of $y_k$ (the linear operator that annihilates $y_k$) is
$A(p) = (p^2 - 2 \cos(\omega T) p + 1 ) (p - 1)$
where $ p[ y_k ]= y_{k+1} $
Multiplying out the operator polynomial, we obtain
$ A(p) = p^3 + (-1 - 2 \cos(\omega T) ) p^2 + (2 \cos(\omega T) + 1 ) p - 1 $
Let's define $c_0 = \cos(\omega T) $ then for all $k$,
$y_{k+3} + (-1 - 2 c_0) y_{k+2} + (2 c_0 + 1) y_{k+1} - y_k = 0 $
Taking $4$ consecutive samples $y_k , y_{k+1}, y_{k+2}, y_{k+3} $ we can solve for $c_0$ as follows
$ c_0 = \dfrac{ y_k - y_{k+1} + y_{k+2} - y_{k+3} }{ 2 (y_{k+1} - y_{k+2}) } $
Having obtained $c_0$, then we can calculate $\omega$,
$\omega = \dfrac{\cos^{-1} (c_0) }{T} $
Now, with $\omega$ known, we look back at the defining equation
$y_k = y(kT) = a \cos(k \omega T) + b \sin (k \omega T ) + c$
Taking three values of $k$, we can build and solve a $ 3 \times 3$ linear system of equations in the parameters $a,b,c$.
Note that since $ \left( \dfrac{2 \pi}{T} \right) \gt 2 \omega $, then
$ \omega T \lt \pi $
Hence, there will a unique value for $\omega$ that will satisfy $\cos(\omega T) = c_0 $
I have verified the method outlined above with an example and a small piece of code, and the unknowns $a,b,c,\omega$ were identified exactly.