@@ -6,31 +6,26 @@ This is a non realistic channel model.
6
6
It models NxN independent paths each with a configurable attenuation
7
7
This attenuation can also be configured to change over time.
8
8
9
- The default atennuation for all paths is set with the command line options
9
+ The default atennuation for all paths is set with the command line option
10
10
` -at=<attenuation> ` .
11
11
12
12
A file can be used to set the attenuation for some/all of the individual paths.
13
- This file is specified with the command line option ` -file=<attenuations_file > `
13
+ This file is specified with the command line option ` -file=<att_matrix_file > `
14
14
15
15
This file shall have one separate line per path like:<br >
16
- ` x y : {value|"<attenuation_file>"} ` <br >
17
- e.g.:
18
- ```
19
- 1 2 : 65
20
- 2 1 : 65
21
- 1 3 : "/myfolder/att_file.txt"
22
- 3 1 : "/myfolder/att_file.txt"
23
- ```
16
+ ` x y : {value|"<timed_attenuation_file>"} ` <br >
24
17
25
18
Where:
26
19
27
20
* x is the transmitter number, x = 0..N-1
28
21
* y is the receiver number y != x
29
22
* N being the number of devices in the simulation
30
23
* value is a floating point value in dB
31
- * ` <attenuation_file > ` : is the path to a ` <attenuation_file > ` as described
32
- below which applies to that path
24
+ * ` <timed_attenuation_file > ` : is the path to a ` <timed_attenuation_file > ` as
25
+ described below which applies to that path.
33
26
Note that this file name shall be provided in between ` "" `
27
+ * Not all paths need to be provided. Those omited will default to the attenuation
28
+ provided from the command line.
34
29
35
30
The file names can be either absolute or relative to ` bin/ `
36
31
@@ -46,10 +41,10 @@ Therefore the channel model won't be called to reevaluate conditions during a
46
41
packet unless the devices which are transmitting change.
47
42
48
43
49
- ### The ` <attenuation_file > ` :
44
+ ### The ` <timed_attenuation_file > ` :
50
45
51
46
This file contains 2 columns, the first column represents time in
52
- microseconds, and the second column the attenuation at that given time.
47
+ microseconds (an integer value) , and the second column the attenuation at that given time.
53
48
The times shall be in ascending order.<br >
54
49
If the simulation time is found in the file, the channel will use the
55
50
corresponding attenuation value.<br >
@@ -59,3 +54,38 @@ If the simulation time is before the first time value in the file, the
59
54
channel will use the first atttenuation provided in the file.<br >
60
55
If the simulation time is after the last time value in the file, the channel
61
56
will use the last attenuation provided in the file.<br >
57
+
58
+ ### The ` -atextra=<extra_attenuation> ` command line option:
59
+
60
+ You can provide an extra attenuation to be added to all paths, independently of
61
+ how their attenuation was originally calculated, with the ` -atextra ` command line
62
+ option.
63
+ This ` extra_attenuation ` value will just be added to all paths.
64
+
65
+ ### An example:
66
+
67
+ ` ./bs_2G4_phy_v1 -D=3 -s=Hola -channel=multiatt -argschannel -at=40 -file=paths_att_file.txt `
68
+
69
+ ` paths_att_file.txt ` :
70
+ ```
71
+ 0 1 : 65
72
+ 1 0 : 65
73
+ 0 2 : "/myfolder/att_file.txt"
74
+ 2 0 : "/myfolder/att_file.txt"
75
+ #Note that the paths from 1<->2 are not specified. They will default to the -at command line parameter
76
+ ```
77
+
78
+ ` att_file.txt ` :
79
+ ```
80
+ 1000000 60
81
+ 11000000 120
82
+ 11000001 60
83
+ ```
84
+
85
+ With this configuration, the radio traffic between device:
86
+
87
+ * device 0 and device 1 will have an attenuation of 65dB
88
+ * device 0 and device 2 will have an attenuation of
89
+ * 60dB up to the first second
90
+ * An increasing attenuation between 60->120 dB, between the first second and the 11th. At a rate of 6dB per second
91
+ * A sudden reduction in the attenuation to 60 dB right after, which is maintained thereafter.
0 commit comments