資源簡介
4G網絡定位中的fang算法的matlab仿真,可以直接運行沒什么錯誤
代碼片段和文件信息
function?X?=?FangAlgorithm(MSP?R)
%??本程序實現無線定位中的FANG算法
%??FANGALGORITHM
%????參數說明:
%???????MSP:移動臺相對位置;
%???????R:??小區半徑;
%???????X:??輸出移動臺的估計位置。
%??Also?see:?FangAlgorithm.
?%??輸入參數檢測:
????if??nargout>1
????????error(‘Too?many?output?arguments.‘);
????end
????if?nargin~=2
????????error(‘Wrong?number?of?input?arguments.‘);
????end
????????flag?=?size(MSP);
????if?flag(1)~=1?|?flag(2)~=2
????????error(‘Wrong?position?vector!‘);
????end
%??輸入:
%?????R?=?2000;?%單位:km
%?????BS?=?[0?sqrt(3)*R?0.5*sqrt(3)*R;
%???????????0?0?????????1.5*R];
%?????MSP?=?[0.5?0.8];
????
%??初始參數:
????MS??=?R*MSP;
????BS??=?[0?sqrt(3)*R?0.5*sqrt(3)*R;
??????????0?0?????????1.5*R];
????c???=?3*10^8;?%單位:?m/s
????DEV?=?3/(c*c);
????%
????R1?=?sqrt(MS(1)*MS(1)?+?MS(2)*MS(2));
????R2?=?sqrt((BS(12)?-?MS(1))*(B
評論
共有 條評論