{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Goddard Main File

Goddard Main File - GODDARD FINAL PROJECT C OLE P...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
G ODDARD F INAL P ROJECT C OLE P AGE %Goddard Problem Main File %MAE 2117 %Cole Page %May 3rd 2011 clc %A program that simulates the motion of a sounding rocket. global g_sealevel %reference value sea level global r_earth %radius of earth global rho_zero %density at sea level global scale_hgt %scale height global s_ref %reference area global cd %drag coefficient global thrust %thrust global m_dot %rate of mass change m_i = 200; %initial mass m_f = 100; %final mass t_b = 50; %Burn time. i_sp = 300; %Specific impulse s_ref = .196349541; %reference area cd = .2; %drag coefficient rho_zero = 0.002377; scale_hgt = 23800.0; g_sealevel = 32.17405; r_earth = 2.092567257e7; zero = 0.0; two = 2.0; %The program prints to the file "Sound.prt" n_states = 3; print_increment = 2.0; states(1) = 0; states(2) = 0; states(3) = m_i/g_sealevel; time = 0; %set initial time to zero
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
delta_t = input('Please enter the integration time step'); if (delta_t > print_increment) print_increment = delta_t; end %setup initial given equations for mass change and thrust m_dot = (m_f - m_i)/g_sealevel/t_b; thrust = -m_dot*g_sealevel*i_sp; fid = fopen('Sound.dat','a'); fprintf(fid,'Time Altitude Velocity Weight\n'); fprintf(fid,' (ft) (ft/sec) (lb)\n'); fprintf(fid,'==== ======== ======== ======\n'); fprintf(fid,'%f %f %f %f
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern