There's many ways to approach this, but the classical "estimation of power in a system having data on harmonic oscillations" would be too just apply a quadrature mixture to baseband to it and take the RMS of the result.
Things would be easy if you knew the phase of your oscillation. If you knew the phase, you could multiply with an amplitude-one oscillation of the same phase, and get a new oscillation at twice the frequency, and at 0 frequency. You'd then eliminate the higher frequency component through filtering, and just look at the amplitude of the 0-frequency component.
Problem: you don't know the phase, usually, nor do you know the frequency that exactly.
There's two possible approaches: in the first, you just rely on the fact that analytical signals to real harmonic signals have constant complex envelope, and in the second you just recover phase and frequency.
Calculate a cos and a -sin of the same frequency with amplitude 1/2, multiply each with the observed signal, apply a low-pass filter to eliminate anything above say, half the original frequency (and especially at twice the original frequency). You get two new signals, one from the cosine-branch and one from the sine-branch of your processing. Use the cosine branch as real part and the sine branch as imaginary part.
Notice how the amplitude of the two parts depends on the phase of your original signal, but that the magnitude of the complex number that they form together is constant.
So, you just take the magnitude square of the complex signal you formed and get the square off your amplitude. Apply the mean and the root of it to that.
You could also just train an oscillator to have the same phase and frequency as the observed signal, and use that to multiply, then filter away higher frequency components to get rid of the double frequency.
That would be a Phase-Locked Loop (PLL) approach.