Table of Contents

Class GravityBody

Namespace
NominalSystems.Universe
Assembly
NominalSystems.Universe.dll

A gravity body has its position known from SPICE All gravity bodies have their own gravitational field and properties set directly from SPICE and the SPICE interface

public class GravityBody
Inheritance
GravityBody

Constructors

GravityBody()

Main constructor to initialise the Gravity Body and set up the properties.

public GravityBody()

Fields

Atmosphere

The atmosphere of the body, if it exists

public Atmosphere Atmosphere

Field Value

Atmosphere

BodyInformation

The body information structure storing data about the body

public BodyInformation BodyInformation

Field Value

BodyInformation

GroundObjects

A list of all ground objects attached

public List<GroundObject> GroundObjects

Field Value

List<GroundObject>

IsCentralBody

The central body flag

[EditableVariable("-", true, "", "")]
public bool IsCentralBody

Field Value

bool

MagneticField

The magnetic field of the gravity body, if it exists

public MagneticField MagneticField

Field Value

MagneticField

Out_SpicePlanetStateMsg

The body message data

public SpicePlanetStateMessage Out_SpicePlanetStateMsg

Field Value

SpicePlanetStateMessage

Transform

[-] The current transform (rotation and position) of the body

public Transform Transform

Field Value

Transform

Properties

AlbedoAverage

[-] Average Albedo of the Body

[EditableVariable("-", true, "", "")]
public double AlbedoAverage { get; }

Property Value

double

AtmosphereEnabled

[-] A flag whether the atmosphere is enabled

public bool AtmosphereEnabled { get; }

Property Value

bool

Density

[kg m-3] Density of the body

[EditableVariable("kg m-3", true, "", "")]
public double Density { get; }

Property Value

double

Diameter

[m] Equatorial Diameter of the Body

[EditableVariable("m", true, "", "")]
public double Diameter { get; }

Property Value

double

J2

[-] The measure of the gravitaional effect of a planet due to its oblaqueness.

[EditableVariable("-", true, "", "")]
public double J2 { get; }

Property Value

double

MagneticFieldEnabled

[-] A flag whether the magnetic field is enabled

public bool MagneticFieldEnabled { get; }

Property Value

bool

Mass

[kg] The mass of the gravity body / planet

[EditableVariable("kg", true, "", "")]
public double Mass { get; }

Property Value

double

Mu

[m3 s−2] Gravitational Mu of the body

[EditableVariable("m3 s−2", true, "", "")]
public double Mu { get; }

Property Value

double

Name

Name of the body

[EditableVariable("-", true, "", "")]
public string Name { get; }

Property Value

string

Omega

[r/s] Angular velocity of the rotation of the body

[EditableVariable("r/s", true, "", "")]
public double Omega { get; }

Property Value

double

OrbitSemiMajorAxis

[m] Semi Major Axis of the orbit around the sun or parented body

[EditableVariable("m", true, "", "")]
public double OrbitSemiMajorAxis { get; }

Property Value

double

PolarRadius

[m] Polar Radius of the Body

[EditableVariable("m", true, "", "")]
public double PolarRadius { get; }

Property Value

double

Position

[m] The Inertial Position of the Body relative to the Central Body from SPICE

[EditableVariable("m", true, "", "")]
public Vector3 Position { get; }

Property Value

Vector3

Radius

[m] Equatorial Radius of the Body

[EditableVariable("m", true, "", "")]
public double Radius { get; }

Property Value

double

Rotation

[deg] The rotation of the body in pitch, roll, yaw

[EditableVariable("deg", true, "", "")]
public virtual Vector3 Rotation { get; set; }

Property Value

Vector3

SphericalHarmonics

The spherical harmonics model

public SphericalHarmonics SphericalHarmonics { get; }

Property Value

SphericalHarmonics

Velocity

[m/s] The Inertial Velocity of the Body relative to the Central Body from SPICE

[EditableVariable("m/s", true, "", "")]
public Vector3 Velocity { get; }

Property Value

Vector3

Methods

ComputeInertialGravity(Vector3, double)

Calculates the gravity from this body at some location.

public Vector3 ComputeInertialGravity(Vector3 inertialPosition, double step)

Parameters

inertialPosition Vector3

The inertial reference frame location of the object [m]

step double

The time difference in step for spherical harmonics [s]

Returns

Vector3

The gravitational force vector

ComputePotentialEnergy(Vector3)

Calculates the potential energy of the body at some location.

public double ComputePotentialEnergy(Vector3 inertialPosition)

Parameters

inertialPosition Vector3

The inertial reference frame location of the object [m]

Returns

double

The gravitational energy [J]

InitialiseHarmonics(int)

Initialises the spherical harmonics of the gravity body

public void InitialiseHarmonics(int degree)

Parameters

degree int

The degree of harmonics