Advertisement
Guest User

AE3613 HW 6 Problem 2

a guest
Oct 25th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 1.77 KB | None | 0 0
  1. function AE3613HW6P2()
  2. %AE3613 Homework #6
  3. %Christopher Bates
  4. %Due 27 Oct 2016
  5.  
  6. %Problem Number 2
  7. %Setting variables
  8. rpd = 3.14159/180; % radians per degree
  9. minperhr = 60;
  10. secpermin = 60;
  11. mu = 3.986 * 10^5;
  12. %%%%%%From HW5 answer%%%%%%
  13. TOFhr = 36.976952; %Time of flight in hours
  14. TOFmin = TOFhr * minperhr;
  15. TOFsec = TOFmin * secpermin;
  16. a = 58714.9036; % km
  17. e = 0.88456; % e = eccentricity
  18. asd = 288.493; % Dr.P solution in degrees
  19. DeltaV = 3.380; % km/s
  20.  
  21. n = (mu/(a^3))^(.5); % n = 4.4376e-05
  22.  
  23. % Using MATLAB's Solve function
  24.         %E1 = eccentric anomaly
  25. syms E2
  26. eqn = ((E2-e*sin(E2))==n*TOFsec); %Kepler's Eqn
  27.  
  28. solE2 = solve(eqn,E2); %Solution in Radians = 5.08251
  29.  
  30. %Solution in degrees
  31. solutiondeg = solE2/rpd;  % = 291.2069 degrees
  32.  
  33. %Calculating error using Dr.P's values
  34.  
  35. error = (asd-solutiondeg)/asd;
  36.  
  37. %Percent error = -9.4070e-01% error
  38. i = error*100;
  39. j = solE2;
  40.  
  41. fprintf('\nThe calculated eccentric anomaly is: %12.4e\n',j);
  42. fprintf('The calculated percent error is: %16.4e %% \n',i);
  43.  
  44.  
  45. %%%%%Part 2%%%%%
  46. satmass = 50; %kg
  47. I_sp = 400; % sec
  48. mp= satmass*(1-e^(DeltaV/I_sp)); % .0518 kg
  49.  
  50. fprintf('The calculated mass of propellant is: %11.4e kg \n',mp);
  51. %%%OUTPUT%%%
  52. %The calculated eccentric anomaly is:   5.0825e+00
  53. %The calculated percent error is:      -9.4070e-01 %
  54. %The calculated mass of propellant is:  5.1799e-02 kg
  55.  
  56.  
  57. %Assuming the propellant mass was calculated properly, the impact this will
  58. %have on the smallsat design is probably small. This amount of propellant is
  59. %half of a percent of the weight of the smallsat. The weight of the
  60. %propellant used is just over a pound, so this weight can possibly even be
  61. %recovered by reducing the weight of something else or by cutting the
  62. %amount of fuel in the maneuvering thrusters.
  63. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement