<?xml version="1.0"?>
<!--
###################################################
##Fading Model
###################################################
 -->
<block>
	<name>Fading Model</name>
	<key>channels_fading_model</key>
	<import>from gnuradio import channels</import>
	<make>channels.fading_model( $N, $fDTs, $LOS, $K, $seed )</make>
	<callback>set_fDTs($fDTs)</callback>
	<callback>set_K($K)</callback>
	<param>
		<name>Num Sinusoids (SoS model)</name>
		<key>N</key>
		<value>8</value>
		<type>int</type>
	</param>
	<param>
		<name>Normalized Max Doppler (fD*Ts)</name>
		<key>fDTs</key>
		<value>10.0/samp_rate</value>
		<type>real</type>
	</param>
	<param>
		<name>LOS Model</name>
		<key>LOS</key>
        <type>enum</type>
        <option>
            <name>Rayleigh/NLOS</name>
            <key>False</key>
            <opt>hide_K:all</opt>
        </option>
        <option>
            <name>Rician/LOS</name>
            <key>True</key>
            <opt>hide_K:</opt>
        </option>
	</param>
	<param>
		<name>Rician factor (K)</name>
		<key>K</key>
		<value>4.0</value>
		<type>real</type>
        <hide>$LOS.hide_K</hide>
	</param>
	<param>
		<name>Seed</name>
		<key>seed</key>
		<value>0</value>
		<type>int</type>
	</param>

	<sink>
		<name>in</name>
		<type>complex</type>
	</sink>
	<source>
		<name>out</name>
		<type>complex</type>
	</source>
    <doc>
  This algorithm implements the method described in
   Compact Rayleigh and Rician fading simulator based on random walk processes
   A. Alimohammad S.F. Fard B.F. Cockburn C. Schlegel
   26th November 2008

    int d_N=8;          // number of sinusoids
    float d_fDTs=0.01   // normalized maximum doppler frequency (f_doppler / f_samprate)
    float d_K=4;        // Rician factor (ratio of the specular power to the scattered power)
    bool d_LOS=true;    // LOS path exists? chooses Rician (LOS) vs Rayleigh (NLOS) model.
    int seed=0;         // noise seed
    </doc>
</block>
