Compare commits

..

11 Commits

Author SHA1 Message Date
7721a57a67 Merge pull request 'dependency fix' (#303) from tmtc-dep-fix into main
Reviewed-on: #303
2025-02-10 14:44:37 +01:00
d1f92f7aed dependency fix 2025-02-10 14:42:12 +01:00
6e85b1add8 Merge pull request 'prep next release' (#302) from prep-v7.2.0 into main
Reviewed-on: #302
2025-01-17 11:25:20 +01:00
73a7c6ec14 Merge remote-tracking branch 'origin/main' into prep-v7.2.0 2025-01-17 11:22:29 +01:00
28161059ca Merge pull request 'Mode handling fix' (#300) from mode-handling-fix into main
Reviewed-on: #300
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2025-01-17 11:22:01 +01:00
52d434630b prep next release 2025-01-17 11:09:23 +01:00
55a357b52c Merge branch 'main' into mode-handling-fix
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2024-05-28 09:40:46 +02:00
20489a02d2 fix for future versions of tmtccmd
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2024-05-23 19:00:51 +02:00
652f3bf66f changelog
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2024-05-23 17:40:55 +02:00
8419a4edd7 some more fixes
All checks were successful
EIVE/-/pipeline/head This commit looks good
2024-05-23 14:45:10 +02:00
673c8b2cf2 mode handling fix
All checks were successful
EIVE/-/pipeline/head This commit looks good
2024-05-23 13:42:32 +02:00
5 changed files with 45 additions and 54 deletions

View File

@ -10,14 +10,20 @@ list yields a list of all related PRs for each release.
# [unreleased]
## Changed
# [v7.1.1] 2025-02-10
- Added support for new fused rotation rate dataset.
- Bumped `tmtccmd` to v8.2.0
# [v7.1.0] 2025-01-17
- Bumped `tmtccmd` to v8.1.0
## Fixed
- Use new mode TM API.
# [v7.0.0] 2024-05-06
## Changed
- Reworked PLOC MPSoC commanding to be inline with OBSW update.
## Fixed

View File

@ -4,7 +4,8 @@ import logging
from spacepackets.cfdp import ConditionCode
from spacepackets.util import UnsignedByteField
from cfdppy import CfdpUserBase, TransactionId
from cfdppy.mib import CheckTimerProvider, Countdown, EntityType
from cfdppy.mib import CheckTimerProvider, EntityType
from spacepackets.countdown import Countdown
from cfdppy.user import (
TransactionFinishedParams,
MetadataRecvParams,

View File

@ -15,7 +15,7 @@ from tmtccmd.logging.pus import RawTmtcTimedLogWrapper
from tmtccmd.pus import VerificationWrapper
from tmtccmd.pus.s20_fsfw_param import Service20FsfwTm, Service20ParamDumpWrapper
from tmtccmd.pus.s20_fsfw_param_defs import CustomSubservice as ParamSubservice
from tmtccmd.pus.s200_fsfw_mode import Service200FsfwTm
from tmtccmd.pus.s200_fsfw_mode import Service200FsfwReader, Service200FsfwTm
from tmtccmd.pus.s200_fsfw_mode import Subservice as ModeSubservice
from tmtccmd.tmtc import GenericApidHandlerBase, SpecificApidHandlerBase
from eive_tmtc.config.definitions import TM_DB_PATH, PUS_APID
@ -109,7 +109,7 @@ class PusHandler(SpecificApidHandlerBase):
elif service == 20:
self._handle_param_packet(packet, tm_packet)
elif service == 200:
dedicated_handler = self._handle_mode_packet(packet, tm_packet)
dedicated_handler = self._handle_mode_packet(tm_packet)
else:
_LOGGER.info(
f"The service {service} is not implemented in Telemetry Factory"
@ -193,21 +193,21 @@ class PusHandler(SpecificApidHandlerBase):
f"unknown subservice {tm_packet.subservice} for parameter service"
)
def _handle_mode_packet(self, raw_data: bytes, _: PusTelemetry) -> bool:
tm_packet = Service200FsfwTm.unpack(
raw_telemetry=raw_data, time_reader=CdsShortTimestamp.empty()
)
if tm_packet.subservice == ModeSubservice.TM_CANT_REACH_MODE:
def _handle_mode_packet(self, pus_tm: PusTelemetry) -> bool:
tm_packet = Service200FsfwReader(pus_tm)
if tm_packet.tm.subservice == ModeSubservice.TM_CANT_REACH_MODE:
obj_id = tm_packet.object_id
obj_id_obj = self.obj_id_dict.get(obj_id)
retval = tm_packet.return_value
assert retval is not None
string_list = generic_retval_printout(retval)
self.pw.dlog(f"Received Mode Reply from {obj_id_obj}: Can't reach mode.")
for string in string_list:
self.pw.dlog(f"Reason: {string}")
return True
if tm_packet.subservice == ModeSubservice.TM_WRONG_MODE_REPLY:
if tm_packet.tm.subservice == ModeSubservice.TM_WRONG_MODE_REPLY:
self.pw.dlog(f"Received Mode TM wrong mode reply, mode: {tm_packet.mode}")
return True
return False

View File

@ -988,43 +988,27 @@ def handle_fused_rot_rate_data(pw: PrintWrapper, hk_data: bytes):
inc_len_vec3_double = struct.calcsize(fmt_vec3_double)
fmt_source = "!B"
inc_len_source = struct.calcsize(fmt_source)
v0_size = 3 * inc_len_vec3_double + 1
v1_size = 3 * inc_len_vec3_double + inc_len_source + 1
v2_size = 2 * inc_len_vec3_double + inc_len_source + 1
old_size = 3 * inc_len_vec3_double + 1
new_size = 3 * inc_len_vec3_double + inc_len_source + 1
size = len(hk_data)
if size not in [v0_size, v1_size, v2_size]:
if size not in [old_size, new_size]:
pw.dlog(f"Received Fused Rot Rate HK set of unexpected size: {len(hk_data)}")
return
current_idx = 0
if size in [v0_size, v1_size]:
rot_rate_orthogonal = [
f"{val*180/math.pi:8.3f}"
for val in struct.unpack(
fmt_vec3_double,
hk_data[current_idx : current_idx + inc_len_vec3_double],
)
]
current_idx += inc_len_vec3_double
pw.dlog(f"Fused Rotational Rate Orthogonal: {rot_rate_orthogonal} [deg/s]")
rot_rate_parallel = [
f"{val*180/math.pi:8.3f}"
for val in struct.unpack(
fmt_vec3_double,
hk_data[current_idx : current_idx + inc_len_vec3_double],
)
]
current_idx += inc_len_vec3_double
pw.dlog(f"Fused Rotational Rate Parallel: {rot_rate_parallel} [deg/s]")
else:
rot_rate_susmgm = [
f"{val * 180 / math.pi:8.3f}"
for val in struct.unpack(
fmt_vec3_double,
hk_data[current_idx: current_idx + inc_len_vec3_double],
)
]
current_idx += inc_len_vec3_double
pw.dlog(f"Fused Rotational Rate SUSMGM: {rot_rate_susmgm} [deg/s]")
rot_rate_orthogonal = [
f"{val*180/math.pi:8.3f}"
for val in struct.unpack(
fmt_vec3_double, hk_data[current_idx : current_idx + inc_len_vec3_double]
)
]
current_idx += inc_len_vec3_double
rot_rate_parallel = [
f"{val*180/math.pi:8.3f}"
for val in struct.unpack(
fmt_vec3_double, hk_data[current_idx : current_idx + inc_len_vec3_double]
)
]
current_idx += inc_len_vec3_double
rot_rate_total = [
f"{val*180/math.pi:8.3f}"
for val in struct.unpack(
@ -1032,8 +1016,10 @@ def handle_fused_rot_rate_data(pw: PrintWrapper, hk_data: bytes):
)
]
current_idx += inc_len_vec3_double
pw.dlog(f"Fused Rotational Rate Orthogonal: {rot_rate_orthogonal} [deg/s]")
pw.dlog(f"Fused Rotational Rate Parallel: {rot_rate_parallel} [deg/s]")
pw.dlog(f"Fused Rotational Rate Total: {rot_rate_total} [deg/s]")
if size in [v1_size, v2_size]:
if size == new_size:
rot_rate_source = struct.unpack(
fmt_source, hk_data[current_idx : current_idx + inc_len_source]
)[0]
@ -1044,10 +1030,9 @@ def handle_fused_rot_rate_data(pw: PrintWrapper, hk_data: bytes):
)
else:
pw.dlog(f"Ctrl Strategy (key unknown): {rot_rate_source}")
if size in [v0_size, v2_size]:
pw.dlog(get_validity_buffer_str(hk_data[current_idx:], num_vars=3))
else:
pw.dlog(get_validity_buffer_str(hk_data[current_idx:], num_vars=4))
return
pw.dlog(get_validity_buffer_str(hk_data[current_idx:], num_vars=3))
def handle_fused_rot_rate_source_data(pw: PrintWrapper, hk_data: bytes):

View File

@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
name = "eive-tmtc"
description = "TMTC Commander EIVE"
readme = "README.md"
version = "7.1.0"
version = "7.2.0"
requires-python = ">=3.10"
license = {text = "Apache-2.0"}
authors = [
@ -29,9 +29,8 @@ classifiers = [
"Topic :: Scientific/Engineering"
]
dependencies = [
"tmtccmd ~= 8.0.1",
# "tmtccmd @ git+https://github.com/robamu-org/tmtccmd@main",
"cfdp-py~=0.1.0",
"tmtccmd~=8.2.0",
"cfdp-py~=0.5.1",
"python-dateutil ~= 2.8",
]