Commit Graph

16 Commits

Author SHA1 Message Date
Eduardo Almeida
1f438ce6f4 Fix clang-tidy modernize-use-auto warnings 2023-09-18 00:36:46 +01:00
Eduardo Almeida
42d6eea6de Remove emacs lines from Python and C++ files 2023-05-23 16:20:52 +00:00
Eduardo Almeida
7c182618ed Fix clang-tidy readability-redundant-string-cstr warnings 2022-10-28 16:05:20 +00:00
Eduardo Almeida
dfc6fb9d2d Remove emacs comment from C++ files 2022-10-14 14:13:12 +00:00
Eduardo Almeida
e25ff966fe Apply clang-format to codebase 2022-10-07 20:08:35 +00:00
Eduardo Almeida
bdf80a8f85 Fix clang-tidy bugprone-too-small-loop-variable warnings (fixes #758) 2022-10-06 10:56:47 +00:00
Sébastien Deronne
793042d63f spectrum: Pass SpectrumSignalParameters to CalcRxPowerSpectralDensity 2022-07-15 15:30:18 +00:00
Tom Henderson
b6a5ee8151 Run utils/trim-trailing-whitespace.py on codebase 2022-06-05 21:01:11 -07:00
Gabriel Ferreira
e32c177e45 build: remove waf files, tests and references 2022-02-21 22:08:45 -03:00
Gabriel Ferreira
41aacec626 build: CMake refactoring
Includes:
- refactor build_lib and build_lib_example macros
    - unify src and contrib macros
    - replace macro with function not to leak definitions
    - parse list of arguments
- different cmake-format file for modules to list one item per line
2022-01-28 10:20:18 -03:00
bbojovic
a4b43d0132 spectrum: Move doppler term D and alpha and improve (Thanks to Sandra Lagen)
Co-authored-by: Sandra Lagen <sandra.lagen@cttc.es>

This commit also fixes an issue that was discovered during this implementation,
and that is that the stream was never assigned for the uniform random variable used for
the term D and alpha generation.

-Store term D and alpha into the channel params structure.
-Make sure to use correct angles and zenit of departure and arrival:
Save the direction of the generation of the channel params and channel matrix,
in order to know when regenerating channel matrix if the saved angles aoa, aod,
zoa and zod are of of s-to-u or u-to-s, so to properly use them.
- Simplify the type of the key of channel matrix map
- Remove unecessary if statements and abort replace by assert
- Add a more detailed description of the ThreeGppSpectrumPropagationLossModel changes
2022-01-22 11:43:28 +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
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
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
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