Editor: Gravity Perturbations
Description
In the domain of spacecraft orbital dynamics, spherical harmonics is a fundamental tool to increase precision beyond Newtonian gravity. While Newton's laws describe celestial motion under ideal conditions, the gravitational field of a celestial body is not uniform. To account for irregularities from non-spherical mass distributions, spherical harmonics are used to create a concise and computationally efficient representation of the gravitational potential. The presence of coefficients, like J2, in the spherical harmonic expansion becomes crucial. J2, for instance, encapsulates the oblateness of a celestial body, disclosing deviations from a perfect sphere. Higher-order coefficients, such as J3 and beyond, provide additional granularity in characterizing gravitational perturbations. Understanding and incorporating these coefficients are imperative for precise spacecraft trajectory calculations, ensuring accurate orbit determination and mission success.
Nominal Editor enables multiple orders of harmonic values to be imported into the world and used as an alternative gravity model to the traditional Newtonian gravity method. This standard method treats each planet as a point in space with mass, rather than a mass distribution.
Note
By default, Newtonian gravity is enabled. Creating more complicated spherical harmonics will incur a higher computational requirement for each simulation tick.
Adding Spherical Harmonics
In the Universe System
, there is a function to add spherical harmonics to a particular planet. This is done on a planet-by-planet case. The function is called Add Spherical Harmonics
.
The available properties are the following:
- Planet: This is the planet that the model is being attached to. By default, the planet is
Earth
the most likely standard for the harmonic model. - Data File: This is the full path or relative path to the data file that includes the harmonic constant values for the planet. The data file that is provided includes some standard data and is a known file path that exists.
- Degree: This is the harmonic degree at which to initialize the harmonics. This must exist within the file otherwise the harmonics will fail.
Default File
The default file, GGM03S.txt
, is provided in Nominal Editor when installed. It can be found in the following directory:
Plugins/NominalForUnreal/Assets/Gravity
Note
As this folder is a mapped anchor point in the file directory of the project, this particular text file does not need the full file path to the text file.
This particular file has the Earth's spherical harmonics data up until a degree of 180. That means harmonic oscillations of up to an order of 180 can be calculated. The Degree
parameter that is entered in the function will determine how many lines of data are processed for the gravity calculation. Outside of the first row (which just includes information about the Earth), the columns have the following values
where \(n\) and \(m\) are integers representing the degree and order of the spherical harmonic term, respectively, \(C_{nm}\) is the cosine component of the coefficient, \(S_{nm}\) is the sine component of the coefficient and \(\dot{C}_{nm}\) and \(\dot{S}_{nm}\) are the time derivatives of the cosine and sine component coefficients respectively.