2007/12/04

NS2 快速入門: DV-distance 模擬 (0)

0. 先了解 DV-distance

論文:D. Niculescu and B. Nath. Ad Hoc Positioning System (APS). In Proceedings of IEEE GlobeCom, San Antonio, AZ, November 2001.

定位 protocol,屬於 Application Layer

DV-hop
1. 先使用 distance vector 交換到網路所有 node,以取得到 landmark 的 hop 距離
2. 每個 node 維護一個 table 包含 (X, Y, h) 只從 neighbor 更新,(X, Y) 為 landmark 的位置, h 為 hop count
3. 只要 landmark 收到到其他 landmark 的距離,就估計平均一個 one hop 的距離,接著廣播發佈一個 correction 通知到整個網路
4. 接收到 correction 的節點,會在可以用三角測量時,估計到 landmark 的距離
5. 接收到 correction 的節點,以第一個收到的 correction 為準

每個 landmark 計算 The correction a landmark (Xi, Yi) ci, 一個 hop 的平均距離,以公尺為單位

每個 landmark 知道與其他 landmark 間的 hop count 與 euclidean distance

flooding 時,forward 一個 correction 後,會 drop 隨後的同一個 correction,
以確保每個 node 只會收到一個 correction,從最近的 landmark

可以用封包 TTL 限制一個 node 收到的 landmark 數

DV-distance

和 DV-hop 相同只是與鄰居 node 間的距離用訊號強度而不是 hop count,以公尺為單位
distance vector algorithm 使用訊號強度來累計旅行的距離


1. 要撰寫 NS2 模擬需要了解的步驟


TCL 相關
- 如何產生節點和座標
- 如何使用 protocol

C++ 相關
- 如何產生自訂的 protocol
- C++ 和 TCL 間的關係
- 如何在 NS2 內用個 table (structure)
- 如何從點 A 傳資料到點 B
- 如何從點 A flooding 資料出去
- 如何用 RSSI 估計兩點間的距離
- 如何改封包 TTL 的位置

No comments:

Post a Comment