Merge remote-tracking branch 'origin/main' into thermal_controller
This commit is contained in:
commit
a54e5a8e14
11
CHANGELOG.md
11
CHANGELOG.md
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
61
eive_tmtc/config/subsystems.csv
Normal file
61
eive_tmtc/config/subsystems.csv
Normal 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,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} "
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user