12.07.2015 Views

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ZRXo0 longitude <strong>at</strong>equ<strong>at</strong>orY17.2 Using the s<strong>at</strong>ellite exte<strong>ns</strong>io<strong>ns</strong>Figure 17.2: Spherical coordin<strong>at</strong>e system used by s<strong>at</strong>ellite nodes17.2.1 Nodes <strong>and</strong> node positio<strong>ns</strong><strong>The</strong>re are two basic kinds of s<strong>at</strong>ellite nodes: geost<strong>at</strong>ionary <strong>and</strong> non-geost<strong>at</strong>ionary s<strong>at</strong>ellite nodes. In addition, terminal nodescan be placed on the Earth’s surface. As is explained l<strong>at</strong>er in Section 17.3, each of these three different types of nodesis actually implemented with the same class S<strong>at</strong>Node object, but with different position, h<strong>and</strong>off manager, <strong>and</strong> linkobjects <strong>at</strong>tached. <strong>The</strong> position object keeps track of the s<strong>at</strong>ellite node’s loc<strong>at</strong>ion in the coordin<strong>at</strong>e system as a function of theelapsed simul<strong>at</strong>ion time. This position inform<strong>at</strong>ion is used to determine link propag<strong>at</strong>ion delays <strong>and</strong> appropri<strong>at</strong>e times forlink h<strong>and</strong>offs. Section 5.3 introduced the "node-config" utility used to prime the node gener<strong>at</strong>or for different types of s<strong>at</strong>ellitenodes.Figure 17.2 illustr<strong>at</strong>es the spherical coordin<strong>at</strong>e system, <strong>and</strong> the corresponding Cartesian coordin<strong>at</strong>e system. <strong>The</strong> coordin<strong>at</strong>esystem is centered <strong>at</strong> the Earth’s center, <strong>and</strong> the z axis coincides with the Earth’s axis of rot<strong>at</strong>ion. (R, θ, φ) =(6378km, 90 o , 0 o ) corresponds to 0 o longitude (prime meridian) on the equ<strong>at</strong>or.Specifically, there is one class of s<strong>at</strong>ellite node Class Node/S<strong>at</strong>Node, to which one of three types of Position objectsmay be <strong>at</strong>tached. Each S<strong>at</strong>Node <strong>and</strong> Position object is a split OTcl/C++ object, but most of the code resides in C++.<strong>The</strong> following types of position objects exist:• Position/S<strong>at</strong>/Term A terminal is specified by its l<strong>at</strong>itude <strong>and</strong> longitude. L<strong>at</strong>itude ranges from [−90, 90] <strong>and</strong>longitude ranges from [−180, 180], with neg<strong>at</strong>ive values corresponding to south <strong>and</strong> west, respectively. As simul<strong>at</strong>iontime evolves, the terminals move along with the Earth’s surface. <strong>The</strong> node gener<strong>at</strong>or can be used to cre<strong>at</strong>e a terminalwith an <strong>at</strong>tached position object as follows:$<strong>ns</strong> node-config -s<strong>at</strong>NodeType terminal \(other node config comm<strong>and</strong>s go here...)set n1 [$<strong>ns</strong> node]$n1 set-position $l<strong>at</strong> $lon; # in decimal degrees173

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!