-
Notifications
You must be signed in to change notification settings - Fork 2
/
mission02.py
49 lines (29 loc) · 1.11 KB
/
mission02.py
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
42
43
44
45
46
47
48
49
import numpy as np
from toolbox import *
"""
Task 3 - Sun-Pointing Reference Frame Orientation
Determine an analytic expressions for the sun pointing reference frame Rs by defining the DCM [RsN]
As the axis are fixed, there is no angular velocity.
"""
matrix_RsN = np.round(EAtoDCM313(SUN_FRAME), 6)
print(f"Matrix RsN at 0s:\n{matrix_RsN}")
"""
Task 4 - Nadir-Pointing Reference Frame Orientation
Determine an analytic expression for the nadir pointing reference frame Rn by defining the DCM [RnN]
"""
## Matrix RnH
matrix_RnH = np.round(EAtoDCM313(NADIR_FRAME), 6)
## Matrix HN
## Find HN at 330s
matrix_HN = orbit_integrator('LMO', 330, 1)
## Matrix RnN at 330s
matrix_RnN = np.round(np.matmul(matrix_RnH, matrix_HN), 6)
print(f"Matrix RnN at 330s:\n{matrix_RnN}")
## Angular velocity in inertial frame
matrix_NH = matrix_HN.T
w_inertial_nadir_330 = np.matmul(matrix_NH, w_NADIR.T)
print(f"Angular velocity in N frame at 330s:\n{w_inertial_nadir_330}")
"""
Task 5 - GMO-Pointing Reference Frame Orientation
Determine an analytic expression for the communication mode reference frame Rc by defining DCM [RcN]
"""