diff --git a/Apps/GroundSoftware/scripts/testing/_peregrine_tvac_fetcher.py b/Apps/GroundSoftware/scripts/testing/_peregrine_tvac_fetcher.py index c160766f..a05864b5 100644 --- a/Apps/GroundSoftware/scripts/testing/_peregrine_tvac_fetcher.py +++ b/Apps/GroundSoftware/scripts/testing/_peregrine_tvac_fetcher.py @@ -818,20 +818,20 @@ def range_check( VSysAll = data['Adc_FullSystemVoltage'].data if VSysAll > 5: alarms.append( - f"V_SYS_ALL APPEARS TO BE ON: {VSysAll:.3f} > 5V (should be " + f"V_SYS_ALL ON or FLOATING HIGH: {VSysAll:.3f} > 5V (should be " f"~1.2V at STP when off)." ) VBattSw = data['Adc_SwitchedBatteryVoltage'].data if VBattSw > 10: alarms.append( - f"BATTERY APPEARS TO BE ON: {VBattSw:.3f} > 10V. This sensor " + f"BATTERY ON or FLOATING HIGH: {VBattSw:.3f} > 10V. This sensor " f"is only loosely calibrated should be less than ~5 at STP " f"when off)." ) Vcc24 = data['Adc_Vcc24Voltage'].data if Vcc24 > 5: alarms.append( - f"24V MOTOR POWER APPEARS TO BE ON: {Vcc24:.3f} > 5V (should " + f"24V MOTOR PWR ON or FLOATING HIGH: {Vcc24:.3f} > 5V (should " f"be ~0.5V at STP when off)." ) @@ -1338,6 +1338,13 @@ def print_from_db(opts) -> None: print("Loading Stored YAMCS Data . . .") lander_data = DataSet.load_from('yamcs', db) + # There are duplicates of all rows in some time windows due to overlaps in + # YAMCS archives that were replayed and reprocessing of some archives. + # Only keep the first row of a collection of rows with the **exact** same + # timestamp: + keep = ~lander_data.data.index.duplicated(keep='first') + lander_data.data = lander_data.data[keep] + # Extract all the packets: print("Extracting and processing all Iris Packets. . .") times, packets = extract_packets(lander_data, IRIS_TELEM_PARAMS) diff --git a/Apps/GroundSoftware/scripts/testing/_peregrine_tvac_h5_to_excel.py b/Apps/GroundSoftware/scripts/testing/_peregrine_tvac_h5_to_excel.py index 4d8ece93..3139dde5 100644 --- a/Apps/GroundSoftware/scripts/testing/_peregrine_tvac_h5_to_excel.py +++ b/Apps/GroundSoftware/scripts/testing/_peregrine_tvac_h5_to_excel.py @@ -1,5 +1,7 @@ """ Converts an `h5` (HDF) archive from integrated TVAC to an excel file. +NOTE: This only extracts the `telem` table containing parsed telemtery and not +the raw `yamcs` table containing raw data received from YAMCS. NOTE: If this gives protobuf warnings, either resolve them or run: - `PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python ./run-script.sh ...` - instead of: `./run-script.sh ...` @@ -245,7 +247,7 @@ def main(opts): print(TITLE) in_file = os.path.join(opts.db_dir, f"{opts.name}.h5") - out_file = os.path.join(opts.db_dir, f"{opts.name}_export.xlsx") + out_file = os.path.join(opts.db_dir, f"{opts.name}_telem_export.xlsx") print(f"Connecting to Local DB: {in_file}. . .") db = pd.HDFStore(in_file)