A pendulum attached to a spring and all the system is rotating with angular velocity

Find the all the constraints and a set of generalized coordinates A pendulum attached to a spring and all the system is rotating with angular velocity $\omega$. this is what I have done, I do not know if it's ok:

If $x$ is the displacement of the point $A$ relative to the equilibrium extension $l_{1}$ of the spring, and $\theta$ is the angle the pendulum arm makes with respect to the vertical. Let the Cartesian coordinates of the pendulum be

$x_1 = l_{1} + x + r \sin \theta$
$y_1 = - r \cos \theta$

I'm not sure how to write the rotation

I believe it would be best (simplest) to describe this problem in the cylindrical frame of reference: that is a frame with a distance from the axis of rotation $R = \ell_1 + (x+r)\sin\theta$, vertical position (relative to the equilibrium position) $Z = r - (x+r)\cos\theta$, and angular position $\Phi = \omega t$. You then have to compute the tension in the string due to the rotation - this is the vector sum of the gravitational force $F_g = m g$ and the centripetal force $F_c = m \omega^2 R$.