Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Static Public Member Functions | List of all members
OrbitUtil Class Reference

Static Public Member Functions

static IntersectInformation CalculateIntersections (Orbit referenceOrbit, Orbit targetOrbit)
 Calculates the intersection distances and universal times between reference and target . More...
 
static double CurrentEjectionAngle (Orbit origin, double UT)
 Calculates the ejection angle for orbit origin at specified time UT . More...
 
static double CurrentEjectionAngle (Orbit origin, double UT, Vector3d prograde)
 Calculates the ejection angle for orbit origin at specified time UT . More...
 
static double CurrentPhaseAngle (Orbit origin, Orbit destination)
 Calculates the current phase angle between origin and destination . More...
 
static CelestialBody FindCommonAncestor (Orbit o, CelestialBody cb)
 
static CelestialBody FindPlanet (CelestialBody src)
 Looks up the solar system hierarchy for the first object directly orbiting the sun. Returns null if passed the Sun. More...
 
static double GetSmaDistance (Orbit o1, Orbit o2)
 
static double GetSmaDistanceToSun (Orbit obt, double d=0.0)
 
static double GetTransferPhaseAngle (Orbit o1, Orbit o2, double Th)
 Get the phase angle for an optimal transfer between both orbits More...
 
static double GetTransferTime (Orbit o1, Orbit o2)
 Get the transit time between two orbits. Orbits are assumed to be circular, plane-aligned and to share the same central body. The transfer orbit is assumed to be a perfect Hohmann transfer More...
 

Member Function Documentation

static IntersectInformation OrbitUtil.CalculateIntersections ( Orbit  referenceOrbit,
Orbit  targetOrbit 
)
inlinestatic

Calculates the intersection distances and universal times between reference and target .

Returns
A quaternion where x and y are distance and time for intersection 1, respectively. z and w for intersection 2
Parameters
referenceReference.
targetTarget.
static double OrbitUtil.CurrentEjectionAngle ( Orbit  origin,
double  UT 
)
inlinestatic

Calculates the ejection angle for orbit origin at specified time UT .

Returns
The ejection angle.
Parameters
originOrigin.
UTUniversal Time.
static double OrbitUtil.CurrentEjectionAngle ( Orbit  origin,
double  UT,
Vector3d  prograde 
)
inlinestatic

Calculates the ejection angle for orbit origin at specified time UT .

Returns
The ejection angle.
Parameters
originOrigin.
UTUniversal Time.
static double OrbitUtil.CurrentPhaseAngle ( Orbit  origin,
Orbit  destination 
)
inlinestatic

Calculates the current phase angle between origin and destination .

Returns
The phase angle.
Parameters
originOrigin.
destinationDestination.
static CelestialBody OrbitUtil.FindCommonAncestor ( Orbit  o,
CelestialBody  cb 
)
inlinestatic
static CelestialBody OrbitUtil.FindPlanet ( CelestialBody  src)
inlinestatic

Looks up the solar system hierarchy for the first object directly orbiting the sun. Returns null if passed the Sun.

Parameters
src
Returns
static double OrbitUtil.GetSmaDistance ( Orbit  o1,
Orbit  o2 
)
inlinestatic

Returns the delta of semi-major axis distances to sun between two orbits

Parameters
currentBody
tgtBody
Returns
static double OrbitUtil.GetSmaDistanceToSun ( Orbit  obt,
double  d = 0.0 
)
inlinestatic
static double OrbitUtil.GetTransferPhaseAngle ( Orbit  o1,
Orbit  o2,
double  Th 
)
inlinestatic

Get the phase angle for an optimal transfer between both orbits

Parameters
o1the origin orbit
o2the destination orbit
Ththe transfer time. Use GetTransferTime for that.
Returns
The phase angle, in radians
static double OrbitUtil.GetTransferTime ( Orbit  o1,
Orbit  o2 
)
inlinestatic

Get the transit time between two orbits. Orbits are assumed to be circular, plane-aligned and to share the same central body. The transfer orbit is assumed to be a perfect Hohmann transfer

Parameters
o1
o2
Returns

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