Advertisement
hiddenGem

Satellites in Orbit

Jun 29th, 2020
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 1.19 KB | None | 0 0
  1. %% Satellites in Orbit
  2. % Assessment:  08
  3. % Calculates the angular momentum, rotational kinetic energy,
  4. %   and the angle between those two values for problem 1. Calculates the
  5. %       specific angular momentum for problem 2.
  6.  
  7. %% Problem 1
  8.  
  9. I = [5000 0 0               %[kg-m^2] Moment of inertia
  10.     0 5000 0
  11.     0 0 9000];
  12. omega = [0.2
  13.     0.4
  14.     2.3];                       %[rad/s] Angular velocity
  15. omegaT = omega';
  16. H = I * omega;                  %[kg-m^2/s]Angular momentum  
  17. Trot = .5 * omegaT * H;             %[J] Rotational kinetic energy
  18. theta = acos(dot(H, omega)/(norm(H)*norm(omega)));        % [rad] Angle between the Angular velocity and momentum vectors
  19. fprintf('The angular momentum is: %i kg*m^2 \n', H)
  20. fprintf('The rotational kinetic energy is: %e Joules \n', Trot)
  21. fprintf('The angle between the angular velocity and momentum is: %i rad \n', theta)
  22.  
  23. %% Problem 2
  24.  
  25. r = [1150               %[km] Position vector of the satellite
  26.     9700
  27.     -2400];
  28. v = [-6.49              %[m/s] Velocity vector of the satellite
  29.     -1.28
  30.     1.65];
  31. h = cross(r,v);          %[km^2/s] Specific angular momentum vector
  32. fprintf('The specific angular momentums are: %i1 km^2/s, %i2 km^2/s, and %i3 km^2/s', h)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement