Skip to content

Commit fff7e4d

Browse files
author
Connor Colombo
committed
iTVAC: Updated processing scripts for improved messages & alarms output.
1 parent 45380b8 commit fff7e4d

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

Apps/GroundSoftware/scripts/testing/_peregrine_tvac_fetcher.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -818,20 +818,20 @@ def range_check(
818818
VSysAll = data['Adc_FullSystemVoltage'].data
819819
if VSysAll > 5:
820820
alarms.append(
821-
f"V_SYS_ALL APPEARS TO BE ON: {VSysAll:.3f} > 5V (should be "
821+
f"V_SYS_ALL ON or FLOATING HIGH: {VSysAll:.3f} > 5V (should be "
822822
f"~1.2V at STP when off)."
823823
)
824824
VBattSw = data['Adc_SwitchedBatteryVoltage'].data
825825
if VBattSw > 10:
826826
alarms.append(
827-
f"BATTERY APPEARS TO BE ON: {VBattSw:.3f} > 10V. This sensor "
827+
f"BATTERY ON or FLOATING HIGH: {VBattSw:.3f} > 10V. This sensor "
828828
f"is only loosely calibrated should be less than ~5 at STP "
829829
f"when off)."
830830
)
831831
Vcc24 = data['Adc_Vcc24Voltage'].data
832832
if Vcc24 > 5:
833833
alarms.append(
834-
f"24V MOTOR POWER APPEARS TO BE ON: {Vcc24:.3f} > 5V (should "
834+
f"24V MOTOR PWR ON or FLOATING HIGH: {Vcc24:.3f} > 5V (should "
835835
f"be ~0.5V at STP when off)."
836836
)
837837

@@ -1338,6 +1338,13 @@ def print_from_db(opts) -> None:
13381338
print("Loading Stored YAMCS Data . . .")
13391339
lander_data = DataSet.load_from('yamcs', db)
13401340

1341+
# There are duplicates of all rows in some time windows due to overlaps in
1342+
# YAMCS archives that were replayed and reprocessing of some archives.
1343+
# Only keep the first row of a collection of rows with the **exact** same
1344+
# timestamp:
1345+
keep = ~lander_data.data.index.duplicated(keep='first')
1346+
lander_data.data = lander_data.data[keep]
1347+
13411348
# Extract all the packets:
13421349
print("Extracting and processing all Iris Packets. . .")
13431350
times, packets = extract_packets(lander_data, IRIS_TELEM_PARAMS)

Apps/GroundSoftware/scripts/testing/_peregrine_tvac_h5_to_excel.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"""
22
Converts an `h5` (HDF) archive from integrated TVAC to an excel file.
3+
NOTE: This only extracts the `telem` table containing parsed telemtery and not
4+
the raw `yamcs` table containing raw data received from YAMCS.
35
NOTE: If this gives protobuf warnings, either resolve them or run:
46
- `PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python ./run-script.sh ...`
57
- instead of: `./run-script.sh ...`
@@ -245,7 +247,7 @@ def main(opts):
245247
print(TITLE)
246248

247249
in_file = os.path.join(opts.db_dir, f"{opts.name}.h5")
248-
out_file = os.path.join(opts.db_dir, f"{opts.name}_export.xlsx")
250+
out_file = os.path.join(opts.db_dir, f"{opts.name}_telem_export.xlsx")
249251

250252
print(f"Connecting to Local DB: {in_file}. . .")
251253
db = pd.HDFStore(in_file)

0 commit comments

Comments
 (0)