This project was developed as the continuation of the Satellite Observations project, in which we start from a set of TLEs to compute an observations strategy to be followed during the observation window. Subsequently, once the observations have been taken, we have created a dataset, which will be the input for this project. Hence, the goal of this project is to perform an application of three different Initial Orbit Determination methods on three different datasets and compare their results. Note that this project is developed around three different datasets but it is NOT limited to them.
Methods Comparison | Trace of the Covariance Matrix |
---|---|
- Introduction to Initial Orbit Determination
- Laplace (3-Point) Initial Orbit Determination
- Circular Initial Orbit Determination
- Kalman Filter Initial Orbit Determination
We start with three different datasets we can choose from, each one containing the observations of a different satellite. The satellites in question are the following:
- Sentinel 3A
- Sentinel 3B
- Beidou
Once we have chosen the satellite we will also need to load the associated TLE and the Earth Observation Parameters relative to the observation date.
Finally, for comparison purposes we will also compute the real orbit of the satellite using the SGP4 Propagator from the TLEs, which will be used as a reference for the results of the three different methods.
The Laplace Method, also known as the 3-Point Gauss Method, is a widely-used technique for Initial Orbit Determination (IOD). The main purpose of the method is to derive the initial orbital elements (i.e., the position and velocity vectors) of an object orbiting in space, given three position measurements at three distinct times. These position vectors are ideally observed from a single location (such as a ground station or another spacecraft) and are provided in an appropriate Earth-Centered Inertial (ECI) frame.
-
Data Retrieval: The right ascensions and declinations from the three observations (
RA1
,RA2
,RA3
,DEC1
,DEC2
,DEC3
) and corresponding times (t1
,t2
,t3
) are extracted from the input data. -
Compute Observations Position Vectors: The unit vectors
L1
,L2
, andL3
are computed from the right ascension and declination of each observation. -
Interpolation: The position versor
L
, angular velocitydL
, and angular accelerationddL
of the satellite are computed using linear interpolation ofL1
,L2
, andL3
with the adjusted times. -
Compute Local Variables: Variables
D
,D1
, andD2
are computed, which involve determinants of vectorsL
,dL
,ddL
,ddRgs
, andRgs
. -
Solve for rho and r: These are the geometric range and the magnitude of the position vector of the satellite, respectively. They are solved using two equations involving
rho
,r
, and the previously computed local variables. -
Select Real Solutions: The script selects the real and positive solutions for
rho
andr
from the possible solutions obtained. -
Compute Position and Velocity Vectors: The position vector (
r_vect
) and velocity vector (v_vect
) of the satellite at timet
, which is the intermediate timet2
, are finally computed using the solved values ofrho
andr
, and the given variables. If multiple acceptable solutions are found or if no acceptable solution is found, the script throws a warning or an error, respectively.
The CircularIOD
function performs Initial Orbit Determination (IOD) when two optical observations are available, under the assumption of a circular orbit. The goal is to compute the initial position and velocity of a satellite using the right ascensions and declinations from two observations. These observations are provided in an Earth-Centered Inertial (ECI) frame. The method employs an iterative process, beginning with an initial guess for the range between the satellite and observer at the first observation (rho1_0
).
-
Data Retrieval: The right ascensions and declinations (
RA1
,RA2
,DEC1
,DEC2
) and corresponding times (t1
,t2
) of the two observations are extracted from the input data. -
Compute Observations Position Vectors: The unit vectors
L1
andL2
are computed using the right ascension and declination of each observation. -
Iterative Computation of rho1: The function sets up an iterative process to calculate
rho1
, the geometric range from the observer to the satellite at the first observation. The process commences with an initial guess forrho1
, increasing it with a small step size (rho_step
) each iteration until the optimization condition is met. -
Computation of r1_vect and r:
r1_vect
, the position vector of the satellite at the first observation, is calculated as the sum of the observer's position (Rgs1
) and the product ofrho1
andL1
. The magnitude ofr1_vect
is denoted asr
. -
Solve for rho2: The geometric range
rho2
between the observer and the satellite at the second observation is computed usingL2
,Rgs2
, andr
. -
Computation of r2_vect:
r2_vect
, the position vector of the satellite at the second observation, is computed as the sum of the observer's position (Rgs2
) and the product ofrho2
andL2
. -
Angular Difference and Actual Angular Velocity Calculation: The angle
dtheta
betweenr1_vect
andr2_vect
is calculated. Using the time differencedt
between the two observations, the actual angular velocityomega_act
of the satellite is determined. -
Check for Convergence: The iterative process checks if the absolute difference
J
between the actual angular velocityomega_act
and the theoretical angular velocityomega_th
(derived frommu
andr
) is less than a toleranceJ_tol
. IfJ
is less than this tolerance, the optimization flagopt_flag
is set to 0, terminating the iterative process. -
Compute Velocity Vector: Finally, the velocity vector
v1_vect
of the satellite at timet1
is computed using the orbital angular momentum vectorh_hat
, the unit vectorr1_hat
in the direction ofr1_vect
, and the magnitude of the velocityv1
.
In this part of the code, the Kalman Filter is applied from the first estimate found in the Circular IOD. We choose this starting point since our orbits are nearly circular, but if that wasn't the case it would be best to change the initial state to the one found using the SGP4 propagation, or X0_SGP4
.
- The code begins by defining the initial covariance matrix
P0
with TLE Accuracy. - Initial conditions are defined by the variable
X0
, which are the initial state estimates derived from the SGP4 model. - Measurement error matrix
R
and model error matrixQ
are defined. - Two matrices
X
andPs
are initialized for storing the state estimates and covariance matrices at each iteration.
- Iterations are performed using a loop.
- For each iteration, the state is propagated using the
DynamicalModel_Kalman
dynamical model, wherePhi
is the state transition matrix. - The covariance is propagated to get the estimated covariance
P_est
at the next time step. - The Kalman Gain Matrix
K
is computed, which balances the contribution between the measurement and the predicted state in the updated state estimate. - The innovation is computed as the difference between the actual measurement
z
and the measurement predicted from the propagated statezf
. - The state update
Xf_upd
is computed as the product of the Kalman Gain and the innovation. This update is then added to the propagated state to get the updated stateXf
. - The updated covariance
Pk
is computed. - The function checks whether
Pk
andP_est
are positive definite using theisPositiveDefinite
function. - The state estimates and the covariance matrix are stored in
X
andPs
respectively.
- The final state estimate
Xf_KF
is obtained. - The covariance matrix traces are plotted, which represent the evolution of the total variance in the state estimates.
- The classical orbital elements are calculated and displayed.
- The state estimates are compared between the Kalman Filter and SGP4 Propagation.
The entire process relies on the correct modeling of the satellite dynamics and the measurement function, which directly impact the quality of the state estimates.
Contributor: Leonardo Russo
Last Updated: 05/05/2023