You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added :ref:`downlinkHandling` with a validated configuration interface (setters/getters), finite-value guards, and bounded outputs to prevent non-physical downlink rates.
2
+
- Added :ref:`DownlinkHandlingMsgPayload` diagnostics and dedicated unit-test coverage for equation parity, receiver-path selection, storage-limited behavior, and invalid-input handling.
3
+
- Improved storage-target selection robustness across connected storage status messages and aligned module documentation with implemented behavior and validation interface.
- Storage state input (partition names, partition bits, total storage level).
53
-
- Required for actual data removal
53
+
- Required for actual data removal; actual removal is currently limited to a single linked storage unit
54
54
* - ``nodeDataOutMsg``
55
55
- :ref:`DataNodeUsageMsgPayload`
56
56
- Data-node output inherited from ``DataNodeBase``. Negative baud rate removes bits from storage.
@@ -67,7 +67,7 @@ The module extends ``DataNodeBase`` and runs once per simulation step.
67
67
The per-step sequence is:
68
68
69
69
1. Read ``LinkBudgetMsgPayload`` and all connected storage status messages.
70
-
2. Select one storage partition (largest currently available data in the most recently connected storage unit).
70
+
2. Select one candidate storage target (largest finite partition across all connected storage status messages; use ``storageLevel`` only when a message has no partition vector).
71
71
3. Select receiver path (forced receiver index or auto mode).
72
72
4. Convert selected CNR and overlap bandwidth into :math:`C/N_0`.
73
73
5. Convert :math:`C/N_0` and requested bit rate into :math:`E_b/N_0`.
@@ -77,6 +77,11 @@ The per-step sequence is:
77
77
9. Apply packet gating and storage saturation.
78
78
10. Write ``nodeDataOutMsg`` and ``downlinkOutMsg``.
79
79
80
+
The candidate-selection logic can inspect multiple storage status messages, but actual storage removal is intentionally conservative:
81
+
``nodeDataOutMsg`` carries only ``dataName`` and ``baudRate``, so it cannot safely target one specific storage unit when multiple
82
+
storage units are linked. In that case, downlinkHandling reports the selected candidate in diagnostics but forces removal to zero
83
+
for that step to avoid silent cross-unit corruption.
84
+
80
85
Configurable Parameters
81
86
^^^^^^^^^^^^^^^^^^^^^^^
82
87
@@ -93,22 +98,41 @@ Configurable Parameters
93
98
- bit/s
94
99
- Requested raw channel bit rate :math:`R_b`. If :math:`R_b \le0`, throughput is zero.
95
100
* - ``packetSizeBits``
96
-
- 256.0
101
+
- 256
97
102
- bit
98
103
- Packet length :math:`L` for BER-to-PER conversion.
99
104
* - ``maxRetransmissions``
100
105
- 10
101
-
- -
106
+
-
102
107
- Retry cap used in the ARQ model. Current implementation enforces :math:`N \ge1` and treats :math:`N` as maximum transmission attempts.
3. :ref:`downlinkHandling` converts link quality to effective data transfer and storage removal.
253
287
4. Storage modules consume ``nodeDataOutMsg`` and reduce onboard buffered data.
254
288
289
+
.. warning::
290
+
291
+
Also important integration note:
292
+
Do not run ``spaceToGroundTransmitter`` and ``downlinkHandling`` as competing downlink removers
293
+
on the same storage partitions. Pick one downlink path.
294
+
255
295
This separation is useful for fault modeling: upstream RF degradation (pointing, frequency mismatch,
256
296
atmospheric attenuation, receive-state changes) naturally propagates into BER/PER and delivered data.
257
297
@@ -263,7 +303,10 @@ Assumptions and Current Limits
263
303
- Any bit error fails the packet.
264
304
- ARQ is expectation-based, not packet-by-packet Monte Carlo.
265
305
- No explicit ACK latency, coding gain, framing overhead, or adaptive coding/modulation.
266
-
- Storage partition selection currently targets the largest partition in the latest connected storage unit.
306
+
- ``REMOVE_DELIVERED_ONLY`` preserves dropped/undelivered bits onboard, but the module still uses an expected-rate ARQ model instead of explicit packet ACK/NACK timelines.
307
+
- Storage target selection prioritizes per-partition values. ``storageLevel`` is only used as fallback for messages that do not provide ``storedData`` entries.
308
+
- ``nodeDataOutMsg`` identifies storage by ``dataName`` only and cannot address a specific storage unit. Accordingly, downlinkHandling forces removal to zero whenever more than one storage unit is linked through ``addStorageUnitToDownlink``. Multi-storage status inspection is still supported for diagnostics and candidate selection, but actual removal currently requires a single linked storage unit.
309
+
- If a selected storage status message does not provide an explicit partition name, downlinkHandling also forces removal to zero for that step and emits an empty ``nodeDataOutMsg.dataName`` rather than emitting an aggregate negative rate that downstream storage cannot route safely.
267
310
268
311
Unit Test Coverage
269
312
------------------
@@ -276,22 +319,31 @@ The tests verify:
276
319
- equation parity versus a Python-equivalent BER/PER/ARQ model
277
320
- zero-flow behavior for invalid link inputs
278
321
- retry-cap effects on drop probability and removal/delivery behavior
322
+
- removal-policy behavior (``REMOVE_ATTEMPTED`` vs ``REMOVE_DELIVERED_ONLY``)
279
323
- storage-limited rate capping and drain behavior
280
324
- automatic receiver selection from antenna RX states and CNR values
325
+
- duplicate-storage input rejection
326
+
- storage-target selection across multiple storage status messages
327
+
- conservative removal blocking when more than one storage unit is linked
328
+
- conservative removal blocking when a selected partition has no explicit name
329
+
- ambiguous duplicate partition-name behavior across multiple storage status messages
330
+
331
+
User Guide
332
+
----------
281
333
282
-
Usage Snippet
283
-
-------------
334
+
Basic setup example:
284
335
285
336
.. code-block:: python
286
337
287
338
from Basilisk.simulation import downlinkHandling, simpleStorageUnit
288
339
289
340
dlh = downlinkHandling.DownlinkHandling()
290
-
dlh.bitRateRequest =1.0e5# bit/s
291
-
dlh.packetSizeBits =1024.0# bit
292
-
dlh.maxRetransmissions =8
293
-
dlh.receiverAntenna =0# auto-select valid RX path with highest CNR
294
-
dlh.requireFullPacket =True
341
+
dlh.setBitRateRequest(1.0e5) # [bit/s]
342
+
dlh.setPacketSizeBits(1024) # [bit]
343
+
dlh.setMaxRetransmissions(8) # [-]
344
+
dlh.setReceiverAntenna(0) # [-] auto-select valid RX path with highest CNR
0 commit comments