plot_flight_borders: add flags for flexibility. tm_wheel_parser.py: plot data distribution

This commit is contained in:
Danila Gamkov
2025-08-07 14:13:43 +03:00
parent cf3c9290b0
commit d91039ca21
12 changed files with 820 additions and 202 deletions

View File

@@ -15,7 +15,7 @@ path_itog_brd_data = '../data/brd_data/'
class PathFileNotFound(Exception):
pass
# recursive search files by pattern in specified directory
def find_required_files(root_dir, pattern):
result = []
for dirpath, _, filenames in os.walk(root_dir):
@@ -30,7 +30,7 @@ def find_required_files(root_dir, pattern):
return sorted(result)
# read all finded files into pandas dataFrame
def read_files_into_df(fname_list, column_list, dtype_columns={}):
data_itog = pd.DataFrame()
epoch_start = pd.Timestamp('2000-01-01')
@@ -89,7 +89,7 @@ if __name__ == "__main__":
column_list = ['TIME', 'PER_1Hz', 'ST_HV']
column_list_itog = ['TIME', 'timestamp', 'PER_1Hz', 'ST_HV']
collect_tm_brd_files(root_dir_tm_data, column_list, column_list_itog)
# collect_tm_brd_files(root_dir_tm_data, column_list, column_list_itog)
## plot 'evolution' 1 Hz from tm brd data
print('plot evolution 1 Hz from tm brd data')
@@ -97,5 +97,7 @@ if __name__ == "__main__":
fname = path_itog_brd_data + 'mvn_tm_brd01.csv'
df = pd.read_csv(fname, sep=';', parse_dates=['timestamp'], date_format="%d.%m.%Y %H:%M:%S.%f")
# print(df)
plt.plot(df['timestamp'], df['PER_1Hz'], '.')
plt.grid()
plt.show()