When propagating satellites in orbit around the Earth it is often desirable to use a more accurate model which includes the effects of atmospheric drag and the effects of the non-uniform gravity due to the Earth’s oblate shape and the influence of the moon and sun. These effects all perturb the ideal Kepler orbit and are collectively called “simplified general perturbation” (SGP) models. The most commonly used of the models is SGP4. See Wikipedia.
Code to evolve a satellite using SGP4 is in the public domain and has been adapted for use in GravityEngine. This mode is selected by choosing the SGP4_PROPAGATOR Evolve mode in the OrbitUniversal component. When selected, the future positions of the satellite will be determined by the SGP4 algorithm. The effects of atmosphere, non-spherical Earth etc. will result in an orbit that changes over time. One interesting consequence of this is that a sun-synchronous orbit can now be modelled, something that is not possible with a Kepler propagator (this is due to the fact that the orbital precession of a sun synchronous orbit is a consequence of the non-spherical gravitational field of the Earth).
The use of the SGP4_PROPAGATOR mode assumes that the GE units have been set to solar and that the satellite is orbiting the Earth (with a mass of 5.972 in units of 1E24 kg).
Initializing the Orbit
The initial orbit parameters can be set with any of the usual orbit parameter choices. If the orbital elements are entered directly, e.g. using DOUBLE mode the SGP4 initialization code will apply some perturbations to the initial state and the orbit initial state will not exactly match the requested values.
For example, if the initial requested orbit is:
When the scene plays the initial orbit predictor values will be:
The resulting orbit is perturbed away from zero eccentricity and the initial ship position is at a radius of 6996.3 approximately 4km from the expected position.
These discrepancies are a consequence of the implementation of the SGP4 propagator. It typically used using two-line element (TLE) data defined at an earlier time and as a result does not need to precisely position the satellite at this earlier time.
The use of a TLE to specify orbit parameters is also supported by OrbitUniversal. The TLE values of current satellites can be found on the Celestrak website, and a button to open this website is provided when this input mode is selected. Note that each TLE defines a time (epoch) at which the orbit parameters are specific. This is shown in the summary information provided by OrbitUniversal as “TLE Epoch”. In the example below this is 18/3/2021.
It is necessary to ensure that the start time set in GE is later in time that TLE epoch for the satellite, since the SGP4 model can only evolve forward from the satellite epoch. This is set in the GE inspector:
Applying Impulses and Maneuvers
Starting at GE release 11.0 impulses and maneuvers can be applied in the usual way to SGP4 objects resulting in a new SGP4 evolution model based on the updated velocity. There is one technical detail to be aware of in the GE implementation of this feature.
The generation of a new SGP4 data record is done by specifying the post-maneuver orbital elements and resetting the epoch time to the time of the maneuver. The result (as shown in the initialization example above) will be a position and velocity that does not exactly match the post-maneuver satellite state. Especially of concern is the sudden change in position that would result. This is avoided by using a temporary Kepler model for the post-maneuver propagation and blending the Kepler output with the SGP4 output in a way that ensures smooth post-maneuver motion and SGP4 evolution. The time for the blending is chosen to ensure that there are no sudden shifts in the velocity of the spacecraft and that it’s velocity does not jump by more that 0.1 percent per frame as it does the blending.
Time Reversibility With Kepler Sequence
The KeplerSequence class can be added to a satellite with KEPLER or SGP4 evolution. In the case of KEPLER mode it can viewed as maintaining a list of Kepler segments indexed by time interval. If an impulse or maneuver is applied to the ship then the results in a new segment in the KeplerSequence. This allows the scene to jump to any point in time (including the past) if it used for all NBody objects in the scene (central objects can be marked as FixedObject to ensure the scene is all “on-rails”).
KeplerSequence has been extended in GE 11.0 to support the same functionality for SGP4 evolution. Impulses and maneuvers add new segments and time jumping is supported. The post-maneuver blending described above is supported in the time reversal and jumping.