How to modulate PSK63 with liquiddsp? I am trying to implement the BPSK-63 modulator using liuid dsp library.
Here is my code:
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;string.h&gt;
#include &lt;getopt.h&gt;
#include &lt;math.h&gt;
#include &lt;complex.h&gt;
#include &lt;liquid/liquid.h&gt;

#define SAMPLERATE 11025

int main(){
    modem mod   = modem_create(LIQUID_MODEM_BPSK);
    
    nco_crcf q = nco_crcf_create(LIQUID_NCO);
    nco_crcf_set_phase(q,0);
    nco_crcf_set_frequency(q, 2*M_PI*(2000.0/(float)SAMPLERATE));
    
    const char *message = &quot;1010111100101111011001010100101110100&quot;; //RYry

    std::complex&lt;float&gt; x=_Complex_I*0;
    unsigned int symbol=0;
    unsigned int outs=0;
    int ctr=0;
    float ous[1];
    int offset=0;

    
    while(1){
        if(ctr++ == (SAMPLERATE/63)) {
            ctr=0;
            char sym = message[offset]-'0';
            offset++;
            if(offset &gt;= strlen(message))
                offset = 0;
            symbol = sym &amp; 0x01;
            
        }
        
        modem_modulate(mod, symbol, &amp;x);
        nco_crcf_mix_up(q, x, &amp;x);
        nco_crcf_step(q);
        
        ous[0] = x.real();
        fwrite((void *)ous,1,sizeof(float),stdout); // | aplay -f FLOAT_LE -r 11025 -c 1
    }
}

It looks like it works, however it sounds a bit different (has some clicks) to working modulator from FLDIGI program.
However when I feed the audio into the fldigi, I can see a carrier in the right spot, however it demodulates a series of &quot;ot e&quot; like:
ot e
ot e
ot e

instead of RYryRYryRYryRYry.
So, it sees five characters instead of four and detects a space and a newline when there is none.
Also, i see some harmonics, but i don't think this is a problem, since fldigi provides an adjustable filter on it's waterfall.
What i'm missing?
Posting a standard is actually a good point.
After reading several definitions i've figured out that i have to keep the symbol (and thus the phase) if I want to transmit 1 and reverse it if i want to transmit zero.
(see: http://www.arrl.org/psk31-spec, PSK-63 has just higher speed, about 63 baud.)
if(ctr==(11025/63)){
    ctr=0;
    c=message[subsym]-'0';
    subsym++;
    if(subsym&gt;=strlen(message)){
        subsym=0;
    }
    if(!c) // here instead of just assigning bit=symbol
    sym_in = !sym_in;
}