Trajectory of the Qu8ke Rocket

Back in 2011, the Qu8ke rocket created quite a buzz with this amazing video from its flight:

One of the goals of this rocket was to win the Carmack Prize, an award for the first amateur rocket to obtains a GPS reading from over 100,000 ft. While this rocket did break the 100,000 ft mark, it unfortunately lost GPS lock during its high speed ascent. Analysis of the on board accelerometer data indicates that the rocket reached ~121,000 ft. In a previous post, we describe a method for determining the position a high altitude photograph was taken from using a set of landmarks, OpenCV, and information about the camera’s field of view. The video from the flight of the Qu8ke rocket provides an excellent opportunity to revisit this method and to confirm the accelerometer predicted elevation.

Step 1: Find the GoPro camera parameters

The Qu8ke rocket carried a GoPro camera, which recorded video of the flight in 1080p. To analyze this video with OpenCV, we first needed to find the camera matrix, which contains information about the field of view and radial distortion (fisheye) of the lens.  Following OpenCv’s  method for finding the camera matrix from a set of pictures with a known geometry (we used a chess board), we found that it was difficult to obtain a matrix that could reliably undistort an entire image taken by a GoPro. This may be due to the fact that OpenCV only uses three radial distortion coefficients, which are unable to fully describe the distortion in the image resulting from the 170 degree field of view lens. Despite this, the camera matrix is able to accurately describe mapping between points near the center of the image, as shown below.  We avoided this issue by only picking landmarks not close to the edges/corners of the image.

My beautiful picture

Original (left), Undistorted (Right)

Step 2: Extract a series of stills from Youtube video

We downloaded the source mp4 video from youtube with the 4K video downloader and extracted pictures using ffmpeg. For example the following command:

ffmpef -ss 100 -i qu8ke.mp4 -r 1 -qscale:v 2 %05.jpg

extracts relatively high quality jpegs from the movie every 1 s, starting 100 s into the video. ImageMagick’s convert tool was used to rotate, crop, and resize batches of images.

Step 3: Use OpenCV with a set of landmarks visible in the images to estimate the camera position:

Although the video from the flight is 1080p, the extracted still images aren’t very high quality due to motion blur and the melted plastic that accumulated on the lens (things get hot when you are going Mach 1+). A picture from the rocket near the apogee is shown below:

pnp_1The black circles are the human picked landmark locations, while the blue circles are the reprojected landmark locations given the predicted camera position and orientation. The fact that the circles overlap demonstrate that we have a self-consistent estimate of the camera pose. Adding small amounts of noise to the camera matrix and 2D/3D landmark locations, we are able to estimate the uncertainty in the camera pose. For most of the images we analyzed, the uncertainty in the position was below 6,000 ft. Using pictures throughout the flight like the one above, we reconstructed the trajectory of the rocket:

quake_flightOur predictions confirm that the Qu8ke rocket surpassed 100,000 ft in elevation, and indicate that the rocket went a bit higher (~13,000 ft) than predicted by the on board accelerometers. I am not an expert in interpreting accelerometer data, but I would guess that integrating the acceleration data over the course of the rocket flight becomes increasingly prone to error as time increases, which could account for the difference in the elevation predictions.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s