Matlab to produce numerical and analytical solutions, MATLAB Programming

Assignment Help:

This assignment is motivated by the use of flybys of planets / moons in spacecraft missions to alter a spacecraft's trajectory (flight path). Planetary flybys can be used to not only change the direction of a spacecraft's motion, but to also alter its speed. Such flybys are often referred to as "gravity assists" since the change to the spacecraft's motion is enabled by the force on the spacecraft due to the planet's gravity field. For example, missions to the outer solar system typically use the gravity of Jupiter to provide a "boost" to the spacecraft's speed, such that the spacecraft can actually make it to the outer solar system. In contrast, missions to the inner solar system typically use the gravity field of one or more planets to slow the spacecraft down enough that it can go into orbit around the desired planet.

In this assignment we will construct a simplified planetary flyby. The simplifications are that we assume an otherwise "straight-line" path of the spacecraft (rather than starting with an elliptical orbit around the sun, or a hyberbolic trajectory into the outer solar system), and we assume that the planet is stationary during the flyby (in practice the planet is of course in an elliptical orbit around the Sun). In the assignment we will draw on much of what we have learned in the course to implement a numerical integration algorithm in MATLAB to compute a spacecraft's acceleration, velocity and position as it flys by a planet. The assignment will also demonstrate how you can use

MATLAB to produce numerical solutions to problems for which there is no simple analytical solution.

Coding Overview

For this assignment you will write 3 functions and several scripts. The functions are as follows:

a.) The guts of your code will be a function get_traj.m that will return the acceleration, velocity and position vectors along the complete spacecraft trajectory. get_traj.m will call three subfunctions gravacc.m,

scvelpos.m, and checkinit.m.

b.) gravacc.m will calculate the gravitational acceleration on the spacecraft at each time step.

c.) scvelpos.m will compute the instantaneous change in position and velocity of the spacecraft due to the gravitational acceleration caused by the planet.

d.) checkinit.m will check that your initial spacecraft velocity and position are feasible.

e.) The main script(s) will call get_traj.m for various initial (starting) conditions that I will give you. The main script(s) will contain the code to generate the requested figures or output in each section.

IMPORTANT POINTS:

1. The use of SI units is ESSENTIAL to this assignment. Make sure to convert ALL your length, mass and time variables into m, kg and seconds before doing any calculations. For plotting purposes it will be easier to use km, convert m to km only for plotting.

2. The amount of code required for this assignment is not huge. For example, my versions of functions get_traj.m,

gravacc.m, scvelpos.m, and checkinit.m contain 11, 4, 2 and 3 lines of code respectively, not including comment and help lines. However, you should be vigilent about being consistent in your use of variable names, and in not generating unnecessary variables; otherwise your code (and thinking!) will get out of hand.

3. Make sure your code is organized into easily readable, compact coding "blocks", with appropriate comment lines, and separated by white space.

4. All functions must contain help lines.


Related Discussions:- Matlab to produce numerical and analytical solutions

Electricity market clearing price, how to obtain matlab coding for the mark...

how to obtain matlab coding for the market clearing price

Plot the input and the output of the filter on a single plot, An FIR filter...

An FIR filter has coefficients b = [ 1.0000   -0.6387    1.0214    0.8210   -0.7470    1.0920 ] (a) Find H(z) for the filter and plot its frequency response (magnitude and phase

Hold and legend function - plot functions, Hold and legend function: ...

Hold and legend function: hold: is a toggle which freezes the present graph in the figure window, so that the new plots will be superimposed on the present one. Just hold

Math+Matlab, Read the document and quote me ... https://www.dropbox.com/s...

Read the document and quote me ... https://www.dropbox.com/s/pvq4f45fpwajibi/Course_wk%20_2013_.pdf

Random numbers, Random numbers: Whenever a program is being written to...

Random numbers: Whenever a program is being written to work with a data, and the data is not yet available, it is frequently useful to test the program first by initializing t

Create matlab graphs of data properly annotated, A. Introduction The p...

A. Introduction The project consists of two parts. In the first part you are asked to perform some preliminary calculation and plotting, and to write the introduction for your

Input in a for loop, Input in a for Loop: The script below repeats the...

Input in a for Loop: The script below repeats the process of prompting the user for a number, and echo printing the number (that means simply printing it back out). A for loop

Batch reactor, how to wriet program for batch reactor

how to wriet program for batch reactor

Program to find the minimum total cost for the fence, A fence enclosure con...

A fence enclosure consists of a rectangle of length L and width 2 R , and a semicircle of radius R , as shown in Figure 1. The enclosure is to be built to have an area of 1600 m

Reading from a file, Reading from a File: A file has been once created...

Reading from a File: A file has been once created; it can be read into a matrix variable. When the file is a data file, the load function will read from the file filename.ext

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd