Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

clear; clc; 8Define a 3D vector starting at the origin A = 13,1,41'; *Plot the vector in 3D plot30 A(1)],[0 A(2),[0 A(3)]); axis equal; grid

image text in transcribed
image text in transcribed
clear; clc; 8Define a 3D vector starting at the origin A = 13,1,41'; *Plot the vector in 3D plot30 A(1)],[0 A(2),[0 A(3)]); axis equal; grid on; text(1.5,.5,2,'\leftarrow A) Define some rotations - remember to use radians for all calculations psi- theta - + phi = Define the rotation matrices Rpsi - 3 Rtheta = Rphi - Part 1: Write a Matlab script that rotates a 3D vector along the psi, theta and phi axis Here's a template to get you started: Lab_2_template.m Does it matter in which order the rotations are done? Why or why not? Test with at least 3 different 3D vectors and different combinations of rotation orders. Make sure you plot the vectors and annotate the order of rotation and it's direction Part 2: Generate a function that generates a Rotation Matrix Provide phi, theta and psi as inputs Test your function by rotating 3D vectors (at least 2) and plot them How do you know that your answers are correct? Describe your rationalization. Part 3: Implement your knowledge An aircraft is at point p (pn = 100, pe = 50, pd = -20) and moves forward with u = 8 m/s, v = 0 m/s and w=-1 m/s while its roll, pitch and yaw remains constant at 0 = 0 ,0 = 6', y = 120". After 2 seconds, where did it end up? o hints: . u, V and w are in the body frame of the UAS Rotate from the body frame to the vehicle frame . Pi = po + idt Now, add some wind (make up some numbers for wn, we, W.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions