Changeset 8381

Show
Ignore:
Timestamp:
10/21/08 16:54:19 (5 years ago)
Author:
hvolos
Message:

added the option for envelope only fading

Location:
ossiedev/branches/hvolos/components/Channel
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • ossiedev/branches/hvolos/components/Channel/Channel.cpp

    r8368 r8381  
    3838    K_factor=1; 
    3939    MaxDopplerRate=0; 
     40    envelope=true; 
    4041 
    4142    //Create the thread for the writer's processing function  
     
    136137               throw CF::PropertySet::InvalidConfiguration(); 
    137138            }; 
    138              
     139 
     140        } else if (strcmp(props[i].id, "DCE:4ba6cb86-29fb-40c8-a90c-7e69b7e59d85") == 0) { 
     141           const char * prop_str; 
     142            props[i].value >>= prop_str; 
     143            if ( strcmp(prop_str, "True") == 0 ) { 
     144               envelope=true; 
     145            } else if ( strcmp(prop_str, "False") == 0 ){ 
     146               fading=false; 
     147            } else { 
     148              std::cerr << "ERROR: Channel::configure() unknown envelope type" << std::endl; 
     149               throw CF::PropertySet::InvalidConfiguration(); 
     150            }; 
    139151 
    140152        } else if (strcmp(props[i].id, "DCE:76abee66-8a83-11dd-b96d-0016769e497b") == 0) { 
     
    158170        }**/ 
    159171    } 
    160 std::cout<<"noise_sigma:"<<noise_sigma<<"fading:"<<fading<<"K_factor:"<<K_factor<<"MaxDopplerRate"<<MaxDopplerRate<<std::endl; 
     172std::cout<<"noise_sigma:"<<noise_sigma<<"fading:"<<fading<<"envelope"<<envelope<<"K_factor:"<<K_factor<<"MaxDopplerRate"<<MaxDopplerRate<<std::endl; 
    161173 
    162174} 
     
    227239            pQ/=PathPower; 
    228240 
     241            if (envelope){ 
     242            pI=sqrt(pI*pI+pQ*pQ); 
     243            pQ=pI;             
     244 
     245            } 
     246 
    229247            pI=1/sqrt(K_factor+1)*pI +sqrt(K_factor/(1+K_factor)); 
    230248            pQ=1/sqrt(K_factor+1)*pQ +sqrt(K_factor/(1+K_factor)); 
     249 
     250 
     251 
    231252            } 
    232253            else { 
  • ossiedev/branches/hvolos/components/Channel/Channel.h

    r8368 r8381  
    9494 
    9595    bool fading; 
     96    bool envelope; 
    9697 
    9798    double noise_sigma,K_factor,MaxDopplerRate; 
  • ossiedev/branches/hvolos/components/Channel/Channel.prf.xml

    r8368 r8381  
    1212        <value>Ricean</value>  
    1313        <description>Specifies the fading type. Valid values are "None" and "Ricean"</description>  
     14        <kind kindtype="configure"/> 
     15    </simple> 
     16    <simple id="DCE:4ba6cb86-29fb-40c8-a90c-7e69b7e59d85" mode="readonly" name="Envelope Fading Only" type="string"> 
     17        <value>True</value>  
     18        <description>If set to "True" fading doesn't affect the phase of the signal. Valid values "True" and "False"</description>  
    1419        <kind kindtype="configure"/> 
    1520    </simple>