Posts

NR-V2X Mode 2 in ns-3 In 5G NR-V2X, vehicles communicate directly using sidelink. Two modes exist: Mode 1: gNB schedules sidelink resources. Mode 2: UEs autonomously select sidelink resources (no gNB needed). Mode 2 is especially important for vehicular networks (IoV), where cars must exchange safety messages without relying on infrastructure. In ns-3, the NrHelper class is used to: Create UE devices with sidelink PHY/MAC layers. Attach them to Bandwidth Parts (BWPs) and spectrum channels. Configure sidelink attributes such as: SidelinkMode = 2 (autonomous) SidelinkPeriod (resource pool periodicity) SidelinkSubchannelSize (RB grouping)
Understanding ns-3 Headers When writing ns-3 simulation scripts, we include different modules using #include . Each header unlocks a set of features: core-module.h Provides the simulation engine: Simulator , Time , logging, and configuration system. network-module.h Defines basic networking primitives: Node , NetDevice , Packet , and Channel . mobility-module.h Lets you assign positions and movement patterns to nodes using mobility models (e.g., constant position, random walk). internet-module.h Implements the Internet stack: IPv4/IPv6, TCP, UDP, and routing protocols. This is needed if you want to run applications over IP. nr-module.h The 5G New Radio (NR) module. Provides helpers, PHY/MAC models, Bandwidth Parts (BWPs), and propagation models for simulating 5G networks. Together, these headers give you the building blocks to create complex scenarios — from basic node placement to full 5G IoV simulations.
Why C++23 is a Game Changer: std::expected Modern C++ is moving away from clunky, slow error handling. In C++23 , we finally have a way to return either a value or an error without the overhead of try-catch blocks. #include <expected> #include <string> // C++23 way to handle potential failures std::expected< int , std::string> divide ( int a, int b) { if (b == 0 ) return std:: unexpected ( "Cannot divide by zero!" ); return a / b; } The 3 Major Advantages Zero Exceptions: No more "crashing" the program or using slow try-catch logic. Type Safety: The compiler forces you to acknowledge the possibility of an error before you can access the result. Better Performance: It is significantly faster than traditional exception handling, making it ideal for high-performance systems and Arduino/Embedded development. ...
Why SSH is Better Than HTTPS for GitHub – Complete Setup Guide Why SSH is Better Than HTTPS for GitHub – A Complete Developer Guide If you have ever seen this error while pushing to GitHub: remote: Invalid username or token. Password authentication is not supported for Git operations. then this article is for you. GitHub no longer supports password authentication for HTTPS pushes. Developers must now use either a Personal Access Token (PAT) or SSH. In this guide, I will explain why SSH is the better long-term solution and how to set it up properly. HTTPS vs SSH – What’s the Difference? Using HTTPS Requires username and password (or token) Tokens can expire Login prompts appear frequently Can cause authentication errors Using SSH No password required after setup Secure key-based authe...
Image
How to Remove a Comma in PowerPoint Without Affecting Colors While preparing an event slide, I noticed a small formatting issue: there was an unnecessary comma after February . Instead of redesigning the entire banner, I fixed it directly in PowerPoint — without affecting the original colors. 🔹 Before (With Comma) Notice the comma after February . 🔹 After (Comma Removed) The comma has been removed while maintaining the exact same font style, size, and color. 💡 Method Used (PowerPoint Trick) Select the text box. Carefully delete the comma. If spacing shifts, adjust character spacing slightly. Ensure font color and formatting remain unchanged. This simple adjustment keeps your design professional and clean, especially for official academic or event slides. Tip: Small punctuation details can make a big difference in formal presentations.
Image
Euclidean Distance in NR-V2X Mode 2 In wireless networks like NR-V2X Mode 2 (New Radio Vehicle-to-Everything, sidelink mode where vehicles autonomously select resources), measuring the distance between vehicles or signals is critical for efficient communication. One common metric is the Euclidean distance . What is Euclidean Distance? Euclidean distance is the "straight-line" distance between two points in space. Mathematically, for two points P1(x1, y1) and P2(x2, y2) in 2D space, it is: d = √((x2 - x1)² + (y2 - y1)²) In 3D, or higher dimensions, you just add more squared differences for each coordinate. Why is it Useful in NR-V2X Mode 2? Resource Selection: Vehicles in Mode 2 autonomously pick radio resources. Knowing the Euclidean distance between vehicles helps avoid interference, because distant vehicles can reuse the same resources without collision. Collision Avoidance: Signals from nearby vehicles are more likely to collide. By ...
Image
Understanding Maximum Network Resources In wireless networks and communication systems, devices like smartphones, smart vehicles, or IoT sensors need resources to communicate effectively. These resources are the "tools" the network provides so data can flow smoothly. Bandwidth: Think of bandwidth as the width of a highway. A wider highway can allow more cars (data) to travel simultaneously. Higher bandwidth means more data can be sent at the same time. Data Rate: This is how fast the data moves across the network, like the speed of a car on the highway. Higher data rates mean information reaches the destination faster. Maximum Resource Allocation: Every network has limits. The maximum amount of resources refers to the upper limit the network can give a device at a time, such as the largest chunk of bandwidth or the fastest data rate it can handle. When planning networks or designing algorithms like Deep Q-Networks (DQN) for smart v...