Merge remote-tracking branch 'origin/main' into thermal_controller

This commit is contained in:
Robin Müller 2023-03-14 18:50:22 +01:00
commit a54e5a8e14
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
7 changed files with 105 additions and 14 deletions

View File

@ -10,6 +10,17 @@ list yields a list of all related PRs for each release.
# [unreleased]
## Added
- Add a little bit of first time stamp extraction for HK packet handling.
# [v2.19.1] 2023-03-14
## Added
- New `subsystems.csv` file with all subsystem IDs
- Update `events.csv` and `returnvalues.csv`
# [v2.19.0] 2023-03-14
## Added

View File

@ -1,4 +1,4 @@
__version__ = "2.19.0"
__version__ = "2.19.1"
import logging
from pathlib import Path
@ -6,7 +6,7 @@ from pathlib import Path
SW_NAME = "eive-tmtc"
VERSION_MAJOR = 2
VERSION_MINOR = 19
VERSION_REVISION = 0
VERSION_REVISION = 1
EIVE_TMTC_ROOT = Path(__file__).parent
PACKAGE_ROOT = EIVE_TMTC_ROOT.parent

View File

@ -29,11 +29,11 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
2809;0x0af9;MONITORING_LIMIT_EXCEEDED;LOW;No description;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2810;0x0afa;MONITORING_AMBIGUOUS;HIGH;No description;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2811;0x0afb;DEVICE_WANTS_HARD_REBOOT;HIGH;No description;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
4201;0x1069;FUSE_CURRENT_HIGH;LOW;No description;fsfw/src/fsfw/power/Fuse.h
4202;0x106a;FUSE_WENT_OFF;LOW;No description;fsfw/src/fsfw/power/Fuse.h
4204;0x106c;POWER_ABOVE_HIGH_LIMIT;LOW;No description;fsfw/src/fsfw/power/Fuse.h
4205;0x106d;POWER_BELOW_LOW_LIMIT;LOW;No description;fsfw/src/fsfw/power/Fuse.h
4300;0x10cc;SWITCH_WENT_OFF;LOW;No description;fsfw/src/fsfw/power/PowerSwitchIF.h
4301;0x10cd;FUSE_CURRENT_HIGH;LOW;No description;fsfw/src/fsfw/power/Fuse.h
4302;0x10ce;FUSE_WENT_OFF;LOW;No description;fsfw/src/fsfw/power/Fuse.h
4304;0x10d0;POWER_ABOVE_HIGH_LIMIT;LOW;No description;fsfw/src/fsfw/power/Fuse.h
4305;0x10d1;POWER_BELOW_LOW_LIMIT;LOW;No description;fsfw/src/fsfw/power/Fuse.h
5000;0x1388;HEATER_ON;INFO;No description;fsfw/src/fsfw/thermal/Heater.h
5001;0x1389;HEATER_OFF;INFO;No description;fsfw/src/fsfw/thermal/Heater.h
5002;0x138a;HEATER_TIMEOUT;LOW;No description;fsfw/src/fsfw/thermal/Heater.h

1 Event ID (dec) Event ID (hex) Name Severity Description File Path
29 2809 0x0af9 MONITORING_LIMIT_EXCEEDED LOW No description fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
30 2810 0x0afa MONITORING_AMBIGUOUS HIGH No description fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
31 2811 0x0afb DEVICE_WANTS_HARD_REBOOT HIGH No description fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
4201 0x1069 FUSE_CURRENT_HIGH LOW No description fsfw/src/fsfw/power/Fuse.h
4202 0x106a FUSE_WENT_OFF LOW No description fsfw/src/fsfw/power/Fuse.h
4204 0x106c POWER_ABOVE_HIGH_LIMIT LOW No description fsfw/src/fsfw/power/Fuse.h
4205 0x106d POWER_BELOW_LOW_LIMIT LOW No description fsfw/src/fsfw/power/Fuse.h
32 4300 0x10cc SWITCH_WENT_OFF LOW No description fsfw/src/fsfw/power/PowerSwitchIF.h
33 4301 0x10cd FUSE_CURRENT_HIGH LOW No description fsfw/src/fsfw/power/Fuse.h
34 4302 0x10ce FUSE_WENT_OFF LOW No description fsfw/src/fsfw/power/Fuse.h
35 4304 0x10d0 POWER_ABOVE_HIGH_LIMIT LOW No description fsfw/src/fsfw/power/Fuse.h
36 4305 0x10d1 POWER_BELOW_LOW_LIMIT LOW No description fsfw/src/fsfw/power/Fuse.h
37 5000 0x1388 HEATER_ON INFO No description fsfw/src/fsfw/thermal/Heater.h
38 5001 0x1389 HEATER_OFF INFO No description fsfw/src/fsfw/thermal/Heater.h
39 5002 0x138a HEATER_TIMEOUT LOW No description fsfw/src/fsfw/thermal/Heater.h

View File

@ -59,6 +59,7 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x0502;PS_SwitchTimeout;No description;2;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
0x0503;PS_FuseOn;No description;3;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
0x0504;PS_FuseOff;No description;4;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
0x0505;PS_SwitchUnknown;No description;5;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
0x0601;PP_DoItMyself;No description;1;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
0x0602;PP_PointsToVariable;No description;2;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
0x0603;PP_PointsToMemory;No description;3;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h

1 Full ID (hex) Name Description Unique ID Subsytem Name File Path
59 0x0502 PS_SwitchTimeout No description 2 POWER_SWITCH_IF fsfw/src/fsfw/power/PowerSwitchIF.h
60 0x0503 PS_FuseOn No description 3 POWER_SWITCH_IF fsfw/src/fsfw/power/PowerSwitchIF.h
61 0x0504 PS_FuseOff No description 4 POWER_SWITCH_IF fsfw/src/fsfw/power/PowerSwitchIF.h
62 0x0505 PS_SwitchUnknown No description 5 POWER_SWITCH_IF fsfw/src/fsfw/power/PowerSwitchIF.h
63 0x0601 PP_DoItMyself No description 1 HAS_MEMORY_IF fsfw/src/fsfw/memory/HasMemoryIF.h
64 0x0602 PP_PointsToVariable No description 2 HAS_MEMORY_IF fsfw/src/fsfw/memory/HasMemoryIF.h
65 0x0603 PP_PointsToMemory No description 3 HAS_MEMORY_IF fsfw/src/fsfw/memory/HasMemoryIF.h

View File

@ -0,0 +1,61 @@
22;MEMORY
26;OBSW
28;CDH
59;TCS_1
42;PCDU_1
43;POWER_SWITCH_IF
50;HEATER
52;T_SENSORS
70;FDIR
71;FDIR_1
72;FDIR_2
73;HK
74;SYSTEM_MANAGER
75;SYSTEM_MANAGER_1
76;TMTC_DISTRIBUTION
79;SYSTEM_1
80;PUS_SERVICE_1
82;PUS_SERVICE_2
83;PUS_SERVICE_3
85;PUS_SERVICE_5
86;PUS_SERVICE_6
88;PUS_SERVICE_8
89;PUS_SERVICE_9
91;PUS_SERVICE_11
97;PUS_SERVICE_17
103;PUS_SERVICE_23
106;MGM_LIS3MDL
107;MGM_RM3100
108;CFDP
112;ACS_SUBSYSTEM
113;PCDU_HANDLER
114;HEATER_HANDLER
115;SA_DEPL_HANDLER
116;PLOC_MPSOC_HANDLER
117;IMTQ_HANDLER
118;RW_HANDLER
119;STR_HANDLER
120;PLOC_SUPERVISOR_HANDLER
121;FILE_SYSTEM
122;PLOC_UPDATER
123;PLOC_MEMORY_DUMPER
124;PDEC_HANDLER
125;STR_HELPER
126;PLOC_MPSOC_HELPER
127;PL_PCDU_HANDLER
128;ACS_BOARD_ASS
129;SUS_BOARD_ASS
130;TCS_BOARD_ASS
131;GPS_HANDLER
132;P60_DOCK_HANDLER
133;PDU1_HANDLER
134;PDU2_HANDLER
135;ACU_HANDLER
136;PLOC_SUPV_HELPER
137;SYRLINKS
138;SCEX_HANDLER
139;CONFIGHANDLER
140;CORE
141;TCS_CONTROLLER
142;COM_SUBSYSTEM
143;PERSISTENT_TM_STORE
1 22 MEMORY
2 26 OBSW
3 28 CDH
4 59 TCS_1
5 42 PCDU_1
6 43 POWER_SWITCH_IF
7 50 HEATER
8 52 T_SENSORS
9 70 FDIR
10 71 FDIR_1
11 72 FDIR_2
12 73 HK
13 74 SYSTEM_MANAGER
14 75 SYSTEM_MANAGER_1
15 76 TMTC_DISTRIBUTION
16 79 SYSTEM_1
17 80 PUS_SERVICE_1
18 82 PUS_SERVICE_2
19 83 PUS_SERVICE_3
20 85 PUS_SERVICE_5
21 86 PUS_SERVICE_6
22 88 PUS_SERVICE_8
23 89 PUS_SERVICE_9
24 91 PUS_SERVICE_11
25 97 PUS_SERVICE_17
26 103 PUS_SERVICE_23
27 106 MGM_LIS3MDL
28 107 MGM_RM3100
29 108 CFDP
30 112 ACS_SUBSYSTEM
31 113 PCDU_HANDLER
32 114 HEATER_HANDLER
33 115 SA_DEPL_HANDLER
34 116 PLOC_MPSOC_HANDLER
35 117 IMTQ_HANDLER
36 118 RW_HANDLER
37 119 STR_HANDLER
38 120 PLOC_SUPERVISOR_HANDLER
39 121 FILE_SYSTEM
40 122 PLOC_UPDATER
41 123 PLOC_MEMORY_DUMPER
42 124 PDEC_HANDLER
43 125 STR_HELPER
44 126 PLOC_MPSOC_HELPER
45 127 PL_PCDU_HANDLER
46 128 ACS_BOARD_ASS
47 129 SUS_BOARD_ASS
48 130 TCS_BOARD_ASS
49 131 GPS_HANDLER
50 132 P60_DOCK_HANDLER
51 133 PDU1_HANDLER
52 134 PDU2_HANDLER
53 135 ACU_HANDLER
54 136 PLOC_SUPV_HELPER
55 137 SYRLINKS
56 138 SCEX_HANDLER
57 139 CONFIGHANDLER
58 140 CORE
59 141 TCS_CONTROLLER
60 142 COM_SUBSYSTEM
61 143 PERSISTENT_TM_STORE

View File

@ -1,4 +1,5 @@
"""HK Handling for EIVE OBSW"""
import datetime
import logging
# from pus_tm.tcp_server_objects import TCP_SEVER_SENSOR_TEMPERATURES
@ -12,6 +13,7 @@ from eive_tmtc.tmtc.payload.ploc_supervisor import handle_supv_hk_data
from eive_tmtc.tmtc.acs.reaction_wheels import handle_rw_hk_data
from eive_tmtc.tmtc.com.syrlinks_handler import handle_syrlinks_hk_data
from eive_tmtc.tmtc.tcs import handle_thermal_controller_hk_data
from spacepackets.ecss import PusTelemetry
from tmtccmd.tm.pus_3_fsfw_hk import (
Service3Base,
HkContentType,
@ -71,6 +73,7 @@ def handle_hk_packet(
printer=printer,
object_id=named_obj_id,
hk_packet=tm_packet,
tm=tm_packet.pus_tm,
hk_data=hk_data,
)
except ValueError as e:
@ -85,10 +88,12 @@ def handle_regular_hk_print(
printer: FsfwTmTcPrinter,
object_id: ObjectIdU32,
hk_packet: Service3Base,
tm: PusTelemetry,
hk_data: bytes,
):
objb = object_id.as_bytes
set_id = hk_packet.set_id
packet_dt = tm.time_provider.as_date_time()
"""This function is called when a Service 3 Housekeeping packet is received."""
if objb in [obj_ids.RW1_ID, obj_ids.RW2_ID, obj_ids.RW3_ID, obj_ids.RW4_ID]:
return handle_rw_hk_data(printer, object_id, set_id, hk_data)
@ -170,7 +175,9 @@ def handle_regular_hk_print(
elif objb == obj_ids.PLOC_SUPV_ID:
return handle_supv_hk_data(set_id=set_id, hk_data=hk_data, printer=printer)
elif objb == obj_ids.ACS_CONTROLLER:
return handle_acs_ctrl_hk_data(printer, set_id, hk_data)
return handle_acs_ctrl_hk_data(
printer=printer, set_id=set_id, hk_data=hk_data, packet_time=packet_dt
)
else:
_LOGGER.info(
f"Service 3 TM: Parsing for object {object_id} and set ID {set_id} "

View File

@ -1,3 +1,4 @@
import datetime
import enum
import logging
import socket
@ -44,6 +45,9 @@ from tmtccmd.pus.s20_fsfw_param_defs import (
)
_LOGGER = logging.getLogger(__name__)
class SetId(enum.IntEnum):
MGM_RAW_SET = 0
MGM_PROC_SET = 1
@ -655,8 +659,14 @@ def set_acs_ctrl_param_matrix(q: DefaultPusQueueHelper):
return
def handle_acs_ctrl_hk_data(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):
def handle_acs_ctrl_hk_data(
printer: FsfwTmTcPrinter,
set_id: int,
hk_data: bytes,
packet_time: datetime.datetime,
):
pw = PrintWrapper(printer)
pw.ilog(_LOGGER, f"Received ACS CTRL HK with packet time {packet_time}")
match set_id:
case SetId.MGM_RAW_SET:
handle_raw_mgm_data(pw, hk_data)
@ -985,17 +995,18 @@ def handle_mekf_data(pw: PrintWrapper, hk_data: bytes):
current_idx = 0
quat = struct.unpack(fmt_quat, hk_data[current_idx : current_idx + inc_len_quat])
current_idx += inc_len_quat
rate = (
struct.unpack(fmt_vec, hk_data[current_idx : current_idx + inc_len_vec])
* 180
/ math.pi
)
rates = [
rate * 180 / math.pi
for rate in struct.unpack(
fmt_vec, hk_data[current_idx : current_idx + inc_len_vec]
)
]
current_idx += inc_len_vec
status = struct.unpack(fmt_sts, hk_data[current_idx : current_idx + inc_len_sts])[0]
current_idx += inc_len_sts
pw.dlog(f"{'MEKF Status'.ljust(25)}: {mekf_status[status]}")
pw.dlog(f"{'MEKF Quaternion'.ljust(25)}: {fmt_str_4.format(*quat)}")
pw.dlog(f"{'MEKF Rotational Rate'.ljust(25)}: {fmt_str_3.format(*rate)}")
pw.dlog(f"{'MEKF Rotational Rate'.ljust(25)}: {fmt_str_3.format(*rates)}")
pw.printer.print_validity_buffer(hk_data[current_idx:], num_vars=3)