Commit 0f484067 authored by laurent's avatar laurent

fix gaussain noise seed in rfsimulator

parent 6ba7c8e9
...@@ -149,8 +149,12 @@ void allocCirBuf(rfsimulator_state_t *bridge, int sock) { ...@@ -149,8 +149,12 @@ void allocCirBuf(rfsimulator_state_t *bridge, int sock) {
// while calling new_channel_desc_scm() with path losses = 0 // while calling new_channel_desc_scm() with path losses = 0
static bool init_done=false; static bool init_done=false;
if (!init_done) { if (!init_done) {
randominit(0); uint64_t rand;
tableNor(0); FILE *h=fopen("/dev/random","r");
fread(&rand,sizeof(rand),1,h);
fclose(h);
randominit(rand);
tableNor(rand);
init_done=true; init_done=true;
} }
ptr->channel_model=new_channel_desc_scm(bridge->tx_num_channels,bridge->rx_num_channels, ptr->channel_model=new_channel_desc_scm(bridge->tx_num_channels,bridge->rx_num_channels,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment