From e6aa9ae25ae8fc2a213df6f55fff65bb3492fcc6 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Wed, 22 May 2024 17:34:11 +0200 Subject: [PATCH] Updated utility --- docs/utilities/rns_audio_call_calc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/utilities/rns_audio_call_calc.py b/docs/utilities/rns_audio_call_calc.py index 64f339d..9c9fd81 100644 --- a/docs/utilities/rns_audio_call_calc.py +++ b/docs/utilities/rns_audio_call_calc.py @@ -59,7 +59,7 @@ def simulate(link_speed=9600, audio_slot_ms=70, codec_rate=1200, method="msgpack BLOCK_HEADROOM = (REQUIRED_BLOCKS*BLOCKSIZE) - PL_LEN - 1 # The complete on-air packet length - PACKET_LEN = PHY_OVERHEAD+RNS_OVERHEAD+PL_LEN + PACKET_LEN = PHY_OVERHEAD+RNS_OVERHEAD+ENCRYPTED_PAYLOAD_LEN PACKET_LATENCY = round(PACKET_LEN*PER_BYTE_LATENCY_MS, 1) # TODO: This should include any additional @@ -70,7 +70,7 @@ def simulate(link_speed=9600, audio_slot_ms=70, codec_rate=1200, method="msgpack # Calculate latencies TRANSPORT_LATENCY = round((PHY_OVERHEAD+RNS_OVERHEAD)*PER_BYTE_LATENCY_MS, 1) - PAYLOAD_LATENCY = round(PL_LEN*PER_BYTE_LATENCY_MS, 1) + PAYLOAD_LATENCY = round(ENCRYPTED_PAYLOAD_LEN*PER_BYTE_LATENCY_MS, 1) RAW_DATA_LATENCY = round(AUDIO_LEN*PER_BYTE_LATENCY_MS, 1) PACKING_LATENCY = round(PACKING_OVERHEAD*PER_BYTE_LATENCY_MS, 1) @@ -86,6 +86,7 @@ def simulate(link_speed=9600, audio_slot_ms=70, codec_rate=1200, method="msgpack print( "\n === Simulation Parameters ===") print(f" Packing method : {method}") print(f" Sampling delay : {TARGET_MS}ms") + print(f" Codec bitrate : {CODEC_RATE} bps") print(f" Audio data : {AUDIO_LEN} bytes") print(f" Packing overhead : {PACKING_OVERHEAD} bytes") print(f" Payload length : {PL_LEN} bytes")