-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmain.m
41 lines (36 loc) · 1.43 KB
/
main.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
%% ORBIT PARAMETERS
RAAN = 38; % Right Ascension of Ascendent Node [deg]
w = 35; % Argument of perigee [deg]
v0 = 54; % True anomaly at the departure [deg]
i = 51.64; % inclination [deg]
a = 6700; % Major semi-axis (>6378) [km]
e = 0.001; % Eccentricity
start_time = datetime('now'); % UTC time of sattelite starting point
norb = 5; % number of orbits
time_step = 60; % Calculate point every time_step [s],
% decrease for faster calculation
%% CALCULATION
[lla, time] = orbit_calc(RAAN, w, v0, i, a, e, start_time, norb, ...
time_step);
% B Column vectors of Magnetic field vector [nT]
% H Horizontal component of Magnetic field B [nT]
% D Magnetic field Declination [deg]
% I Magnetic field Inclanation [deg]
% F Magnetic field Intensity [nT]
[B, H, D, I, F] = b_calc(lla, time);
%% PLOTTING
subplot(3,1,1)
plot(F);
title('F - Magnetic field Intensity ')
xlabel('point num')
ylabel('[nT]')
subplot(3,1,2)
plot(D);
title('D - Magnetic field Declination')
xlabel('point num')
ylabel('[deg]')
subplot(3,1,3)
plot(I);
title('I - Magnetic field Inclanation')
xlabel('point num')
ylabel('[deg]')