Ejemplo n.º 1
0
cmat operator+(const smat &a, const cmat &b)
{
  it_assert_debug(a.cols() == b.cols() && a.rows() == b.rows(), "operator+(): sizes does not match");
  cmat temp(b);

  for (int i = 0;i < a.rows();i++) {
    for (int j = 0;j < a.cols();j++) {
      temp(i, j) += (double)a(i, j);
    }
  }
  return temp;
}
Ejemplo n.º 2
0
	transmiter()
	{
		Parser p(std::string("config.txt"));
		DPCCH_NBits=p.get_int("DPCCH_NBits");
		
		HS_DPCCH_NBits=p.get_int("HS_DPCCH_NBits");
		E_DPCCH_NBits=p.get_int("E_DPCCH_NBits");
		E_DPDCH1_NData=p.get_int("E_DPDCH1_NData");
		E_DPDCH2_NData=p.get_int("E_DPDCH2_NData");
		E_DPDCH3_NData=p.get_int("E_DPDCH3_NData");
		E_DPDCH4_NData=p.get_int("E_DPDCH4_NData");
		SF=p.get_int("SF");
		SF_EDPDCH2=p.get_int("SF_EDPDCH2");
		SF_EDPDCH3=p.get_int("SF_EDPDCH3");
		DPCCH_SLOT0=p.get_int("DPCCH_SLOT0");
		DPCCH_SLOT1=p.get_int("DPCCH_SLOT1");
		DPCCH_SLOT2=p.get_int("DPCCH_SLOT2");
		DPCCH_SLOT3=p.get_int("DPCCH_SLOT3");
		DPCCH_SLOT4=p.get_int("DPCCH_SLOT4");
		DPCCH_SLOT5=p.get_int("DPCCH_SLOT5");
		DPCCH_SLOT6=p.get_int("DPCCH_SLOT6");
		DPCCH_SLOT7=p.get_int("DPCCH_SLOT7");
		DPCCH_SLOT8=p.get_int("DPCCH_SLOT8");
		DPCCH_SLOT9=p.get_int("DPCCH_SLOT9");
		DPCCH_SLOT10=p.get_int("DPCCH_SLOT10");
		DPCCH_SLOT11=p.get_int("DPCCH_SLOT11");
		DPCCH_SLOT12=p.get_int("DPCCH_SLOT12");				
		DPCCH_SLOT13=p.get_int("DPCCH_SLOT13");
		DPCCH_SLOT14=p.get_int("DPCCH_SLOT14");
		 
		betaDPCCH=p.get_int("betaDPCCH");
		betaE_DPDCH1=p.get_int("betaE_DPDCH1");
		betaE_DPDCH2=p.get_int("betaE_DPDCH2");
		betaE_DPDCH3=p.get_int("betaE_DPDCH3");
		betaE_DPDCH4=p.get_int("betaE_DPDCH4");
		betaE_DPCCH=p.get_int("betaE_DPCCH");
		betaE_HS_DPCCH=p.get_int("betaE_HS_DPCCH");
	
		betaDPCCHlin=pow10(betaDPCCH/10.0);
		betaE_DPDCH1lin=pow10(betaE_DPDCH1/10.0);
		betaE_DPDCH2lin=pow10(betaE_DPDCH2/10.0);
		betaE_DPDCH3lin=pow10(betaE_DPDCH3/10.0);
		betaE_DPDCH4lin=pow10(betaE_DPDCH4/10.0);
		betaE_DPCCHlin=pow10(betaE_DPCCH/10.0);
		betaE_HS_DPCCHlin=pow10(betaE_HS_DPCCH/10.0);

		OVSF=wcdma_spreading_codes (SF);
		OVSF4=wcdma_spreading_codes(SF_EDPDCH3);
		OVSF2=wcdma_spreading_codes(SF_EDPDCH2);

		OVSF256_0.set_length(SF,false);
		OVSF256_1.set_length(SF,false);
		OVSF256_33.set_length(SF,false);
		OVSF256_64.set_length(SF,false);
		
		OVSF4_1.set_length(SF_EDPDCH3,false);
		OVSF4_3.set_length(SF_EDPDCH3,false);
		OVSF2_1.set_length(SF_EDPDCH2,false);

		for(int i=0;i<OVSF.cols();i++)
		{
		OVSF256_0[i]=OVSF(0,i);
		OVSF256_1[i]=OVSF(1,i);
		OVSF256_33[i]=OVSF(33,i);
		OVSF256_64[i]=OVSF(64,i);
		
		}
		for(int i=0;i<OVSF4.cols();i++)
		{
			OVSF4_1[i]=OVSF4(1,i);
		
		
		}

		for(int i=0;i<OVSF2.cols();i++)
		{
			OVSF2_1[i]=OVSF2(1,i);
		}
		bvec DPCCH0=dec2bin(DPCCH_SLOT0,true);
		bvec DPCCH1=dec2bin(DPCCH_SLOT1,true);
		bvec DPCCH2=dec2bin(DPCCH_SLOT2,true);
		bvec DPCCH3=dec2bin(DPCCH_SLOT3,true);
		bvec DPCCH4=dec2bin(DPCCH_SLOT4,true);
		bvec DPCCH5=dec2bin(DPCCH_SLOT5,true);
		bvec DPCCH6=dec2bin(DPCCH_SLOT6,true);
		bvec DPCCH7=dec2bin(DPCCH_SLOT7,true);
		bvec DPCCH8=dec2bin(DPCCH_SLOT8,true);
		bvec DPCCH9=dec2bin(DPCCH_SLOT9,true);
		bvec DPCCH10=dec2bin(DPCCH_SLOT10,true);
		bvec DPCCH11=dec2bin(DPCCH_SLOT11,true);
		bvec DPCCH12=dec2bin(DPCCH_SLOT12,true);
		bvec DPCCH13=dec2bin(DPCCH_SLOT13,true);
		bvec DPCCH14=dec2bin(DPCCH_SLOT14,true);
		
		DPCCH.set_length(DPCCH_NBits,false);
		bvec conDPCCH0=concat(DPCCH0,DPCCH1,DPCCH2,DPCCH3,DPCCH4);
		bvec conDPCCH1=concat(DPCCH5,DPCCH6,DPCCH7,DPCCH8,DPCCH9);
		bvec conDPCCH2=concat(DPCCH10,DPCCH11,DPCCH12,DPCCH13,DPCCH14);
		DPCCH=concat(conDPCCH0,conDPCCH1,conDPCCH2);

		gold.generate();


		
	}