## How to calculate the orbit of Tianwen-1?

The detailed code for simulating orbit calculation through Python has been open sourced to GitHub, you can click here View the source code.

The Tianwen-1 Mars Rover from Earth to Mars uses an improved Hohmann transfer track (fast transfer track), the starting point is at the time of departure The earth, the ending point is Mars at the time of arrival, and the focus is on the elliptical trajectory between the earth and the sun at the time of departure.

On the NASA JPL Horizons website, we can query planetary trajectories and position data , And then establish the coordinates of the Earth when the Tianwen-1 probe departs and the coordinates of Mars when it arrives. According to the fast transfer orbit, an ellipse can be drawn (as shown in the figure below). After curve simulation, you can use Elliptic equation and one-dimensional quadratic equation to solve all the coordinate points on the curve, which is the trajectory of Tianwen-1.

Note: 1. Up to now, the track of Tianwen-1 can also be found on NASA JPL Horizons, and the data is more real and accurate. The running example on the website has been replaced with this data; 2. Thanks to the Weibo blogger @haibaraemily gave me professional knowledge suggestions, and at the same time it introduced the Hörmann transfer track and fast The difference between the transfer trajectory; 3. The example in the open source project is to calculate the trajectory from the perspective of principle, which is for learning reference only