@@ -25,7 +25,7 @@ def __init__(self,
25
25
epoch ,
26
26
mu_au3_d2 ,
27
27
center = None ,
28
- target = None ,
28
+ target_name = None ,
29
29
):
30
30
""" Calculates the position of an object using 2 body propagation
31
31
@@ -50,10 +50,14 @@ def __init__(self,
50
50
self .epoch = epoch
51
51
self .mu_au3_d2 = mu_au3_d2
52
52
self .center = center
53
- self .target = target
53
+ self .target_name = target_name
54
54
55
55
self ._rotation = None # TODO: make argument?
56
56
57
+ @property
58
+ def target (self ):
59
+ return self # this instance itself represents the target object
60
+
57
61
@classmethod
58
62
def _from_periapsis (
59
63
cls ,
@@ -65,7 +69,7 @@ def _from_periapsis(
65
69
t_periapsis ,
66
70
gm_km3_s2 ,
67
71
center = None ,
68
- target = None ,
72
+ target_name = None ,
69
73
):
70
74
"""Build a `KeplerOrbit` given its parameters and date of periapsis."""
71
75
gm_au3_d2 = gm_km3_s2 * _CONVERT_GM
@@ -84,7 +88,7 @@ def _from_periapsis(
84
88
t_periapsis ,
85
89
gm_au3_d2 ,
86
90
center ,
87
- target ,
91
+ target_name ,
88
92
)
89
93
90
94
@classmethod
@@ -93,7 +97,7 @@ def _from_true_anomaly(cls, p, e, i, Om, w, v,
93
97
mu_km_s = None ,
94
98
mu_au3_d2 = None ,
95
99
center = None ,
96
- target = None ,
100
+ target_name = None ,
97
101
):
98
102
""" Creates a `KeplerOrbit` object from elements using true anomaly
99
103
@@ -142,7 +146,7 @@ def _from_true_anomaly(cls, p, e, i, Om, w, v,
142
146
epoch ,
143
147
mu_km_s ,
144
148
center = center ,
145
- target = target ,
149
+ target_name = target_name ,
146
150
)
147
151
148
152
@@ -158,7 +162,7 @@ def _from_mean_anomaly(
158
162
epoch ,
159
163
gm_km3_s2 ,
160
164
center = None ,
161
- target = None ,
165
+ target_name = None ,
162
166
):
163
167
""" Creates a `KeplerOrbit` object from elements using mean anomaly
164
168
@@ -214,7 +218,7 @@ def _from_mean_anomaly(
214
218
epoch ,
215
219
gm_au3_d2 ,
216
220
center ,
217
- target ,
221
+ target_name ,
218
222
)
219
223
220
224
def _at (self , time ):
0 commit comments