From 344f16099e1b281e616d24c04602952519daea41 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 19 Mar 2024 11:48:24 +0100 Subject: [PATCH] test script --- scripts/raw-analysis.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 scripts/raw-analysis.py diff --git a/scripts/raw-analysis.py b/scripts/raw-analysis.py new file mode 100755 index 0000000..acad4d4 --- /dev/null +++ b/scripts/raw-analysis.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python3 +from base64 import b64decode +from spacepackets.ccsds.time import CdsShortTimestamp +from spacepackets.ecss.tm import PusTelemetry +from spacepackets.ecss.pus_1_verification import Service1Tm, UnpackParams + +bruh = "CGX6cQAdIAEIOzcAAEBedwUTOzkYZe5WAAEAAAAAAAAAAF4z" +data = b64decode(bruh) +tm = PusTelemetry.unpack(data, CdsShortTimestamp.empty()) +srv1_tm = Service1Tm.from_tm( + tm, UnpackParams(time_reader=CdsShortTimestamp.empty(), bytes_err_code=2) +) +print(f"service {tm.service} subservice {tm.subservice}") +print(f"error code: {srv1_tm.error_code}") -- 2.43.0