Commit Graph

283 Commits

Author SHA1 Message Date
bbojovic
f53c28229d spectrum, propagation: Fix the way channel condition is saved and checked if equal
It seems that is not the best way to save in the structure the pointer
to the channel condition model because the underlying condition,
and later when we compare the new condition with the old one, we
are basically comparing the underlying object with itself, because
we saved the pointer to it in the structure.

Instead we should save the concrete values of LOS and O2I condition
in the 3gpp structure, and then once the ChannelCondition state changes,
we can compare these saved values against the new once.
This could not be done when the pointer was being changed because pointer
was pointing to the same object.

This fixes basically the condition in 3gpp whether th channel needs to be
updated when condition changes.
2022-01-22 11:42:20 +01:00
bbojovic
2f0a4c9957 spectrum: Split 3gpp channel matrix and channel parameters into two different structures
-Create separate base structures for matrix and params in MatrixBasedChannelModel
-Change the key of m_channelParamsMap to be based on the pair of nodeIds instead of pair of antenna arrays:
Since the parameters in the m_channelParamsMap are common for all the channels among the same pair of nodes,
these parameters should be saved per the pair of node ids, instead per the pair of panels.
On the other hand, the map m_channelMatrixMap saves the channel matrixes per the pair of antenna arrays.
- Implement the update of the channel params and channel matrix of ThreeGppChannelModel
- Fix doxygen and remove unused structures in ThreeGppChannelModel
- Save 3gpp channel matrix and long term per antenna pair instead of node pair
- Split GetNewChannel function in two parts: parameter generation and matrix generation
- Split 3gpp channel matrix and parameters into two different structures
2022-01-22 03:45:09 +01:00
bbojovic
4ca8b12ea0 spectrum: Support passing the TX and RX PhasedArrayModel objects to spectrum model
This possibility is needed for the types of spectrum propagation models that need to have a pointer
to the TX and RX antenna arrays to perform calculations, such as e.g.,
ThreeGppSpectrumPropagationLossModel, which currently has hard limitation of having a maximum of 1
antenna array instance per device. ThreeGppSpectrumPropagationLossModel now inherits a new class
PhasedArraySpectrumPropagationLossModel. Its DoCalcRxPowerSpectralDensity function has now two
additional parameters: TX and RX antenna arrays. Also, AddDevice function is removed from
ThreeGppSpectrumPropagationLossModel, because it is not anymore needed to specify for each
device its TX/RX antenna, since these are now passed as parameters. Hence, to use
ThreeGppSpectrumPropagationLossModel, when implementing Spectrum PHY features,
modules should implement the function of SpectrumPhy GetAntenna to return the instance of
PhasedArrayModel of that SpectrumPhy. These instances will be passed by MultiModelSpectrumChannel
(one of the core classes in the spectrum module) to propagation classes, children of
PhasedArraySpectrumPropagationLossModel, when it is necessary to DoCalcRxPowerSpectralDensity to
callculate the propagation loss.

Additionally: Fixed pair key generation for 3gpp channel model: Previous implementation was
using a cantor function of two integer of 32 bits and as a results was giving a unique
representatio of 32 bits. This is wrong, because such function needed even more than 64
bits to represent that value. Even if in ns-3 simulation we are not going to have such large
node numbers, we should fix this. Instead of just changing 64 bits from cantor function, I propose to
replace the cantor function with just simple concatenation of two 32 bits.

I also propose moving min and max inside of the function, to prevent some eventual future errors
in using GetKey, because with the previous implementation there was assumption that who calls GetKey
will previously sort its parameters, and first provide the min value, and then the max value,
and this was not even documented.
2022-01-22 03:42:49 +01:00
Tom Henderson
aad79536bf bindings: Rescan all APIs 2021-12-18 16:41:52 -08:00
Eduardo Almeida
4ebdc0c6c6 Mark deleted ctors and operator= with delete keyword 2021-12-18 15:22:44 -08:00
Gabriel Ferreira
a893eba7e3 build: Fix CMake and ns3 script bugs, add a test suite and fix formatting 2021-12-05 21:53:49 +00:00
Gabriel Ferreira
9c876c7f5a CMake buildsystem 2021-12-01 12:29:55 -08:00
Gabriel Arrobo
78c116e32a Formatting changes
* Ran check-style script)
* Moved variables to inside for loops
* Addressed Doxygen warnings
* Removed unused variable (H_NLOS)
* Renamed variables as per ns-3 coding style
2021-11-27 08:37:10 -08:00
Gabriel Arrobo
c527506471 Avoid multiple log and sqrt calculations for the same value(s) 2021-11-27 08:36:34 -08:00
Gabriel Arrobo
262fe14fe7 Code simplifications 2021-11-27 08:36:34 -08:00
Gabriel Arrobo
b7ab6aa5d2 changed exp^(0 + xi) to cos(x) + i*sin(x) 2021-11-27 08:36:34 -08:00
Tom Henderson
4e9afa965d bindings: Rescan all APIs 2021-09-27 11:18:37 -07:00
Tom Henderson
24d671704a spectrum: Avoid possible use of null pointer 2021-08-21 18:02:01 -07:00
Sandra Lagen
a4598e8236 antenna: Extend UniformPlanarArray to have a configurable polarization slant angle
see MR !674
2021-07-30 18:20:03 +02:00
Stefano Avallone
cd400c6e17 spectrum: Fix more doxygen warnings 2021-07-22 10:58:33 +02:00
Stefano Avallone
3a70eaf365 spectrum: Add SpectrumModel move constructor 2021-07-22 07:29:42 +00:00
Sharan Naribole
66103475c0 spectrum: Update SpectrumModel constructor arguments
Add const & qualifier to SpectrumModel constructor arguments
2021-07-22 07:29:42 +00:00
Gabriel Ferreira
d821acaf85 wifi: speed up SpectrumWifiPhy::StartRx 2021-07-22 07:26:01 +00:00
Stefano Avallone
84a42ee26d spectrum: Fix doxygen warning 2021-07-21 15:45:14 +02:00
Tom Henderson
667715cac4 bindings: Rescan all APIs 2021-06-24 16:35:40 -07:00
Tom Henderson
f3c82116fa spectrum: Update Python bindings 2021-04-10 18:59:00 -07:00
Mattia Lecci
2cfcebe0d0 antenna: (merges !481) Update antenna module
- Introduce PhasedArrayModel
- Use the new PhasedArrayModel framework across modules (e.g., 3gpp channel model)
- Improve Angles class. Furthermore, Angles has been translated from elevation to inclination and from degrees to radians
- Update antenna module doc
- Fix random angle generation for the 3gpp channel model. Specifically, cluster and sub-cluster angles might be generated with inclination angles outside the inclination range [0, pi], and have now been fixed.
2021-04-10 18:59:00 -07:00
Tom Henderson
a3d5b5a971 bindings: Rescan APIs for core, mesh, netanim, spectrum, wave, wifi 2021-03-10 16:21:44 -08:00
Nitya Chandra
6222fd44c7 spectrum: (fixes #195) Add const qualifier to all SpectrumPhy getters 2021-03-01 11:02:01 -08:00
Sébastien Deronne
ec91858b92 wifi: Add function to create OFDMA TX PSD 2021-02-07 13:11:52 +01:00
Tom Henderson
4a661dc399 bindings: Rescan all APIs 2020-12-30 14:21:24 -08:00
Tom Henderson
6002d927bc bindings: Rescan all APIs 2020-12-21 21:18:58 -08:00
Tommaso Zugno
0891fa9118 propagation: (merges !435) Channel condition model for vehicular scenarios
This work was done in collaboration with Zoraze Ali and Sandra Lagen.
2020-11-28 20:17:05 -08:00
Tom Henderson
e7d9dff35e spectrum: Rescan APIs 2020-11-13 18:59:03 -08:00
Sébastien Deronne
bdb3bfc22f wifi: Add option to configure the OFDM transmit spectrum mask 2020-11-13 10:17:43 +01:00
Sébastien Deronne
d865245632 spectrum: Speed up computations in DEBUG builds (proposal from Rediet) 2020-11-12 13:02:11 +01:00
Sebastien Deronne
7d7bf0e0f8 wifi: Rework InterferenceHelper to handle calculations per [band start index; band stop index] pair 2020-11-12 13:02:11 +01:00
Tom Henderson
9bfa3bd724 bindings: Rescan all APIs 2020-10-03 14:21:45 -07:00
Kim Ferrari
ede6419fc5 spectrum: Update NS_LOG print format for ns3::Time 2020-09-28 09:24:03 -07:00
Natale Patriciello
47e9dee1fd spectrum: Replace std::shuffle with customized shuffle to control the channel randomness
see merge request !412
2020-09-15 23:38:08 +02:00
Tom Henderson
8c6fb7d420 bindings: Rescan all APIs 2020-09-05 13:04:28 -07:00
Steven Smith
dded72e02e build: (fixes #217) Guard compilation of example used as a test
* Added documentation to ExampleAsTestSuite on the need for this guarding
* Updated with Peter's patch for examples-as-test placeholders in wscripts
2020-06-08 09:35:50 -07:00
Tom Henderson
5eea3c0270 bindings: Rescan all APIs 2020-06-07 11:38:26 -07:00
Tommaso Zugno
54c788d74e spectrum: fix wrong usage of atan 2020-06-04 19:18:46 +02:00
Tom Henderson
c43242d599 Fix compilation issue 2020-05-19 21:56:04 -07:00
Tommaso Zugno
5f2a109a0c Fix valgrind error 2020-05-19 09:25:38 +02:00
Tom Henderson
2cfae1559c spectrum: Update bindings 2020-05-15 22:13:51 -07:00
mychele
570acaeed9 spectrum: (merges !257) Finalize matrix-based channel models
* Make ThreeGppChannelMatrix private
* Add copy
* Address review
* Fix typo in doxygen comment
2020-05-15 22:16:34 -07:00
Tommaso Zugno
3abab98fb7 spectrum: Small fixes to MR !257 (matrix-based channel models) 2020-05-15 22:15:30 -07:00
mychele
a0b58934d3 spectrum: (merges !257) Matrix-based channel models
* Make ThreeGppChannelModel inherit from a new interface.
 * Update three-gpp-spectrum-propagation-loss-model
 * Define ThreeGppChannelMatrix
2020-05-15 22:15:03 -07:00
Gabriel Arrobo
85e456d1b1 build: Removed unused include and set dependencies back to previous status 2020-05-15 21:16:35 -07:00
Gabriel Arrobo
71a8b54ae1 build: Fix dependency error in spectrum module
When enabling only the wifi module (./waf configure --enable-examples
--enable-tests --disable-python --enable-modules=wifi), there is a
dependency error with three-gpp-channel-test-suite.cc (spectrum module)
because it includes buildings-channel-condition-model.h (buildings module)
2020-05-15 21:15:33 -07:00
Tom Henderson
e99ae43138 bindings: rescan all APIs 2020-05-11 22:07:00 -07:00
Tom Henderson
aaa7074833 spectrum: Fix Config::Connect path for trace source in example 2020-05-05 21:26:05 -07:00
Natale Patriciello
bc65cf4f50 doc: Fix greek letters within model documentation
In Europe, people are advanced and use an UTF-* compatible charset, that
permits them to use many more letters than countries that
rely on ASCII. Unfortunately, latex still doesn't recognize all
these new character, so we have to use special escape sequences.

Close #188
2020-05-05 10:31:34 +02:00