Gravity Engine 2 3.0
Loading...
Searching...
No Matches
GravityEngine2.GSBinary Class Reference

Component to specify that two GSBody objects are in orbit around their mutual center of mass (CM). Use when the mass ratio of the two bodies m1/m2, m1 < m2 is non negligible. e.g. the Earth/Moon system. More...

Inheritance diagram for GravityEngine2.GSBinary:
GravityEngine2.GSBody

Public Member Functions

Orbital.COE BinaryCOE ()
 
void InitMember (GSBody gsbody, GEBodyState cmState)
 (Internal Use) Fill in the BodyInitData for a member of the binary system. Expecting to be called as part of the GSController.BodyAdd() logic.
 
- Public Member Functions inherited from GravityEngine2.GSBody
GSBinary Binary ()
 If this body is a member of a GSBinary then the GSBinary object will have the details on the joint orbit and the mass fractions etc.
 
void BinarySet (GSBinary gsBinary)
 
GSBody CenterBody ()
 
Orbital.COE COEFromBID ()
 
int Id ()
 
void IdSet (int id)
 
override string ToString ()
 

Public Attributes

bool addCM
 
BodyInitData binaryInitData = new BodyInitData()
 
GEPhysicsCore.Propagator binaryPropagator
 
GSBody body1
 
GSBody body2
 
GSBody cMcenterBody
 
GEPhysicsCore.Propagator cMPropagator = GEPhysicsCore.Propagator.GRAVITY
 
double mass1
 
double mass2
 
- Public Attributes inherited from GravityEngine2.GSBody
BodyInitData bodyInitData = new BodyInitData()
 
GSBody centerBody
 
string ephemFilename
 
bool ephemRelative
 
double mass
 
bool optionalDataFoldout
 
bool patched
 
GEPhysicsCore.Propagator propagator = GEPhysicsCore.Propagator.GRAVITY
 
double radius
 
Vector3 rotationAxis = Vector3.up
 
double rotationRate = 0.0
 

Additional Inherited Members

- Static Public Attributes inherited from GravityEngine2.GSBody
static int NO_ID = -1
 GravityData id. Assigned when added to GE.
 

Detailed Description

Component to specify that two GSBody objects are in orbit around their mutual center of mass (CM). Use when the mass ratio of the two bodies m1/m2, m1 < m2 is non negligible. e.g. the Earth/Moon system.

The center of mass can be optionally added as GSBody. This is intended for cases where the propagation of the binary bodies is KEPLER mode, in which case they need a center object that is fixed or is itslef in KEPLER mode.

More commonly the bodies will be given the necessary binary orbit (r, v) intial conditions added to the binary CM initial conditions (which could be as RV or an orbit COE).

If the CM is added and a GRAVITY propagator is used, the position of the CM will be computed based on the positions of the binary bodies. This allows it's use as the center of a component to display the orbit wrt the CM.

The binary orbit initial conditions must be specified using a COE. The physical size of the orbit is between the bodies.

Member Function Documentation

◆ InitMember()

void GravityEngine2.GSBinary.InitMember ( GSBody gsbody,
GEBodyState cmState )

(Internal Use) Fill in the BodyInitData for a member of the binary system. Expecting to be called as part of the GSController.BodyAdd() logic.

If the body is part of a binary it needs to have it's gsBinary field set (the editor script will do this, if un-edited need a script to do this).

If the CM is being added, then it can be the center object provided it has been added first and the BID can be a copy of the binary BID (as COE) suitably scaled.

If CM not added then need to compute the absolute R, V including the initial info from the CM BodyInitData.

Parameters
gsbody

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