Why is the d_phase equation different in these two files?
d_phase += d_alpha*phase_error; // In gr_mpsk_receiver.cc
d_phase = d_phase + d_freq + d_alpha * error; // In gr_costas_loop.cc
The d_freq term is omitted and I don’t understand why.
gr_costas_loop is wrong, and gr_mpsk_receiver used to have the same
error and has since been updated. The frequency component of the
rotation has already been added to the current phase estimate during
de-rotation of of the samples (in mm_sample, I think); so here all we
have to do is update the phase estimate by the estimated error.
I would also check your version of gr_costas_loop to see if the phase
estimate is clipped, or wrapped. There was an error where the phase
was clamped to 2*pi rather than rolling over, which would cause an
error once the phase drifted that far; this has also been fixed in the
latest version of mpsk_receiver.