Skip to content

Introduction of downlinkHandling module to communication architecture#1323

Merged
dhutererprats merged 11 commits into
developfrom
downlinkHandling
Apr 16, 2026
Merged

Introduction of downlinkHandling module to communication architecture#1323
dhutererprats merged 11 commits into
developfrom
downlinkHandling

Conversation

@dhutererprats
Copy link
Copy Markdown
Contributor

@dhutererprats dhutererprats commented Mar 11, 2026

  • Tickets addressed: TBD (bsk-xxxx)
  • Review: By commit
  • Merge strategy: Merge (no squash)

Description

This PR introduces the downlinkHandling communication module and all supporting interfaces, tests, and documentation required to use and validate it in Basilisk.

The module maps link quality from linkBudget into usable downlink outcomes, including:

  • BER/PER from CNR, overlap bandwidth, and user-selected bit rate
  • retry-limited ARQ success/drop behavior
  • attempted, delivered, dropped, and storage-removal data rates
  • storage-aware downlink gating and drain behavior
  • receiver-path selection using CNR1/CNR2 and antenna RX state
  • diagnostic outputs for communication fault analysis and integrated simulation studies

The current analytical BER path uses the standard coherent BPSK/QPSK-style AWGN BER expression. User-selectable modulation/coding models and empirical BER lookup tables are intentionally left as future extensions.

Core implementation and integration work includes:

  • New downlink message payload and diagnostics fields:

    • src/architecture/msgPayloadDefC/DownlinkHandlingMsgPayload.h
  • New/hardened downlinkHandling module implementation and interface:

    • src/simulation/communication/downlinkHandling/downlinkHandling.h
    • src/simulation/communication/downlinkHandling/downlinkHandling.cpp
    • src/simulation/communication/downlinkHandling/downlinkHandling.i
    • src/simulation/communication/downlinkHandling/Custom.cmake
  • Unit test coverage:

    • src/simulation/communication/downlinkHandling/_UnitTest/test_downlinkHandling.py
  • Documentation and figures:

    • src/simulation/communication/downlinkHandling/downlinkHandling.rst
    • src/simulation/communication/downlinkHandling/_Documentation/Images/DownlinkHandlingFlow.png
    • src/simulation/communication/downlinkHandling/_Documentation/Images/DownlinkHandlingReliabilityChain.png
    • src/simulation/communication/downlinkHandling/_Documentation/Images/DownlinkHandlingFlow.svg
    • src/simulation/communication/downlinkHandling/_Documentation/Images/DownlinkHandlingReliabilityChain.svg
  • Release note snippet:

    • docs/source/Support/bskReleaseNotesSnippets/downlinkHandling.rst

Commit organization is by feature layer:

  1. Core downlinkHandling module and SWIG interface
  2. Downlink diagnostics message payload
  3. Module code comments and documentation
  4. Unit test implementation and validation expansion
  5. API hardening, setter validation, removal policy, and storage-routing safeguards
  6. Documentation figures and release-note snippet updates

Verification

Validation commands for this branch:

  • cmake --build dist3 -j4
  • .venv/bin/pytest -q -p no:rerunfailures src/simulation/communication/downlinkHandling/_UnitTest/test_downlinkHandling.py

Test coverage includes:

  • C++ output parity with a Python-equivalent BER/PER/ARQ formulation
  • invalid-link zero-flow behavior
  • disabled-node behavior, including stale-diagnostics clearing
  • re-enable behavior ensuring disabled downtime is not integrated as active downlink time
  • retry-cap behavior and drop probability effects
  • removal policy behavior (REMOVE_ATTEMPTED vs REMOVE_DELIVERED_ONLY)
  • storage-limited capping and drain behavior
  • auto and forced receiver-path selection (CNR1/CNR2, antenna RX states)
  • invalid setter input rejection and retained prior valid configuration
  • duplicate storage-message registration rejection
  • largest-partition selection across multiple storage status inputs
  • ambiguous multi-storage partition-name protection, where removal is blocked and a BSK warning is emitted to avoid silent double-draining

Documentation

Documentation delivered in:

  • src/simulation/communication/downlinkHandling/downlinkHandling.rst

It includes:

  • model scope, assumptions, and integration role
  • implemented equations (C/N0, Eb/N0, BER, PER, retry-limited ARQ, throughput scaling)
  • message interfaces and outputs
  • receiver-path selection behavior
  • removal-policy semantics
  • storage-selection behavior and integration caveats
  • warning that spaceToGroundTransmitter and downlinkHandling should not be used as competing downlink removers on the same storage partitions
  • usage and validation guidance

Future work

  • Add explicit packet-level ACK/NACK timing model. The current ARQ implementation is expectation-based.
  • Add user-selectable modulation/coding models.
  • Add empirical or semi-empirical BER lookup-table support for fault studies and communication degradation campaigns.

@dhutererprats dhutererprats self-assigned this Mar 11, 2026
@dhutererprats dhutererprats added the enhancement New feature or request label Mar 11, 2026
@dhutererprats dhutererprats force-pushed the downlinkHandling branch 2 times, most recently from f6af0cf to 3be776c Compare March 11, 2026 02:35
@dhutererprats
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3be776cccd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/simulation/communication/downlinkHandling/downlinkHandling.cpp Outdated
@dhutererprats dhutererprats force-pushed the downlinkHandling branch 2 times, most recently from 5ba35e8 to edec469 Compare March 12, 2026 01:01
@dhutererprats
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: edec469cda

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/simulation/communication/downlinkHandling/downlinkHandling.cpp Outdated
@dhutererprats dhutererprats force-pushed the downlinkHandling branch 2 times, most recently from 72e48b4 to 76f68ab Compare March 12, 2026 01:39
@dhutererprats
Copy link
Copy Markdown
Contributor Author

@codex review

@dhutererprats dhutererprats moved this to 🏗 In progress in Basilisk Mar 12, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 76f68abd32

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/simulation/communication/downlinkHandling/downlinkHandling.cpp Outdated
dhutererprats added a commit that referenced this pull request Mar 12, 2026
dhutererprats added a commit that referenced this pull request Mar 12, 2026
dhutererprats added a commit that referenced this pull request Mar 12, 2026
dhutererprats added a commit that referenced this pull request Mar 12, 2026
dhutererprats added a commit that referenced this pull request Mar 12, 2026
@dhutererprats
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e2ed86a9fc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/simulation/communication/downlinkHandling/downlinkHandling.cpp
@dhutererprats dhutererprats moved this from 🏗 In progress to 👀 In review in Basilisk Apr 14, 2026
@dhutererprats dhutererprats marked this pull request as ready for review April 14, 2026 06:12
@dhutererprats dhutererprats requested a review from a team as a code owner April 14, 2026 06:12
@dhutererprats dhutererprats requested a review from schaubh April 14, 2026 06:12
Copy link
Copy Markdown
Contributor

@schaubh schaubh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice PR. Even Codex commented on how detailed your RST documentation is ;-)

Just saw a few minor things, should be quick to address.

Comment thread src/simulation/communication/downlinkHandling/downlinkHandling.cpp
Comment thread src/architecture/msgPayloadDefC/DownlinkHandlingMsgPayload.h Outdated
Comment thread src/simulation/communication/downlinkHandling/downlinkHandling.rst Outdated
Comment thread src/simulation/communication/downlinkHandling/downlinkHandling.rst Outdated
Comment thread src/simulation/communication/downlinkHandling/downlinkHandling.rst Outdated
Comment thread src/simulation/communication/downlinkHandling/downlinkHandling.rst
Comment thread src/simulation/communication/downlinkHandling/downlinkHandling.i Outdated
Comment thread src/simulation/communication/downlinkHandling/downlinkHandling.i Outdated
Comment thread src/simulation/communication/downlinkHandling/downlinkHandling.h Outdated
Comment thread src/simulation/communication/downlinkHandling/downlinkHandling.cpp
Copy link
Copy Markdown
Contributor

@schaubh schaubh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, great PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants