- The
Rk4OrbitPropagation
class calculates the position and velocity of satellites with 4th Order Runge-Kutta method(RK4).
src/dynamics/orbit/orbit.hpp, cpp
- Definition of
Orbit
base class
- Definition of
src/dynamics/orbit/initialize_orbit.hpp, .cpp
- Make an instance of orbit class.
src/dynamics/orbit/rk4_orbit_propagation.hpp, .cpp
- Select
propagate_mode = RK4
in the spacecraft's ini file. - Select
initialize_mode
as you want.DEFAULT
: Use default initialize method (RK4
andENCKE
use position and velocity,KEPLER
uses init_mode_kepler)POSITION_VELOCITY_I
: Initialize with position and velocity in the inertial frameORBITAL_ELEMENTS
: Initialize with orbital elements
- The position and velocity of the satellite are updated by using RK4. As the input of RK4, the six-state variables are set. These state variables are the three-dimensional position [$x$,
$y$ ,$z$] and three-dimensional velocity [$v_x$,$v_y$ ,$v_z$ ] at the inertial coordinate. Here, the inertial coordinate is decided by thePlanetSelect.ini
- As the force which works to the satellite motion is the external acceleration [$a_x$,$a_y$,$a_z$] calculated from the disturbance class or thruster class and the gravity force from the center planet, which is defined in
PlanetSelect.ini
. As a summary, the orbit is calculated as the following equation.
- Verify the numerical integration error of the RK4 method.
- The output of the simulation was compared with the analytical solution.
- The Verifications were conducted in the case of
simulation_step_s
andorbit_update_period_s
were 0.1(sec), 1(sec), and 10(sec). - The initial values of the propagation are as follows:
initial_position_i_m(0) = 1.5944017672e7 initial_position_i_m(1) = 0.0 initial_position_i_m(2) = 0.0 initial_velocity_i_m_s(0) = 0.0 initial_velocity_i_m_s(1) = 5000.0 initial_velocity_i_m_s(2) = 0.0
- This is a circular orbit, which period is about 20040(sec). The center of the orbit is Earth.
- As a reference, the analytical solution was used. The solution is as follows:
- All of the effects of disturbance and environment were disabled.
- The simulation time is 60120(sec), which is approximately three-period. In addition, for a long-term test, the case in which simulation time is 200400(about 10 periods) was tested. The
orbit_update_period_s
of this case is 1(sec).
- In the cases of
orbit_update_period_s=0.1
andorbit_update_period_s=1
, the error is kept within$10^{-6}$ order. However, once the error grows, it will get bigger and bigger. - In the case of
orbit_update_period_s=10
, the error quickly grows up to$10^{-4}$ order.
- In the long-term test result, it is clear that the error magnitude grows proportionally to the time.
- At first, the output of STK would be used for reference. However, it did not work well. Data were input as follows:
- However, the result is as follows:
- As this figure shows, the initial values in the result are slightly different from the input.
- In the .sa files, the initial values of
$x, y, z, v_x, v_y, v_z$ are converted into elements of orbit and stored. The error might occur in the process of this conversion.
- In the .sa files, the initial values of
NA