我正在寻找有关如何使用 Runge-Kutta 4 技术推断 GLONASS 卫星的解释。我的问题基本上是关于如何通过将输入应用于函数来从 K1 跳到 K2 步骤及以后。我无法确切地弄清楚该功能应该是什么。这是我的代码:
def satellite_acceleration(self, radius):
mu_hat = cs.GM / (radius**2)
x_a_hat = self.sv_pos_X / radius
y_a_hat = self.sv_pos_Y / radius
z_a_hat = self.sv_pos_Z / radius
rho_hat = cs.SEMI_MAJOR_AXIS / radius
modified_acc_xa = (-mu_hat*x_a_hat) + ((3/2) * cs.C_20 * mu_hat * x_a_hat * (rho_hat**2) * (1 - (5*(z_a_hat**2)))) + self.sv_acc_X_LS + ((cs.OMEGAE_DOT**2) * self.sv_pos_X) + (2 * cs.OMEGAE_DOT**2 * self.sv_vel_Y)
modified_acc_ya = (-mu_hat*y_a_hat) + ((3/2) * cs.C_20 * mu_hat * y_a_hat * (rho_hat**2) * (1 - (5*(z_a_hat**2)))) + self.sv_acc_Y_LS + ((cs.OMEGAE_DOT**2) * self.sv_pos_Y) - (2 * cs.OMEGAE_DOT**2 * self.sv_vel_X)
modified_acc_za = (-mu_hat*z_a_hat) + ((3/2) * cs.C_20 * mu_hat * z_a_hat * (rho_hat**2) * (3 - (5*(z_a_hat**2)))) + self.sv_acc_Z_LS
X_dot_arrow = [self.sv_vel_X, self.sv_vel_Y, self.sv_vel_Z, modified_acc_xa, modified_acc_ya, modified_acc_za]
return X_dot_arrow
def runge_kutta_4(self, X_dot_arrow):
X_arrow = [self.sv_pos_X, self.sv_pos_Y, self.sv_pos_Z, self.sv_vel_X, self.sv_vel_Y, self.sv_vel_Z]
h = 30 #Seconds (to change dependent on epoch interval)
t = 0 #Iterator
w = xxx #TBC
for i in range(total_time):
k_1 = h * X_dot_arrow
#k_1 = h * self.function(t, w)
k_2 = h * self.function(t + (h/2), w + (k_1 / 2))
k_3 = h * self.function(t + (h/2), w + (k_2 / 2))
k_4 = h * self.function(t + h, w + k_3)
w = w + ((k_1 + (2*k_2) + (2*k_3) + k_4) / 6)
t = t + h
def function(self, t, w):
pass
有很多关于如何推断 GPS 卫星的文献,但不幸的是,GLONASS 似乎更加有限。欢迎所有反馈。