Changeset 9322

Show
Ignore:
Timestamp:
05/01/09 21:35:43 (4 years ago)
Author:
mcarrick
Message:

data source transmits carrier over I channel, Q is left as zeros

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • ossiedev/branches/mcarrick/ossiedev-trunk/components/CarrierDataSource/CarrierDataSource.cpp

    r9308 r9322  
    2424#include <string> 
    2525#include <iostream> 
     26#include <cmath> 
    2627#include "CarrierDataSource.h" 
    2728 
     
    127128 
    128129    int len = 512; 
     130    float normFreq = 0.25; 
     131    float twoPi = 2*3.14159; 
    129132 
    130     I_out_0.length(len); //must define length of output 
    131     Q_out_0.length(len); //must define length of output 
     133    I_out_0.length(len);  
     134    Q_out_0.length(len);  
    132135 
    133136    for (unsigned int i = 0; i < I_out_0.length(); i++) 
    134137    { 
    135         I_out_0[i] = 0; 
     138        I_out_0[i] = pow(2,15)*cos(twoPi*i*normFreq); 
    136139        Q_out_0[i] = 0; 
    137140    }