Gaussian Distribution

I have been given the task to program a Gaussian Markov Mobility Model that will work in Qualnet.

The implementation of this mobility model is in C++. I have the equations with me on how to produce this model.

The Gauss-Markov Mobility Model was designed to adapt to different levels of randomness via one tuning pa-rameter. Initially each MN is assigned a current speed and direction. At fixed intervals of time, n, movement occursby updating the speed and direction of each MN. Specifically, the value of speed and direction at the nthinstanceis calculated based upon the value of speed and direction at the (n−1)st instance and a random variable using the following equations:

sn= αsn−1+(1−α)s+√(1−α2)sxn−1

dn= αdn−1+(1−α)d +√(1−α2)dxn−1

where snand dnare the new speed and direction of the MN at time interval n;
α, where 0 ≤ α ≤ 1, is the tuning parameter used to vary the randomness;
s and d are constants representing the mean value of speed and direction as n → ∞;

and sxn−1 and dxn−1 are random variables from a Gaussian distribution.

.
.
.

MN’s position is given by the equations:

xn= xn−1+sn−1cosdn−1

yn= yn−1+sn−1sindn−1

where (xn,yn) and (xn−1,yn−1) are the x and y coordinates of the MN’s position at the nth and (n−1)st time intervals,respectively, and sn−1 and dn−1 are the speed and direction of the MN, respectively, at the (n−1)st time interval




I am currently having problem with obtaining random variables from a Gaussian distribution (sxn−1 and dxn−1) with mean equal to zero and standard deviation equal to one. This is a key variable in the equation for the mobility model.

I know that there is a library made by GNU that does this however I am using visual studio in windows and I have no idea how I should start to implement this function.

Can anyone please help?
Topic archived. No new replies allowed.