In [1]:
import plotly.express as px
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd

Flight Data - Identifying the launch time¶

This is the 3rd notebook in the series. Earlier parts:

  • ./010-video-export.html - for exporting still frames and timecodes for the videos
  • ./020-video-analysis.html - for analyzing the video frames to match mission time with key events
In [2]:
baro = pd.read_csv('data/BarometerData-20250405-162645.csv')
baro = baro.iloc[11:]
baro = baro[baro['timestamp'] > 440000]
baro = baro.set_index('timestamp')
baro.head()
Out[2]:
time pressure altitude average_altitude temperature
timestamp
440033 16:20:54.830000 102139.593750 0.210183 0.046781 28.620001
440286 16:20:55.083000 102143.968750 -0.150846 0.055706 28.629999
440538 16:20:55.335000 102141.726562 0.034192 0.055847 28.650000
440792 16:20:55.589000 102138.843750 0.272032 0.047770 28.629999
441042 16:20:55.839000 102140.531250 0.132747 0.044345 28.639999
In [3]:
filtered_data = baro[(baro.index > 441500) & (baro.index < 443500)]['altitude']

fig = px.scatter(x=filtered_data.index, y=filtered_data.values, 
                 title="Rocket Altitude Measurements",
                 labels={"x": "Time (ms)", "y": "Altitude (m)"})

fig.update_traces(mode='lines+markers')
fig.update_xaxes(range=[441500, 443500])
fig.show()

Based on this, it looks like the launch was at between 442308 and 442559. Let's compare the to the IMU data

In [4]:
imu = pd.read_csv('data/AccelData-20250405-162645.csv')
imu = imu.iloc[1000:]
imu = imu[imu['timestamp'] > 441500]
imu = imu.set_index('timestamp')
imu['total_accel'] = np.sqrt(imu['accelX']**2 + imu['accelY']**2 + imu['accelZ']**2)
imu.head()
Out[4]:
time accelX accelY accelZ gyroX gyroY gyroZ temperature total_accel
timestamp
441508 16:20:56.305000 -0.107360 -0.124928 -0.949648 -1.47 2.59 -7.07 42.8125 0.963828
441516 16:20:56.313000 -0.084912 -0.140544 -1.009672 -0.42 1.89 -6.44 42.7500 1.022937
441524 16:20:56.321000 -0.117120 -0.181048 -1.031632 -0.91 2.03 -3.50 42.7500 1.053926
441532 16:20:56.329000 -0.101016 -0.190808 -1.008696 -1.40 3.71 0.70 42.7500 1.031542
441540 16:20:56.337000 -0.048312 -0.167872 -1.002352 -1.33 3.01 6.16 42.6875 1.017460
In [5]:
filtered_data = imu[(imu.index > 441500) & (imu.index < 443500)]['total_accel']

fig = px.scatter(x=filtered_data.index, y=filtered_data.values, 
                 title="Rocket Acceleration",
                 labels={"x": "Time", "y": "Acceleration (G)"})

fig.update_traces(mode='lines+markers')
fig.update_xaxes(range=[441500, 443500])
fig.show()

So, it looks like the launch took place between 442457 and 442465 - we can use the mean as the best estimate of the launch time = 442461. Comparing this to the estimate from the baro data, we see that the barometer registers a launch between 442308 and 442559. This corresponds well with the IMU data.

LAUNCH TIME ESTIMATE: 442461