Skip to content

Commit 89909d0

Browse files
committed
[#1323] add DownlinkHandlingMsgPayload
1 parent 0854118 commit 89909d0

1 file changed

Lines changed: 58 additions & 0 deletions

File tree

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
ISC License
3+
4+
Copyright (c) 2026, Autonomous Vehicle Systems Lab, University of Colorado Boulder
5+
6+
Permission to use, copy, modify, and/or distribute this software for any
7+
purpose with or without fee is hereby granted, provided that the above
8+
copyright notice and this permission notice appear in all copies.
9+
10+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17+
18+
*/
19+
20+
#ifndef BASILISK_DOWNLINKHANDLINGMSG_H
21+
#define BASILISK_DOWNLINKHANDLINGMSG_H
22+
23+
#include <stdint.h>
24+
25+
/*! @brief Message for reporting downlink performance and data handling metrics */
26+
typedef struct {
27+
uint32_t linkActive; //!< [-] 1 if link-quality inputs are valid for downlink calculations
28+
uint32_t receiverIndex; //!< [-] Selected receiver antenna index (1, 2) or 0 if none
29+
uint64_t maxRetransmissions; //!< [-] Maximum ARQ retransmission attempts per packet
30+
char transmitterAntennaName[20]; //!< [-] Name of the selected transmitting antenna
31+
char receiverAntennaName[20]; //!< [-] Name of the selected receiving antenna
32+
char dataName[128]; //!< [-] Name of the data partition currently downlinked
33+
double timeStep; //!< [s] Module integration timestep
34+
double bandwidth; //!< [Hz] Link overlap bandwidth used in the calculation
35+
double bitRateRequest; //!< [bit/s] Requested channel bit rate
36+
double packetSizeBits; //!< [bit] Packet size used for BER-to-PER conversion
37+
double cnr; //!< [-] Selected C/N ratio (linear)
38+
double cnr_dB; //!< [dB] Selected C/N ratio in decibel
39+
double cNo_dBHz; //!< [dBHz] Carrier-to-noise density ratio
40+
double ebN0_dB; //!< [dB] Energy-per-bit to noise-density ratio
41+
double ber; //!< [-] Bit error rate
42+
double per; //!< [-] Packet error rate
43+
double packetSuccessProb; //!< [-] Packet success probability within max retransmissions
44+
double packetDropProb; //!< [-] Packet drop probability within max retransmissions
45+
double expectedAttemptsPerPacket; //!< [-] Expected number of attempts needed to complete one source packet
46+
double attemptedDataRate; //!< [bit/s] Attempted channel transmission rate including retransmissions
47+
double storageRemovalRate; //!< [bit/s] Data removed from spacecraft storage (success + drop)
48+
double deliveredDataRate; //!< [bit/s] Data delivered successfully to receiver
49+
double droppedDataRate; //!< [bit/s] Data dropped after reaching retransmission limit
50+
double availableDataBits; //!< [bit] Data available in selected storage partition at start of step
51+
double estimatedRemainingDataBits; //!< [bit] Estimated remaining data in selected partition after this step
52+
double cumulativeAttemptedBits; //!< [bit] Cumulative attempted bits including retransmissions
53+
double cumulativeRemovedBits; //!< [bit] Cumulative bits removed from storage
54+
double cumulativeDeliveredBits; //!< [bit] Cumulative successfully delivered bits
55+
double cumulativeDroppedBits; //!< [bit] Cumulative dropped bits
56+
} DownlinkHandlingMsgPayload;
57+
58+
#endif

0 commit comments

Comments
 (0)