The invention discloses a real-time two-dimensional calculation method for a ground fire
transfer orbit based on a variable step size method, and the method mainly comprises the following steps: 1, setting
flight time, and obtaining gravitational constants of the earth, the Mars and the sun; 2, initializing the
system; 3, judging a time stage; 4, screening time steps; 5, calculating the motion trail of the
spacecraft based on the Newton's law of motion and the universal
gravitation law; 6, solving the position and speed of the
spacecraft through a numerical integration method; 7, updating the
mass change of the
spacecraft in real time; and 8, drawing a spacecraft
orbit and outputting related data. The method can be used for simulating the
orbit behavior of the spacecraft between the earth and the Mars, especially under the condition that a
nuclear power propulsion
system is considered. According to the method, the motion trail of the spacecraft in the complex
gravitational field can be accurately calculated based on
classical mechanics and numerical
simulation technologies, and theoretical support is provided for design and optimization of
aerospace tasks.