Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ananthas
Aero343 Project - Satellite Taxi
Commits
7aeb9aa5
Commit
7aeb9aa5
authored
Oct 23, 2021
by
aelkawas
Browse files
Sim files and calculations
parent
c10409d2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Calculations.m
0 → 100644
View file @
7aeb9aa5
Re = 6378;
mu = 398600.4;
a_p = 638+Re;%parking orbit
a_Leo = 550+ Re;
a_Geo = 35786 +Re;
i_p = 46 *pi/180; %average inclnation
i_geo = 0;
i_leo = 53* pi/180;
A = 0.00001; %Based on thrusters
deltaT = -sqrt(mu)/(A*sqrt(a_p)) + sqrt(mu)/(A*sqrt(a_Leo))
deltaV = A*deltaT; %km/hr
deltaTHours = deltaT/(3600);
deltaTDays = deltaT/(24*3600);
\ No newline at end of file
SputnikSim.m
0 → 100644
View file @
7aeb9aa5
Re = 6378;
mu = 398600.4;
R0 = [-8.058685464116713e+002;...
-4.135050989428283e+003;...
5.071447347723579e+003];
V0 = [6.04068079277917;
3.52422658592595;
3.83339310219652];
X0 = [R0; V0];
t0 = 0;
tstep = 20;
tfinal = 96.2*60*5;
tspan = t0: tstep: tfinal;
options = odeset('AbsTol', 1e-6, 'RelTol', 1e-8);
[Tp, Xp] = ode45(@newton, tspan, X0, options);
figure(1); hold off;
plot3(Xp(:,1), Xp(:,2), Xp(:,3), 'g-', 'linewidth', 3);
xlabel('x (km)');
ylabel('y (km)');
zlabel('z (km)');
[XS, YS, ZS] = sphere(30);
figure(1);
hold on;
surf(XS*Re, YS*Re, ZS*Re);
axis([-1e4, 1e4, -1e4, 1e4, -1e4, 1e4]);
figure(2);
plot(Tp, sqrt(Xp(:,1).^2 + Xp(:,2) + Xp(:,3).^2) - Re,'linewidth', 3);
ylabel('h = r-R_e (km)')
xlabel ('t (sec)')
newton.m
0 → 100644
View file @
7aeb9aa5
function Xdot = newton(t, X)
mu = 398600.4405;
r= X(1:3);
v = X(4:6);
Xdot(1:3) = v;
rn = norm(r);
Xdot(4:6) = -mu/rn^3*r;
Xdot = Xdot(:);
return;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment