add .bat files for cmd windows

This commit is contained in:
Danila Gamkov 2025-06-09 14:37:23 +03:00
parent b04009ad27
commit 801d4563b2
3 changed files with 46 additions and 14 deletions

21
bin/asotr_unzip_plot.bat Executable file
View File

@ -0,0 +1,21 @@
@echo off
REM check for one argument
IF "%~1"=="" (
echo error using scrpt. Right use this script:
echo %~nx0 path
goto :EOF
)
REM copy acotr_csv parsert to /bin
copy "..\asotr_csv\target\release\asotr_csv.exe" .\
set "path_=%~1"
REM unpacking recursively archive using Python script
python recursive_unpack_targz.py "%path_%"
REM run parser
asotr_csv.exe -d "%path_%"
REM plot data
python plot_asotr_flight_all.py

View File

@ -93,7 +93,7 @@ def collect_tm_brd_wheel_data(root_dir_wheel_data, column_list, column_list_itog
print('data saved: ' + fname) print('data saved: ' + fname)
## collect raw tm brd data into one file for each brd ### collect raw tm brd data into one file for each brd ###
root_dir_tm_data = '/home/danila/Danila/work/MVN/flight/brd_data/arch_for_MB/archive_tm_data_txt/' root_dir_tm_data = '/home/danila/Danila/work/MVN/flight/brd_data/arch_for_MB/archive_tm_data_txt/'
column_list = ['TIME', 'PER_1Hz', 'ST_HV'] column_list = ['TIME', 'PER_1Hz', 'ST_HV']
@ -102,6 +102,8 @@ 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)
### collect raw tm wheel data into one file for each brd ###
root_dir_wheel_data = '/home/danila/Danila/work/MVN/flight/brd_data/arch_for_MB/archive_wheel_data_txt/' root_dir_wheel_data = '/home/danila/Danila/work/MVN/flight/brd_data/arch_for_MB/archive_wheel_data_txt/'
column_list = ['TIME', 'STATE'] column_list = ['TIME', 'STATE']
column_list_itog = ['TIME', 'timestamp', 'STATE'] column_list_itog = ['TIME', 'timestamp', 'STATE']
@ -109,7 +111,6 @@ column_list_itog = ['TIME', 'timestamp', 'STATE']
collect_tm_brd_wheel_data(root_dir_wheel_data, column_list, column_list_itog) collect_tm_brd_wheel_data(root_dir_wheel_data, column_list, column_list_itog)
## plot 'evolution' 1 Hz from tm brd data ## plot 'evolution' 1 Hz from tm brd data
fname = path_itog_brd_data + 'mvn_tm_brd01.csv' fname = path_itog_brd_data + 'mvn_tm_brd01.csv'
@ -120,6 +121,7 @@ plt.plot(df['timestamp'], df['PER_1Hz'], '.')
plt.show() plt.show()
## parse and plot wheel csv data
border_clr_wheel = 2 border_clr_wheel = 2
fname = path_itog_brd_data + 'mvn_wheel_brd01.csv' fname = path_itog_brd_data + 'mvn_wheel_brd01.csv'
@ -136,15 +138,3 @@ wheel_df_peaks = wheel_df[(wheel_df['TIME_diff'] <= median_tdiff - border_clr_wh
plt.plot(wheel_df_clear['TIME'], wheel_df_clear['TIME_diff']) plt.plot(wheel_df_clear['TIME'], wheel_df_clear['TIME_diff'])
plt.show() plt.show()
# df1 = df[df['TIME_diff'] < 30.6]
# print(df[df['TIME_diff'] > 30.6 or df['TIME_diff'] < 29.4] )
# for idx, row in df.iterrows():
# print(row['TIME'])

21
bin/plot_flight_borders.bat Executable file
View File

@ -0,0 +1,21 @@
@echo off
REM check for two arguments
IF "%~2"=="" (
echo Error: Incorrect usage.
echo Usage: %~nx0 25.02.2025_00:00:00 10.03.2025_23:59:59
goto :EOF
)
set "path_csv_data=..\data\asotr"
set "begin=%~1"
set "end=%~2"
REM run Python-script with parameters
python plot_flight_borders.py -s "%path_csv_data%" -c 111100 -a 01 -b %begin% -e %end%
python plot_flight_borders.py -s "%path_csv_data%" -c 001000 -a 01 -b %begin% -e %end%
python plot_flight_borders.py -s "%path_csv_data%" -c 000011 -a 01 -b %begin% -e %end%
python plot_flight_borders.py -s "%path_csv_data%" -c 111100 -a 02 -b %begin% -e %end%
python plot_flight_borders.py -s "%path_csv_data%" -c 010100 -a 02 -b %begin% -e %end%
python plot_flight_borders.py -s "%path_csv_data%" -c 010000 -a 02 -b %begin% -e %end%
python plot_flight_borders.py -s "%path_csv_data%" -c 000100 -a 02 -b %begin% -e %end%
python plot_flight_borders.py -s "%path_csv_data%" -c 000011 -a 02 -b %begin% -e %end%