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

Code to propagate Kepler orbits (ellipse, parabola, hyperbola). More...

Classes

struct  PropInfo
 
struct  RVT
 

Static Public Member Functions

static void EvolveKeplerMassive (double t_to, ref GEPhysicsCore.GEBodies bodies, ref NativeArray< PropInfo > kpi, ref NativeArray< int > indices)
 Evolves all the massive Kepler bodies to their new absolute position.
 
static bool EvolveMasslessProgagators (double t_to, ref GEPhysicsCore.GEBodies bodies, ref NativeArray< PropInfo > kpi, ref NativeArray< GEPhysicsCore.PatchInfo > patchInfo, ref NativeArray< int > indices, ref NativeList< GEPhysicsCore.PhysEvent > eventList, bool coRoFrame)
 
static void EvolveRelative (double t, int propId, ref NativeArray< PropInfo > kpi, ref GEBodyState state)
 Version to allow direct use of a propagator in GE.
 
static void FindC2C3 (double znew, out double c2new, out double c3new)
 
static void ManeuverPropagator (int bodyIndex, double time, ref GEPhysicsCore.GEBodies bodies, ref NativeArray< PropInfo > kpi)
 Update the KeplerPropagator for the body at bodyIndex with the new position, velocity and time based on applying a maneuver in the Run() loop.
 
static int double3 RVforTime (RVT rvt, double physicsTime)
 

Static Public Attributes

static int double3
 
static string[] errorText = new string[] { "OK", "Time < time0", "Did not converge" }
 
const int NOT_CONVERGED = 2
 
const int PROP_OK = 0
 Evolve the orbit to the time indicated. The algorithm used requires some internal iteration but in general converges very quiclky. (All solutions to Kepler's equation use some iteration, since the equation is not closed form).
 
static int status
 
const int T_TOO_EARLY = 1
 

Detailed Description

Code to propagate Kepler orbits (ellipse, parabola, hyperbola).

This code will be called from Job in the job system so it cannot make reference to any classes, hence the implementation as a data struct and static methods.

The propagator is based on the universal variable Kepler method from Vallado. This is chosen since it has smooth hand off between ellipse, parabola and hyperbola.

RVT has two contructors, one that preserves the initial COE (which can then be retreived by e.g. orbit display code that does not care about the exact phase of the orbit (since it will be drawing the entire shape).

Member Function Documentation

◆ EvolveKeplerMassive()

static void GravityEngine2.KeplerPropagator.EvolveKeplerMassive ( double t_to,
ref GEPhysicsCore::GEBodies bodies,
ref NativeArray< PropInfo > kpi,
ref NativeArray< int > indices )
static

Evolves all the massive Kepler bodies to their new absolute position.

Parameters
bodies
rvtEntries
parms

◆ EvolveRelative()

static void GravityEngine2.KeplerPropagator.EvolveRelative ( double t,
int propId,
ref NativeArray< PropInfo > kpi,
ref GEBodyState state )
static

Version to allow direct use of a propagator in GE.

Parameters
t
propId
kpi
state

◆ ManeuverPropagator()

static void GravityEngine2.KeplerPropagator.ManeuverPropagator ( int bodyIndex,
double time,
ref GEPhysicsCore::GEBodies bodies,
ref NativeArray< PropInfo > kpi )
static

Update the KeplerPropagator for the body at bodyIndex with the new position, velocity and time based on applying a maneuver in the Run() loop.

Parameters
bodyIndex
time
bodies
kpi

Member Data Documentation

◆ PROP_OK

const int GravityEngine2.KeplerPropagator.PROP_OK = 0
static

Evolve the orbit to the time indicated. The algorithm used requires some internal iteration but in general converges very quiclky. (All solutions to Kepler's equation use some iteration, since the equation is not closed form).

Universal Kepler evolution using KEPLER (algorithm 8) from Vallado, p93 Code taken from book companion site and adapted to C#/Unity.

Parameters
physicsTime
r_newPosition at the specified time (returned by ref)

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