Skip to content

Commit bde72a5

Browse files
committed
doc: Improved README
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
1 parent e09bc2d commit bde72a5

File tree

1 file changed

+44
-14
lines changed

1 file changed

+44
-14
lines changed

docs/README.md

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,26 @@ This is a non realistic channel model.
66
It models NxN independent paths each with a configurable attenuation
77
This attenuation can also be configured to change over time.
88

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
1010
`-at=<attenuation>`.
1111

1212
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>`
1414

1515
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>
2417

2518
Where:
2619

2720
* x is the transmitter number, x = 0..N-1
2821
* y is the receiver number y != x
2922
* N being the number of devices in the simulation
3023
* 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.
3326
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.
3429

3530
The file names can be either absolute or relative to `bin/`
3631

@@ -46,10 +41,10 @@ Therefore the channel model won't be called to reevaluate conditions during a
4641
packet unless the devices which are transmitting change.
4742

4843

49-
### The `<attenuation_file>`:
44+
### The `<timed_attenuation_file>`:
5045

5146
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.
5348
The times shall be in ascending order.<br>
5449
If the simulation time is found in the file, the channel will use the
5550
corresponding attenuation value.<br>
@@ -59,3 +54,38 @@ If the simulation time is before the first time value in the file, the
5954
channel will use the first atttenuation provided in the file.<br>
6055
If the simulation time is after the last time value in the file, the channel
6156
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

Comments
 (0)