There are three causes of fading mainly reflection, diffraction and scattering.
These fading types constitute different types of signal distribution from a receiver's point of view.
In the case of scattering, it causes a signal to show a rayleigh distribution, thus short term fading caused by scattering is called rayleigh fading.
rayleigh fading in simple terms:
1.) if transmitter propagates to an area with a lot of structures that will scatter the signal...
2.) rayleigh fading will occur as direct signal (inverse square law signal) will be mixed with scattered signals towards an observation point.
3.) Scattering will deform the signal and make the signal FADE than expected
4.) deformation will vary from 0 to 2Pi radians (0-180 degrees) thus the characteristic short deep fades of Rayleigh fading
5.) Rayleigh fading is observable when no direct line of sight with the transmitter
6.) Rayleigh fading much more pronounced when receiver is in motion, as motion multiplies the observed scattered signals arriving to the observer.
Relation to Shannon Theorem:
"The Shannon theorem states that given a noisy channel with channel capacity C and information transmitted at a rate R, then if R < C there exist codes that allow the probability of error at the receiver to be made arbitrarily small. This means that, theoretically, it is possible to transmit information nearly without error at any rate below a limiting rate, C."
A communication system and protocol usually an established R/C where C>>R. example GSM 200KHz C can not support better than 100KBps. This R/C ratio is based on optimal conditions of interference and fading values. If rayleigh fading due to macro design goes beyod these established values then R/C will be lower thus in the case of GSM it will not support and aggregate speed of 100KBps at 200KHz bandwidth.
(Curiously there was a system that broke the shanon theorem of C>>R and exhibited R>>C on controlled and strict conditions which is CDMA used in IS-95, CDMA2000 and UMTS WCDMA, however the battery penalty (due to processing) is so high that designers are going back to C>>R designs for LTE).
ON CLT and Rayleigh Distribution wide set of topics
but simply, CLT is a distrubution density with an established variance simply states that a com system with good design will have mean received signal that is dense enough and will have variances that is still good enough to support shannon's theorem design limit (previously established) even with rayleigh fading and other fading types inherent in the environment it supports or sustain.
Send sequence numbers and look for gaps.
In each packet sent, include a counter value that gets incremented with each packet sent. On the receive side, monitor these numbers. If a packet does not get received, then there will be a gap in the sequence.
Best Answer
The instantaneous effect of path loss and channel fading can be modelled as
$$ \text{PL}(d) \approx 10\gamma\times\log\left(\frac{d}{d_0}\right) + \text{PL}(d_0) + X_1 + X_2$$
where \$X_1\$ is zero-mean log-normal distributed and is due to slow fading (i.e shadowing) and \$X_2\$ is zero-mean Rayleigh distributed if in mobile, NLOS environment. If there is a LOS component then \$X_2\$ will be Ricean distributed. Note the formula above is not the same one used in communication budget link loss calculation, budget link loss is a similar but slightly different matter.
The log-normal path loss distribution simplifies this model by condensing \$X_1\$ and \$X_2\$ into one log-normally distributed variable \$X_g\$. It is particularly accurate if \$X_2\$ is negligible because of relatively low mobility (i.e in slow fading channels).
\$X_1\$ and \$X_2\$ are stochastic variables drawn from probability distribution functions, not deterministic quantities. If you have a random number source that produces uniformly distributed numbers, \$U\$, in the interval [0,1]. Then you can easily formulate a log-normal or Rayleigh number source from values of U by using inverse transform sampling. See source [1] and [2].
$$X_1 = \sigma \sqrt {-2\ln U_1} \cos (2\pi U_2)$$ $$X_2 = \sigma \sqrt {-2\log U}$$
or assume just log-normal and use just one variable
$$X_g = \sigma \sqrt {-2\ln U_1} \cos (2\pi U_2)$$
Where \$U_i\$ is a random variable drawn from the uniform distribution.The standard deviation (\$\sigma\$) is obtained empirically, you can see sample values of \$sigma\$ used to evaluate \$X_g\$ in different environments below [source]:
Note that because \$X_1\$ and \$X_2\$ are zero mean their effect can be largely reduced by taking many RSS values and then passing them through an optimal averaging filter. The biggest problem you have is that in a pure NLOS environment the path loss model we have being discussing here will be fairly inaccurate in a lot of settings as it assumes broadly similar environmental conditions existing between the average path distances [\$0\$,\$d_0\$] and [\$d_0\$, \$d\$], which is not the case in many NLOS cases. Again in NLOS there will be the issue of the average path distance being very different from the actual distance between communicating nodes. You might want to read up on that and maybe try searching for "Wireless Sensor Network RSSI Localisation algorithms" to see common ways the problem you have is commonly tackled in literature.