Question
PLEASE ONLY DO D IN MATLAB. I DID A B AND C, dont need them.
Intro to Computers for Engineers Recitation 11 In todays class, we are modeling a spacecraft. Please submit all functions yo
Write a function called hohmann that calculates the accelerations needed for a Hohmann transfer. It should take two inputs, a
Where F is the force ofthe engine, spaceship.engine, and m is the mass of the spaceship, spaceship.mass. Once you have a, you
0 0
Add a comment Improve this question Transcribed image text
Answer #1

As you have already written the code for the previous questions, I use the names for the variables a given in the question, so it wont be difficult for you.

function[spacecraft,status]=checkfuel(spacecraft,delta_v1,delta_v2)

status=false

m=spacecraft.mass

F=spacecraft.engine

fuel=spacecraft.fuel

alpha=F/m

time=(abs(delta_v1)-abs(delta_v2))/alpha

energy=F*m*time

if energy<fuel

   status=true

  spacecraft.fuel=fuel-energy

spacecraft.mass=mass-(spacecraft.fuel/(c*c))

end #for the if statement

end    #for the function

  

Add a comment
Know the answer?
Add Answer to:
PLEASE ONLY DO D IN MATLAB. I DID A B AND C, dont need them. Intro...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • could you please solve a and b? Chapier 2i. Note: you needn't derive Kepler's laws-but do...

    could you please solve a and b? Chapier 2i. Note: you needn't derive Kepler's laws-but do mention when you are using them, an describe the physical concepts involved and the meanings behind the variables. u) Consider two stars Mi and M; bound together by their mutual gravitational force (and isolated from other forces) moving in elliptical orbits (of eccentricity e and semi-major axes ai and az) at distances 11 in n and r from their center of mass located at...

  • C++ PROGRAM ONLY! For this lab you need to write a program that will read in...

    C++ PROGRAM ONLY! For this lab you need to write a program that will read in two values from a user and output the greatest common divisor (using a recursive implementation of the Euclidean algorithm) to a file. In Lab #3, you implemented this program using an iterative method. Greatest Common Divisor In mathematics, the greatest common divisor (GCD) of two or more integers (when at least one of of them is zero then the larger value is the GCD....

  • I need help with this assignment in C++, please! *** The instructions and programming style detai...

    I need help with this assignment in C++, please! *** The instructions and programming style details are crucial for this assignment! Goal: Your assignment is to write a C+ program to read in a list of phone call records from a file, and output them in a more user-friendly format to the standard output (cout). In so doing, you will practice using the ifstream class, I'O manipulators, and the string class. File format: Here is an example of a file...

  • please Solve part D and E!!!!! PLEASE AND THANK YOU acc1 Our discussion of the Bohr...

    please Solve part D and E!!!!! PLEASE AND THANK YOU acc1 Our discussion of the Bohr model of the hydrogen atom was non-relativistic throughout, which was justified because the velocity of the electron in the nth state of Bohr's hydrogen atom was v= (1) 1377 where a = 1 is the fine-structure constant, and qe is the electron charge, ħ is (the reduced) Planck's constant, and c is the speed of light. Clearly, as n grows, the speed does become...

  • Please solve on only PART 2 b) and c) , PART 1 is only for REFERENCE...

    Please solve on only PART 2 b) and c) , PART 1 is only for REFERENCE :) Part I: Ene concept of a percentile (equivalently, quantile) is very important in data analysis. It applies to both samples and distributions. So, let's get some wi practice with them, starting with the binomial distribution. In prelab, you learned that the function gbinom(p. size prob) gives the p-th quantile of the binomial distribution with parameters n - size and pi prob. tocus on...

  • I need an OUTLINE ONLY (pseudocode/comments). DO NOT DO THE PROGRAMMING ASSIGNMENT. Part I: PA3 Outline...

    I need an OUTLINE ONLY (pseudocode/comments). DO NOT DO THE PROGRAMMING ASSIGNMENT. Part I: PA3 Outline (10 points). Create an outline in comments/psuedocode for the programming assignment below. Place your comments in the appropriate files: main.cpp, functions.h, dealer.cpp, dealer.h, dealer.cpp (as noted below). Place into a file folder named LastnamePA3, the zip the content and hand in a zip file to Canvas. Part II: PA3: Car Dealership (40 points) For Programming Assignment 3 you will be creating a program to...

  • C++ please A typical problem encountered in the study of dynamics is the trajectory problem. In...

    C++ please A typical problem encountered in the study of dynamics is the trajectory problem. In the situation illustrated below, a projectile is fired from the edge of a cliff with an initial velocity, Vo , and a firing angle, A. The cliff has a height, h. It is desired to:           1.       determine the distance, xt, to the target           2.       determine the highest elevation reached, ymax           3.       determine the time to reach the target, tt           4.      ...

  • I need help for part B and C 1) Create a new project in NetBeans called...

    I need help for part B and C 1) Create a new project in NetBeans called Lab6Inheritance. Add a new Java class to the project called Person. 2) The UML class diagram for Person is as follows: Person - name: String - id: int + Person( String name, int id) + getName(): String + getido: int + display(): void 3) Add fields to Person class. 4) Add the constructor and the getters to person class. 5) Add the display() method,...

  • I NEED HELP WITH DEBUGGING A C PROGRAM! PLEASE HEAR ME OUT AND READ THIS. I...

    I NEED HELP WITH DEBUGGING A C PROGRAM! PLEASE HEAR ME OUT AND READ THIS. I just have to explain a lot so you understand how the program should work. In C programming, write a simple program to take a text file as input and encrypt/decrypt it by reading the text bit by bit, and swap the bits if it is specified by the first line of the text file to do so (will explain below, and please let me...

  • Need help with 1: b, c, d, e and f. And 2. Thanks! PRE-LAB EXERCISES average...

    Need help with 1: b, c, d, e and f. And 2. Thanks! PRE-LAB EXERCISES average size. If d is the diameter in millimeters, some pebbles will be bigger and some smaller than the desired average do. Suppose you have a rock crusher. The pebbles it makes have different sizes, but you can adjust the 1. (a) In the histogram below, about how many pebbles are shown to have diameter of greater 150 100 (b) In this distribution (same histogram,)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT