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
| def calculation_spacecraft_status(self, t): """ :param t: 航天器轨道状态信息外推时间 :return: 航天器轨道状态信息 """ def delta_E_equation_t(delta_E): eq = delta_E + sigma_t * (1 - np.cos(delta_E)) / np.sqrt(self.a_t) - \ (1 - self.r_t / self.a_t) * np.sin(delta_E) - np.sqrt(self.u / self.a_t**3) * t return eq
def delta_E_equation_c(delta_E): eq = delta_E + sigma_c * (1 - np.cos(delta_E)) / np.sqrt(self.a_c) - \ (1 - self.r_c / self.a_c) * np.sin(delta_E) - np.sqrt(self.u / self.a_c**3) * t return eq
def Lagrange_factor_c(sigma, delta_E): r = self.a_c + (self.r_c - self.a_c) * np.cos(delta_E) + sigma * np.sqrt(self.a_c) * np.sin(delta_E) F = 1 - self.a_c * (1 - np.cos(delta_E)) / self.r_c G = self.a_c * sigma * (1 - np.cos(delta_E)) / np.sqrt(self.u) + \ self.r_c * np.sqrt(self.a_c / self.u) * np.sin(delta_E) F_c = -np.sqrt(self.u * self.a_c) * np.sin(delta_E) / (r * self.r_c) G_c = 1 - self.a_c * (1 - np.cos(delta_E)) / r
return F, G, F_c, G_c
sigma_t = np.dot(self.R0_t, self.V0_t) / np.sqrt(self.u) sigma_c = np.dot(self.R0_c, self.V0_c) / np.sqrt(self.u) delta_E_t = fsolve(delta_E_equation_t, 0) delta_E_c = fsolve(delta_E_equation_c, 0) F, G, F_t, G_t = self.Lagrange_factor(sigma_t, delta_E_t) R_i_t = F * self.R0_t + G * self.V0_t V_i_t = F_t * self.R0_t + G_t * self.V0_t
F, G, F_c, G_c = Lagrange_factor_c(sigma_c, delta_E_c) R_i_c = F * self.R0_c + G * self.V0_c V_i_c = F_c * self.R0_c + G_t * self.V0_c
return np.array([R_i_c, V_i_c]).ravel(), np.array([R_i_t, V_i_t]).ravel()
|