Question: ( a ) Download the position _ data.txt file from UBlearns, and load the data into MATLAB ( you can use importdata ( ) command

(a) Download the position_data.txt file from UBlearns, and load the data into MATLAB (you can use importdata() command). The dataset is x,y coordinates in millimeters. Convert the dataset into meters.
(b) Write a MATLAB function called "FiniDiff1st.m" to compute the first derivatives via finite difference of any given vector dataset, where the inputs of the function are the dataset. Write a similar MATLAB function called "FiniDiff2nd.m" to compute the second derivatives via finite difference of the given vector dataset. Note that the sampling rate of the dataset is 100 Hz , therefore h=t=0.01s. You should setup the step size within the functions.
Hint: Consider using different finite difference methods on the first and last data points, and middle points.
(c) Use the MATLAB functions you wrote to perform finite difference on the position data to compute the (x,y) components of the velocity and acceleration of the UAV. Then calculate the UAV speed and the magnitude of acceleration via the following equations:
s=Vx2+Vy22,a=ax2+ay22
Note that the sampling rate of the dataset is 100 Hz , therefore h=t=0.01s.
(d) Plot the computed s and a in one figure. Find out the maximum speed and acceleration (using MATLAB's ) function) and display them on screen.
( a ) Download the position _ data.txt file from

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!