wn-upf / Komondor

Komondor Wireless Networks Simulator
GNU General Public License v3.0
65 stars 19 forks source link

[Scenario generator] Make STAs placement in a circle uniformely distributed #65

Closed sergiobarra closed 6 years ago

sergiobarra commented 6 years ago

The spatial distribution of users or nodes in a circle. A straightforward solution seems to choose the angle uniformly distributed between 0 and 2pi and the radius uniformly distributed between 0 and R.

The solution: choose the angle uniformly but for the radius an intermediate value z is generated uniformly between 0 and 1 and then r is calculated as r = sqrt(z)*R.