simIncludeGravBody¶
- class simIncludeGravBody.gravBodyFactory(bodyNames=None)[source]¶
Bases:
object
Factory cass to create gravitational bodies.
- createBodies(bodyNames)[source]¶
A convenience function to create multiple typical solar system bodies.
- Parameters
bodyNames (array_like) – Planet name strings. Each planet name must be a valid SPICE celestial body string.
- Returns
gravBodies – A list of gravity body objects held by the gravity factory.
- Return type
array_like
- createCustomGravObject(label, mu, **kwargs)[source]¶
Create a custom gravity body object.
- Parameters
label (string) – Gravity body name
mu (double) – Gravity constant
kwargs –
- radEquatordouble
Equatorial radius in meters
- radiusRatiodouble
Ratio of the polar radius to the equatorial radius.
- createSpiceInterface(path, time, **kwargs)[source]¶
A convenience function to configure a NAIF Spice module for the simulation. It connect the gravBodyData objects to the spice planet state messages. Thus, it must be run after the gravBodyData objects are created.
- Parameters
path (string) – The absolute path to the Basilisk source directory (default ‘’).
time (string) – The time string.
kwargs –
- spiceKernalFileNames :
A list of spice kernel file names including file extension.
- spicePlanetNames :
A list of planet names whose Spice data is loaded, overriding the gravBodies list.
- spicePlanetFrames :
A list of strings for the planet frame names. If left empty for a planet, then
IAU_
+ planetName is assumed for the planet frame.- epochInMsg: bool
Flag to set an epoch input message for the spice interface
- simIncludeGravBody.loadGravFromFile(fileName, spherHarm, maxDeg=2)[source]¶
Load the gravitational body spherical harmonics coefficients from a file.
- Parameters
fileName (string) – The full path to the specified data file.
spherHarm – The spherical harmonics container of the gravity body.
maxDeg (integer) – maximum degree of spherical harmonics to load
Notes
This function is a convenience utility for loading in the spherical harmonics coefficients from a data file. The default harmonic degree is 2 unless specified. Note that this function calls the gravityEffector function loadGravFromFile().