Question: ( a ) Download the position _ data.txt file from UBlearns, and load the data into MATLAB ( you can use importdata ( ) command
a Download the positiondata.txt file from UBlearns, and load the data into MATLAB you can use importdata command The dataset is coordinates in millimeters. Convert the dataset into meters.
b Write a MATLAB function called "FiniDiffstm 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 "FiniDiffndm to compute the second derivatives via finite difference of the given vector dataset. Note that the sampling rate of the dataset is Hz therefore 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 components of the velocity and acceleration of the UAV. Then calculate the UAV speed and the magnitude of acceleration via the following equations:
Note that the sampling rate of the dataset is Hz therefore
d Plot the computed and in one figure. Find out the maximum speed and acceleration using MATLAB's function and display them on screen.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
