Setting up a drone for data collection#

by Seth Wojciechowski

Background information:#

When I first started this summer internship, I was given the opportunity to collect surface currents of gravitational waves using a drone. My first inclination before interning for Baylor was that I would be working with the drone performing field work daily, but when I first started talking to Baylor about the project, it was clear that work needed to be done so that the flight footage could be analyzed. I spent 10 weeks of my internship figuring out how the Copter Currents MATLAB code works and what needed to be done in order to get the code to analyze surface currents.

Project Status:#

I learned a lot throughout the course of my 10 week internship and although I was unable to get the Copter Currents Software fully operational, I was able to figure out how a majority of the code worked. I am halfway to the point of being able to analyze flight footage using a drone. The next page summarizes my findings, provides a set of instructions on how the code works when I start the project up again and provides background information on how to best run the code.

Major problems I overcame this summer:#

The program Media Info is used by the Copter Currents program to get the date, xyz coordinates, camera heading, camera pitch angle, camera roll angle, and drone altitude above the home point. The information taken from Media Info was input incorrectly into matlab, this was my first challenge of the summer and I had to correct the MATLAB code so that it could record the data correctly from Media Info. Below is a compilation of my experiences in fixing the errors. The notes below will be used in the coming school year when adapting this project into a capstone project:

The Organization of Github Files:#

The Github files provided with the project were labeled incorrectly, the first thing that should be done when the project is started is to go through each github file and document their inputs and outputs, write the inputs/outputs on a google sheet or excel spreadsheet. This will help in determining what files are to be used in what order. It is also important to label each script in terms of what each file does (1-2 sentences) and when and how each script is supposed to be run. The major problem associated with the Github file directory is not having enough inputs to run each file. Write a clear note in each excel spreadsheet about whether you’re supposed to click run before running each file or input parameters.

File Types:#

The files that makeup the copter current files are designated as functions instead of scripts. Script files do not save their variables in the workspace after they’re run, in order to save each functions’ variable’s in the workspace use the below notation: Function [IMG_SEQ] = run_Georeference_Struct_config(Georeference_Struct_config) Run the file by writing the below command in the command line: IMG_SEQ = run_Georeference_Struct_config(Georeference_Struct_config) Things to double check before running each script, make sure all of your inputs are properly called. One problem that can occur is that the scripts were run but the variables were not being saved to the workspace. This problem can be solved by using the above notation when running each file.

What to look into during the school year:#

Running program files faster, I would like to be able to run programs fast, at the moment it takes 5-10 minutes to run some of the files, I would like to be able to run my program in a matter of seconds.

Current Files:#

Currently I’m working on the file run_current_fit, this file fits a current into each window of video that I’m working with (‘video_over_elbe’). The file takes inputs from IMG_SEQ and STCFIT and outputs a data structure with the data to fit each current into its individual window. So far I know that in order to run this file you need to run create_Georeference_Struct, run_Georeference_Struct_config and generate_STCFIT_from_IMG_SEQ. After running generate_STCFIT_from_IMG_SEQ your outputs are 4 data structures, the 4th data structure is called out_fit which is empty after generate_STCFIT_from_IMG_SEQ is run. The file run_current_fit is what creates the data structure out_fit. First you need to:

  1. Find out how to run run_current_fit.

  2. Make sure that it has output data into out_fit once you have run run_ current_fit.

  3. run_current_fit calls the function fit_Spectrum2dispersionRelation, this function needs to work in order to run run_current_fit.

  4. Files that fit_Spectrum2dispersionRelation needs: retrieve_power_spectrum

  5. How to run: retrieve_power_spectrum: Spectrum = retrieve_power_spectrum(IMG_3D,IMG_SEQ.dx,IMG_SEQ.dy,IMG_SEQ.dt,STCFIT.fit_param.K_limits,STCFIT.fit_param.W_limits) You will also need the variable IMG_3D, make sure that this is in your workspace. The highlighted text must be changed to the data structure and fields where IMG_3D is located, this is different from IMG. The latest workspace is saved on the E drive as: workspace_8_14_2020