Transcribed TextTranscribed Text

Part 1 The state of the spacecraft is the position and the velocity, [x, y, z, vx, vy, vz], which defines where the spacecraft is at this time. In order to figure out where the spacecraft will be in the future, we can take the time derivative of the state and integrate it over time. The integration will take place in part 2 using ode45 to solve the equation. Build a derivative function two-body.m that calculates the time derivative of the spacecraft position (x, y, z) and velocity (vx, vy, vz). Remember that the derivative of a position is the velocity and that the derivative of a velocity is an acceleration. The accelerations in x, y and z can be found using Equation 7. Besides the position and the velocity inputs, the function will also need a time vector input, as well the value of µ. The time vector will not be used in the velocity and acceleration calculations, but it will be needed for the propagation function later. The function returns a vector with velocity elements (vx, vy, vz) and acceleration elements (ax, ay, az). function [partials] = two-body(time, [x y z vx, vy, vz], µ) where partials = [vx vy vz µ x r3 µ y r3 µ z r3 ]. (15) Figure 2: The spacecraft is orbiting the Earth in a Low Earth Orbit.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

function partials=twobody(time,A,mu)
%[x y z vx vy vz]=A;
$25.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available MATLAB for Mathematics Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats