亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? scm_mex_core.c

?? 3gpp信道模型代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
                        real_multiplier[m_i] = gainScalar_re;
                        imag_multiplier[m_i] = gainScalar_im;
                     }
                     /* gains aren't scalar */
                     else {
                        ksnm = ksn*m_i+k*s*n_i+k*s_i+ k_i;
                        kunm = kun*m_i+k*u*n_i+k*u_i+k_i;
                        a = *(re_sq_G_BS + ksnm);
                        c = *(re_sq_G_MS + kunm);
                        if(both_real)
                           real_multiplier[m_i] = a*c;
                        else {
                           if (!bsreal) 
                              b = *(im_sq_G_BS + ksnm);
                           if (!msreal) 
                              d = *(im_sq_G_MS + kunm);
                           complex_multiply(a, b, c, d,
                              &real_multiplier[m_i], &imag_multiplier[m_i]);
                        }
                     }
                     exp_helper[m_i] = kds * cos_table[abs((*(aod+knm)-halfpi)*r2p)&divider]
                        + *(phase+knm) + kdu * cos_table[abs((*(aoa+knm)-halfpi)*r2p)&divider];

                     /* next value should be calculated accurately, because it is the main source of
                     * error when multiplied with large time sample values!
                     */
                     exp_t_coeff[m_i] =  kv * cos(*(aoa+knm)-theta_v[k_i]);	

                     if (tn >1) /* output pphase can be evaluated only if more than one time sample */
                        *(output_SubPathPhase+knm) = exp_t_coeff[m_i]* (*(ts+k*(tn-1)+k_i)+delta_t);
                  }  
                  
                  m_count = 0;
                  for (l_i=0;l_i<l;l_i++ ) {
                     knl = k*nl_i+k_i;
                     usnltk_i = usnl*tn*k_i + u*s*nl_i + u*s_i + u_i;
                     /* cycling the time vector */
                     for (t_i=0; t_i<tn; t_i++) {
                        real_sum = 0;
                        imag_sum = 0;
                        kt = k*t_i + k_i;
                        /* cycling m, now no calculations with m dependable variables is required */
                        m_i = m_count;
                        sumloop_with_table(m_i,m_count+(int)ln[l_i],exp_helper,exp_t_coeff, real_multiplier, imag_multiplier,
                           *(ts+kt), lm, &real_sum, &imag_sum, cos_table, r2p,divider, halfpi);
                        /* setting the output values and multiplying them with proper coefficient*/
                        usnltk = usnltk_i + usnl*t_i;
                        *(re_h+usnltk) = real_sum * *(sq_Pn+knl) * one_over_sq_ln[l_i];
                        *(im_h+usnltk) = imag_sum* *(sq_Pn+knl)* one_over_sq_ln[l_i];
                     }
                     m_count = m_count+(int)ln[l_i];
                     nl_i++;
                  }
               }
            }
         }
      }
      /* freeing memory of temporary tables */
      free(cos_table);
   }

   /* sin_look_up not used */
   else {

      /* cycling links */
      for(k_i=0; k_i<k; k_i++) {
         if(tn>1)
            delta_t = *(ts+k+k_i)-*(ts+k_i);
         kv = k_CONST * v[k_i];
         /* cycling u, u is a given constant*/
         for(u_i=0; u_i < u; u_i++) {
            kdu = k_CONST * *(d_u+u_i);
            /* cyckling s, s is a given constant */
            for(s_i=0;s_i< s; s_i++) {
               kds = k_CONST * *(d_s+s_i);
               /* running through paths, n is a given constant*/
               nl_i = 0;
               for(n_i=0;n_i<n;n_i++) {
                  kn = k*n_i +k_i;
                  /* calculating m-variant t-invariant values */
                  for(m_i=0; m_i<m; m_i++) {                     
                     /* calculation of pointer parameters */
                     knm = k*n*m_i+kn;

                     /* calculation of sqrt(G_BS)*sqrt(G_MS): */
                     if (GainsAreScalar) {
                        real_multiplier[m_i] = gainScalar_re;
                        imag_multiplier[m_i] = gainScalar_im;
                     }
                     /* gains aren't scalar */
                     else {
                        ksnm = ksn*m_i+k*s*n_i+k*s_i+ k_i;
                        kunm = kun*m_i+k*u*n_i+k*u_i+k_i;
                        a = *(re_sq_G_BS + ksnm);
                        c = *(re_sq_G_MS + kunm);
                        if(both_real)
                           real_multiplier[m_i] = a*c;
                        else {
                           if (!bsreal) 
                              b = *(im_sq_G_BS + ksnm);
                           if (!msreal) 
                              d = *(im_sq_G_MS + kunm);
                           complex_multiply(a, b, c, d,
                              &real_multiplier[m_i], &imag_multiplier[m_i]);
                        }
                     }

                     /* calculation of t-invariant part of exp(j...) in [1] 5.4 */
                     exp_helper[m_i] = kds * sin(*(aod+knm)) + *(phase+knm) +
                        kdu * sin(*(aoa+knm));

                     /* the coefficient just in front of t in exp(j...)*/
                     exp_t_coeff[m_i] = kv * cos(*(aoa+knm)-theta_v[k_i]);

                     if (tn >1) /* output pphase can be evaluated only if more than one time sample */
                     *(output_SubPathPhase+knm) = exp_t_coeff[m_i]* (*(ts+k*(tn-1)+k_i)+delta_t);
                  }

                  m_count = 0;
                  for (l_i=0;l_i<l;l_i++ ) {
                     knl = k*nl_i+k_i;
                     usnltk_i = usnl*tn*k_i + u*s*nl_i + u*s_i + u_i;
                     /* cycling the time vector */
                     for (t_i=0; t_i<tn; t_i++) {
                        real_sum = 0;
                        imag_sum = 0;
                        kt = k*t_i + k_i;

                        /* cycling m, now no calculations with m dependable variables is required */
                        m_i = m_count;
                        sumloop(m_i,m_count+(int)ln[l_i],exp_helper,exp_t_coeff, real_multiplier, imag_multiplier,
                           *(ts+kt), lm, &real_sum, &imag_sum);

                        /* setting the output values and multiplying them with proper coefficient*/
                        usnltk = usnltk_i + usnl*t_i;
                        *(re_h+usnltk) = real_sum * *(sq_Pn+knl) * one_over_sq_ln[l_i];
                        *(im_h+usnltk) = imag_sum* *(sq_Pn+knl)* one_over_sq_ln[l_i];
                     }
                     m_count = m_count+(int)ln[l_i];
                     nl_i++;
                  }
               }
            }
         }
      }
   }
   /* freeing memory of temporary tables */
   free(real_multiplier);
   free(imag_multiplier);
   free(exp_t_coeff);
   free(exp_helper);
   free(one_over_sq_ln);
   
   return 0;
}

/**
 * Function scm_pol_sum Creates array for Spatial channel model sums with cross-polarization.
 * The parameter angles must be in radians!
 * @param sin_look_up_points if nonzero, then look-up table for sin/cos is used. Use -1 for default number of points.
 * @param u the number of MS elements
 * @param s the number of BS elements
 * @param n number of multipaths
 * @param l number of midpaths
 * @param m number of subpaths for each n multipath
 * @param k the number of individual links
 * @param *re_X_BS_v real part of BS antenna V-pol component response (size [k][s][n][m])
 * @param *im_X_BS_v imaginary part of BS antenna V-pol component response (size [k][s][n][m])
 * @param *re_X_BS_h real part of BS antenna H-pol component response (size [k][s][n][m])
 * @param *im_X_BS_h imaginary part of BS antenna H-pol component response (size [k][s][n][m])
 * @param *re_X_MS_v real part of MS antenna V-pol component response (size [k][u][n][m])
 * @param *im_X_MS_v imaginary part of MS antenna V-pol component response (size [k][u][n][m])
 * @param *re_X_MS_h real part of MS antenna H-pol component response (size [k][u][n][m])
 * @param *im_X_MS_h imaginary part of MS antenna H-pol component response (size [k][u][n][m])
 * @param k wavenumber (2*pi/lambda)
 * @param *d_s distance of BS antenna s from ref. antenna (s=1), (size [s])
 * @param *d_u distance of MS antenna u from ref. antenna (u=1), (size [u])
 * @param *aod Angel of Departure (size [k][n][m])
 * @param *aoa Angel of Arrival (size [k][n][m])
 * @param *phase_v_v Phase offset of the mth subpath of the nth path between vertical components of BS and MS (size = [k][n][m])
 * @param *phase_v_h Phase offset of the mth subpath of the nth path between vertical components of BS and horizontal components of MS (size = [k][n][m])
 * @param *phase_h_v Phase offset of the mth subpath of the nth path between horizontal components of BS and vertical components of MS (size = [k][n][m])
 * @param *phase_h_h Phase offset of the mth subpath of the nth path between horizontal components of BS and MS (size = [k][n][m])
 * @param *sq_r_n1 square root of power ratio of (v-h)/(v-v) (size [k][n])
 * @param *sq_r_n2 square root of power ratio of (h-v)/(v-v) (size [k][n])
 * @param *v magnitude of the MS velocity vector (size [k])
 * @param *theta_v angle of the MS velocity vector (size [k])
 * @param *ts vectors of time samples (size [k][tn])
 * @param tn number of time samples
 * @param *sq_Pn square root of Pn (size [k][n*l])
 * @param *ln number of subpaths per midpath (size [l])
 * @param *lm subpath indexing order for midpaths, Matlab indexing: 1-m (size [m])
 * @param GainsAreScalar has value 1 if gain is scalar, zero if not
 * @param *re_h pointer to real part output matrice h, must be initialized outside scm function (size [u][s][n][t][k])
 * @param *im_h pointer to imag part output matrice h, must be initialized outside scm function (size [u][s][n][t][k])
 * @param *output_SubPathPhase (size [k][n][m])
 * @return 0 if success, 1 if bad arguments
 */
int scm_pol_sum(const long int sin_look_up_points, const int u, const int s, const int n, const int l, const int m, const int k,
   const double *re_X_BS_v, const double *im_X_BS_v, const double *re_X_BS_h, const double *im_X_BS_h, 
   const double *re_X_MS_v, const double *im_X_MS_v, const double *re_X_MS_h, const double *im_X_MS_h, 
   const double k_CONST, const double *d_s, const double *d_u, const double *aod, const double *aoa,
   const double *phase_v_v, const double *phase_v_h, const double *phase_h_v, const double *phase_h_h,
   const double *r_n1, const double *r_n2,	const double *v, const double *theta_v, const double *ts,
   const int tn, const double *sq_Pn, const double *ln, const double *lm, int GainsAreScalar,
   double *re_h, double *im_h, double *output_SubPathPhase) {

   int i, n_i, nl_i, l_i, m_i, u_i, s_i, t_i, k_i, m_count;	/* running index variables */
   /* notation conversion variables from [][] to *(p[0]+var) */
   long int ksnm, kunm, knm, usnltk, kn, knl, nl, kt, usnl, usnltk_i, ksn, kun;

   int bsreal, msreal, both_real;
   double a1_re, a1_im, a2_re, a2_im, c1_re, c1_im, c2_re, c2_im; /* variables for multiplications*/
   double b11_re, b11_im, b12_re, b12_im, b21_re, b21_im, b22_re, b22_im;
   double a1c1_re, a1c2_re, a2c1_re, a2c2_re;
   double tmp; /* temporary variable to lighten calculations */
   double kds, kdu, kv, real_sum, imag_sum;
   double *real_multiplier;
   double *imag_multiplier;
   double *exp_t_coeff, *exp_helper;
   double delta_t;
   double *cos_table;
   double r2p;
   double halfpi;
   long int num_of_points, divider, pows_of_two;
   double *one_over_sq_ln;
   
   double sq_r_n1, sq_r_n2;     /* (Jari, Apr 17, 2005) */
   
   real_multiplier = (double*)malloc(m*sizeof(double));
   imag_multiplier = (double*)calloc(m,sizeof(double));
   exp_t_coeff = (double*)malloc(m*sizeof(double));
   exp_helper = (double*)malloc(m*sizeof(double));

   /* check if input gains are not complex */
   bsreal = 0;
   msreal = 0;
   both_real = 0;
   if (im_X_BS_v == NULL)
      bsreal = 1;
   if (im_X_MS_v == NULL)
      msreal = 1;
   if(bsreal && msreal)
      both_real = 1;

   if (GainsAreScalar) {
      if (both_real) {
         a1c1_re = *re_X_BS_v * *re_X_MS_v;
         a2c1_re = *re_X_BS_h * *re_X_MS_v;
         a1c2_re = *re_X_BS_v * *re_X_MS_h;
         a2c2_re = *re_X_BS_h * *re_X_MS_h;
      }
   }

   nl = n*l;
   usnl = u*s*nl;
   ksn = k*s*n;
   kun = k*u*n;

   /* calculate coefficient terms */
   one_over_sq_ln = (double*)malloc(l*sizeof(double));
   for(i=0;i<l;i++) {
      one_over_sq_ln[i] = 1/sqrt(ln[i]); 
   }

   /* checks if look-up table is used for sin/cos */
   if (sin_look_up_points) {
      if (sin_look_up_points == -1)
         num_of_points = DEFAULT_LUT_POINTS;
      else {
         pows_of_two = 2;
         while (pows_of_two < sin_look_up_points)
            pows_of_two = pows_of_two*2;
         num_of_points = pows_of_two;
         if (pows_of_two != sin_look_up_points)
            printf("Warning: Number of LU points is not a power-of-2: size changed to %li.\n", num_of_points);
      }

      divider =  num_of_points -1;
      r2p = num_of_points/(2*PI);
      halfpi = PI*0.5;

      cos_table = (double*)malloc(num_of_points*sizeof(double));
      /* calculate the table */
      for (i=0;i<num_of_points;i++) 
         cos_table[i] = cos((i+0.5)/r2p);

      /* cycling links */
      for(k_i=0; k_i<k; k_i++) {
         if(tn>1)
            delta_t = *(ts+k+k_i)-*(ts+k_i);
         kv = k_CONST * v[k_i]; /* value depends only on k */
         /* u is a given constant */
         for (u_i=0; u_i<u; u_i++) {
            kdu = k_CONST * *(d_u+u_i); /* value depends only on u */
            /* s is a given constant */
            for (s_i=0; s_i<s; s_i++) {
               kds = k_CONST * *(d_s+s_i); /* value depends only on s */
               /* running through paths, n is a given constant */
               nl_i=0;
               for (n_i=0; n_i<n; n_i++) {
                  kn = k*n_i +k_i;
                  /* m is a given constant */
                  for (m_i=0; m_i<m; m_i++) {
                     /* calculation of pointer parameters */
                     knm = k*n*m_i+kn;
                     
                     /* Jari (Apr 17, 2005): changed power normalization */
                     sq_r_n1 = sqrt(*(r_n1+kn));
                     sq_r_n2 = sqrt(*(r_n2+kn));
                     
                     b12_re = sq_r_n1 * cos_table[abs((*(phase_v_h+knm))*r2p)&divider];
                     b12_im = sq_r_n1 * cos_table[abs((*(phase_v_h+knm)-halfpi)*r2p)&divider];
                     b11_re = cos_table[abs((*(phase_v_v+knm))*r2p)&divider];
                     b11_im = cos_table[abs((*(phase_v_v+knm)-halfpi)*r2p)&divider];                        
                     b21_re = sq_r_n2 * cos_table[abs((*(phase_h_v+knm))*r2p)&divider];
                     b21_im = sq_r_n2 * cos_table[abs((*(phase_h_v+knm)-halfpi)*r2p)&divider];
                     b22_re = cos_table[abs((*(phase_h_h+knm))*r2p)&divider];
                     b22_im = cos_table[abs((*(phase_h_h+knm)-halfpi)*r2p)&divider];
                     


                     /* Jari (Apr 17, 2005): Xpd independent power, not used in this version */
                     /*
                     tmp = 1/sqrt(1+*(r_n1+kn));
                     b12_re = tmp * cos_table[abs((*(phase_v_h+knm))*r2p)&divider];
                     b12_im = tmp * cos_table[abs((*(phase_v_h+knm)-halfpi)*r2p)&divider];
                     tmp = sqrt(*(r_n1+kn))*tmp;
                     b11_re =  tmp * cos_table[abs((*(phase_v_v+knm))*r2p)&divider];
                     b11_im = tmp * cos_table[abs((*(phase_v_v+knm)-halfpi)*r2p)&divider];
                     tmp = 1/sqrt(1+*(r_n2+kn));
                     b21_re = tmp * cos_table[abs((*(phase_h_v+knm))*r2p)&divider];
                     b21_im = tmp * cos_table[abs((*(phase_h_v+knm)-halfpi)*r2p)&divider];
                     tmp = sqrt(*(r_n2+kn))*tmp;
                     b22_re = tmp * cos_table[abs((*(phase_h_h+knm))*r2p)&divider];
                     b22_im = tmp * cos_table[abs((*(phase_h_h+knm)-halfpi)*r2p)&divider];
                     */

                     if(both_real) { 
                        if (GainsAreScalar) {
                           real_multiplier[m_i] = a1c1_re *b11_re + a2c1_re * b21_re +

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲免费观看视频| 91精品国产丝袜白色高跟鞋| 在线不卡免费欧美| 日本一区免费视频| 亚洲精品菠萝久久久久久久| 亚洲小说春色综合另类电影| 成人影视亚洲图片在线| 欧美精品精品一区| 中文字幕在线观看不卡| 国产高清在线精品| 欧美日韩精品系列| 91精品国产综合久久精品麻豆| 国产不卡在线播放| 欧美夫妻性生活| 国产精品欧美经典| 免费不卡在线观看| 欧美日韩一区二区欧美激情| 日本一区二区三区国色天香| 午夜国产精品一区| 激情六月婷婷久久| 91精品久久久久久久99蜜桃| 1024精品合集| 国产精品18久久久久久久网站| 日韩午夜精品视频| 国产精品国产成人国产三级 | 色噜噜狠狠色综合中国| 亚洲国产激情av| 麻豆精品精品国产自在97香蕉| 成人一区二区三区中文字幕| 久久久久久亚洲综合| 日本美女一区二区三区视频| 色综合咪咪久久| 18成人在线观看| 国产成人综合亚洲91猫咪| 欧美一区二区三区免费大片| 亚洲高清免费一级二级三级| 色哟哟欧美精品| 国产精品丝袜在线| 麻豆精品蜜桃视频网站| 欧美一区二区三区喷汁尤物| 天堂av在线一区| 欧美天堂亚洲电影院在线播放| 亚洲美女屁股眼交| 97se狠狠狠综合亚洲狠狠| 国产偷国产偷精品高清尤物| 国产成人一级电影| 337p粉嫩大胆色噜噜噜噜亚洲 | 色综合久久久网| 国产精品免费av| 成人听书哪个软件好| 精品国产一区二区在线观看| 男女性色大片免费观看一区二区| 欧美视频在线观看一区| 亚洲天堂av一区| 99在线精品一区二区三区| 国产午夜亚洲精品不卡| 日本aⅴ免费视频一区二区三区| 欧美丰满一区二区免费视频| 亚洲五月六月丁香激情| 欧美在线视频全部完| 婷婷综合五月天| 7777女厕盗摄久久久| 天堂一区二区在线免费观看| 欧美午夜不卡视频| 午夜精品爽啪视频| 欧美视频一区在线| 视频一区在线视频| 欧美一区二区三区性视频| 久久99久久99| 久久夜色精品国产噜噜av| 国产综合久久久久久鬼色| 日韩亚洲欧美成人一区| 国产真实乱对白精彩久久| 国产片一区二区| 91在线视频播放地址| 亚洲成人资源在线| 欧美一区二区在线观看| 韩国精品免费视频| 国产精品久久久久久久久晋中| 91美女视频网站| 亚洲成a天堂v人片| 337p粉嫩大胆色噜噜噜噜亚洲| 粉嫩aⅴ一区二区三区四区| 一区二区中文视频| 色综合色狠狠综合色| 免费成人在线影院| 国产亚洲欧美激情| 91原创在线视频| 爽好多水快深点欧美视频| 91精品国产高清一区二区三区| 国产自产高清不卡| 综合电影一区二区三区| 欧美精品vⅰdeose4hd| 久久99国产精品免费| 国产精品看片你懂得| 欧美精品v国产精品v日韩精品| 久久97超碰国产精品超碰| 国产精品免费免费| 91热门视频在线观看| 看电影不卡的网站| 中文天堂在线一区| 91久久精品一区二区三| 狠狠色综合播放一区二区| 中文字幕一区视频| 欧美一区二区三区在| 99久久99久久久精品齐齐| 日韩avvvv在线播放| 中文字幕精品三区| 日韩三级视频在线看| 丁香激情综合五月| 亚洲成人激情综合网| 国产精品久久久久久久第一福利| 精品视频在线免费看| 国产精品白丝jk黑袜喷水| 天天综合网天天综合色| 中文字幕免费一区| 欧美一级国产精品| 一本到三区不卡视频| 久久99精品久久久久久动态图| 亚洲日本韩国一区| 在线电影欧美成精品| 成人国产一区二区三区精品| 亚洲gay无套男同| 欧美精品一区二| 欧美一区二区三区在线电影| 95精品视频在线| 性久久久久久久久| 一区二区在线观看视频在线观看| 26uuu亚洲| 欧美日韩国产一级| 在线观看www91| 国产成人无遮挡在线视频| 亚洲与欧洲av电影| 亚洲日本中文字幕区| 久久婷婷一区二区三区| 欧美日韩国产三级| 色综合久久中文字幕| 国产精品亚洲成人| 日韩av一级片| 爽好多水快深点欧美视频| 亚洲欧洲色图综合| 精品福利一区二区三区免费视频| 欧美日韩一级二级| 色又黄又爽网站www久久| 国产精品亚洲第一| 国产精品一区专区| 毛片一区二区三区| 香蕉成人啪国产精品视频综合网| 一区二区三区中文免费| 中日韩av电影| 久久久99免费| 精品国产免费一区二区三区四区 | 午夜精品福利视频网站| 日韩理论电影院| 国产精品欧美综合在线| 国产性色一区二区| www激情久久| 精品国产免费视频| 色婷婷av一区| 色屁屁一区二区| 99久久99精品久久久久久 | 91精品啪在线观看国产60岁| 91色九色蝌蚪| 99精品国产视频| 91女人视频在线观看| 一本色道久久加勒比精品| 成年人午夜久久久| 成人a区在线观看| 91在线视频免费91| 色综合色狠狠综合色| 色综合天天综合网国产成人综合天| 99久久精品国产麻豆演员表| 成人av资源站| av激情亚洲男人天堂| 色婷婷综合中文久久一本| 91小视频在线免费看| 91在线精品一区二区| 色婷婷久久综合| 欧美伊人久久久久久久久影院| 在线视频中文字幕一区二区| 欧美日韩激情一区二区三区| 欧美日韩国产成人在线免费| 在线成人av网站| 日韩欧美国产成人一区二区| 久久久久久久久蜜桃| 亚洲国产精品高清| 综合久久综合久久| 一区二区免费在线| 蜜臀av性久久久久蜜臀aⅴ流畅 | 亚洲伦理在线精品| 午夜亚洲福利老司机| 久久草av在线| eeuss鲁一区二区三区| 欧美午夜电影在线播放| 日韩免费一区二区三区在线播放| 久久久久99精品一区| 亚洲男人电影天堂| 人禽交欧美网站| 国产成人av电影在线| 色婷婷久久久综合中文字幕|