Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- analyze_logs.pyimport pandas as pd
- import matplotlib.pyplot as plt
- # Загрузка логов
- df = pd.read_csv('telemetry_log.txt', names=['x', 'y', 'z', 'vx', 'vy', 'vz'])
- # Построение траектории
- plt.figure()
- plt.plot(df['x'], df['y'], label='Trajectory')
- plt.xlabel('X (meters)')
- plt.ylabel('Y (meters)')
- plt.title('Flight Trajectory')
- plt.legend()
- plt.grid()
- plt.show()
- # Анализ высоты
- plt.figure()
- plt.plot(df.index, df['z'], label='Altitude')
- plt.xlabel('Time Step')
- plt.ylabel('Altitude (meters)')
- plt.title('Altitude Over Time')
- plt.legend()
- plt.grid()
- plt.show()
- # Анализ скорости
- plt.figure()
- plt.plot(df.index, df['vx'], label='Velocity X')
- plt.plot(df.index, df['vy'], label='Velocity Y')
- plt.plot(df.index, df['vz'], label='Velocity Z')
- plt.xlabel('Time Step')
- plt.ylabel('Velocity (m/s)')
- plt.title('Velocity Over Time')
- plt.legend()
- plt.grid()
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement