⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 motion.tcl

📁 R. Lo Cigno, P. Larcheri 802.11e closed-loop scheduling Description: ns-2 package for 802.11e clo
💻 TCL
字号:
set bsx [expr $opt(x) / 2.0]       ;# Position of the Base Stationset bsy [expr $opt(y) / 2.0]$BS(0) set X_ $bsx$BS(0) set Y_ $bsyset pi 3.1415926535897932384626433832795029puts $file(finish) "#\n#\tNode's Initial Positions :\n#"puts $file(finish) [format "#\t\t%15s    x:%6.3f    y:%6.3f" "Base Station" $bsx $bsy]# The following cycle sets the position of the wireless stations. They lie on a circumference#   with diameter 'opt(dia)', while the Base Station is in the centerforeach j [lessof $opt(nn)] {        set posx [expr $bsx + [expr $opt(dia) * cos([expr 2.0 * $pi * $j / $opt(nn)]) / 2]]        set posy [expr $bsy + [expr $opt(dia) * sin([expr 2.0 * $pi * $j / $opt(nn)]) / 2]]        $node_($j) set X_ $posx        $node_($j) set Y_ $posy        puts $file(finish) [format "#\t\t%15s    x:%6.3f    y:%6.3f" "Node $j" $posx $posy]}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -