Exemplo n.º 1
0
int main(int argc, char *argv[])
{
    int len = 5;

    // seed the random number generator
    srand(time(NULL));

    int* arrayA = rand_array(len);
    print_int_array(arrayA, len);
    int* arrayB = rand_array(len);
    print_int_array(arrayB, len);

    complex_number* complexArray = initialize_complex_array(arrayA, arrayB, len);
    float* magnitudeArray = calculate_magnitudes(complexArray, len);
    print_float_array(magnitudeArray, len);

    // free memory
    free(arrayA);
    free(arrayB);
    free(complexArray);
    free(magnitudeArray);
}
//=================================================================================================
void MFSK_MessageDemodulator_Host::execute(wsgc_complex *symbol_samples)
{
    calculate_magnitudes(symbol_samples);
    estimate_magpeak();
    _symbol_i++;
}
void MFSK_MessageDemodulator_Host::execute(wsgc_complex *symbol_samples, ccsoft::CC_ReliabilityMatrix& relmat)
{
    calculate_magnitudes(symbol_samples);
    relmat.enter_symbol_data(_magsum_s);
}