tempt1.m
资源名称:TOA_uwb.rar [点击查看]
上传用户:doryuen
上传日期:2013-10-30
资源大小:23k
文件大小:1k
源码类别:
通讯/手机编程
开发平台:
Matlab
- %------------------- AP1 receiver ------------------------------
- % Correlator
- received_signl_ap1 = sum(ap1_tag_chan_wgn)/num_bits;
- xc1 = xcorr(y, received_signl_ap1);
- [a,delay1]=max(xc1);
- TOA_1 = (length(sig) - delay1) * ts;
- % TOA_1 = delay1 * ts;
- %------------------- AP2 receiver ------------------------------
- % Correlator
- received_signl_ap2 = sum(ap2_tag_chan_wgn)/num_bits;
- xc2 = xcorr(y, received_signl_ap2);
- [a,delay2]=max(xc2);
- TOA_2 = (length(sig) - delay2) * ts;
- % TOA_2 = delay2 * ts;
- %------------------- AP3 receiver ------------------------------
- % Correlator
- received_signl_ap3 = sum(ap3_tag_chan_wgn)/num_bits;
- xc3 = xcorr(y, received_signl_ap3);
- [a,delay3] = max(xc3);
- TOA_3 = (length(sig) - delay3) * ts;
- % TOA_3 = delay3 * ts;
- %---------------------------------------------------------------
- % time_ap_tag = time_ap_tag;
- time_dur = [TOA_1 TOA_2 TOA_3];
- [ex,ey]=TOA_LS(0,AP(:,1),AP(:,2),time_dur*3e8)
- toa_error(1,kkk) = toa(AP, Tag, time_dur, light_speed);