Gravity Engine 12.0
Unity Asset for Gravity
Loading...
Searching...
No Matches
J2Gravity Class Reference

Force model for the first order approximation for a non-spherical gravitational source. More...

Inheritance diagram for J2Gravity:
IForceDelegate

Public Member Functions

double[] CalcAccelerationIJPerM (double[] rji, int i, int j, GravityState.NbodyState[] nbodyStates)
 Calculate the acceleration between bodies i and j.
 
double[] CalcAccelerationIPerParticle (double[] rji, int i, GravityState.NbodyState[] nbodyStates)
 
double[] CalcJerkIJPerM (double[] rji, int i, int j, GravityState.NbodyState[] nbodyStates)
 
double[] CalcAccelerationIJPerM (double[] rji, int i, int j, GravityState.NbodyState[] nbodyStates)
 Calculate the acceleration between bodies i and j.
 
double[] CalcAccelerationIPerParticle (double[] rji, int i, GravityState.NbodyState[] nbodyStates)
 
double[] CalcJerkIJPerM (double[] rji, int i, int j, GravityState.NbodyState[] nbodyStates)
 

Detailed Description

Force model for the first order approximation for a non-spherical gravitational source.

The model requires the value of the radius of the planet. The default units are for the Earth in orbital units.

Member Function Documentation

◆ CalcAccelerationIJPerM()

double[] J2Gravity.CalcAccelerationIJPerM ( double[]  rji,
int  i,
int  j,
GravityState.NbodyState[]  nbodyStates 
)

Calculate the acceleration between bodies i and j.

Return the aij and aji accelerations because in some case (e.g one is oblate) they will not be equal and opposite!

Parameters
rji
i
j
nbodyStates
Returns

Implements IForceDelegate.

◆ CalcAccelerationIPerParticle()

double[] J2Gravity.CalcAccelerationIPerParticle ( double[]  rji,
int  i,
GravityState::NbodyState[]  nbodyStates 
)

Implements IForceDelegate.

◆ CalcJerkIJPerM()

double[] J2Gravity.CalcJerkIJPerM ( double[]  rji,
int  i,
int  j,
GravityState::NbodyState[]  nbodyStates 
)

Implements IForceDelegate.


The documentation for this class was generated from the following file: