The stereo MPX relies on two carriers, the pilot at 19KHz and a sub-carrier of 38KHz. Thses are generated using arrays of samples. Thus there is complete control of the both the pilot and subcarrier phase modulation with respect to the baseband signal.
The samples calculation is very simple:
int i;
float mref19;
float mref1;
float mref2;
float m19;
float c19 = 0.6217735; // Pilot increment angle per sample
float r19;
m19 = 10.0 * pilot_level;
r19 = 525.0 * pilot_level; // The RDS level should be near the DAC maximum
// This value should give 2.5v +- 2v. ie 4v peak-peak
for(i = 0; i < 192; i++)
{
mref19 = ((float)i) * c19; // The phase angle
mod_buf[i] = m19 * sinf(mref19); // The pilot
mod38_buf[i] = sinf(2.0 * mref19); // The 38KHz
if(bPilot) modaux_buf[i] = 7.5 * mod_buf[i]; // Copy of pilot
// else modaux_buf[i] = r19 * sinf(3.0 * mref19); // The 57KHz
else modaux_buf[i] = r19 * sinf(mref19 - 48*c19); // The 19KHz phase shift
}
A pilot increment is calculated as the phase jump between samples. Then the carrier array are the iterative count of this, with the subcarrier incrementing twice the pilot. There some scaling factors to get the output levels correct, but note: these are equipment design dependent!
The possiblity of introducing a 57KHz carrier or phase offset pilot is shown.