Difference between revisions of "API:Orbit"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (Added description)
Line 11: Line 11:
 
|name=ApR
 
|name=ApR
 
|hasget=1
 
|hasget=1
 +
|desc=Apoapsis, including the radius of the planet.
 
}}
 
}}
 
{{Property
 
{{Property
Line 21: Line 22:
 
|name=PeR
 
|name=PeR
 
|hasget=1
 
|hasget=1
 +
|desc=Periapsis, including the radius of the planet.
 
}}
 
}}
 
{{Property
 
{{Property

Revision as of 19:12, 20 November 2013

Properties

The following are public properties available in Orbit.

Signature Description
double ApA { get; } Actual Apoapsis.
double ApR { get; } Apoapsis, including the radius of the planet.
double PeA { get; } Actual Periapsis.
double PeR { get; } Periapsis, including the radius of the planet.
double semiLatusRectum { get; } ?
double semiMinorAxis { get; } ?

Fields

The following is a list of publically-accessible fields in Orbit. This includes protected items, which can be accessed by subclasses.

Signature Description
bool activePatch ?
double altitude ?
Vector3d an ?
double argumentOfPeriapsis ?
double ClAppr ?
double ClEctr1 ?
double ClEctr2 ?
CelestialBody closestEncounterBody ?
EncounterSolutionLevel closestEncounterLevel ?
Orbit closestEncounterPath ?
double closestTgtApprUT ?
double crAppr ?
bool debug_returnFullEllipseTrajectory ?
Vector3 debugAN ?
Vector3 debugEccVec ?
Vector3 debugH ?
Vector3 debugPos ?
Vector3 debugVel ?
double E ?
double eccentricAnomaly ?
double eccentricity ?
Vector3d eccVec ?
double EndUT ?
double epoch ?
double FEVp ?
double FEVs ?
double fromE ?
double fromV ?
Vector3d h ?
double inclination ?
double LAN ?
double mag ?
double meanAnomaly ?
double meanAnomalyAtEpoch ?
double nearestTT Obsolete, Use VesselType or CelestialBodyType instead.
double ObT ?
double ObTAtEpoch ?
double orbitalEnergy ?
double orbitalSpeed ?
double orbitalPercent ?
PatchTransitionType patchEndTransition ?
PatchTransitionType patchStartTransition ?
double period ?
Vector3d pos ?
Orbit previousPatch ?
double radius ?
CelestialBody referenceBody ?
double sampleInterval ?
Vector3d secondaryPosAtTransition1 ?
Vector3d secondaryPosAtTransition2 ?
double semiMajorAxis ?
double SEVp ?
double SEVs ?
double StartUT ?
double timeToAp Time in seconde before reach the actual Apoapsis.
double timeToPe Time in seconde before reach the actual Periapsis.
double timeToTransition1 ?
double timeToTransition2 ?
double toE ?
double toV ?
double trueAnomaly ?
double UTappr ?
double UTsoi ?
double V ?
Vector3d vel ?

Methods

The following are methods included in Orbit.

Signature Description
static Orbit() ?
public Orbit(double inc,double e,double sma,double lan,double w,double mEp,double t,CelestialBody body) ?
void DrawOrbit() ?
static void FindClosestPoints(Orbit p,Orbit s,ref double CD,ref double CCD ,ref double FFp,ref double FFs,ref double SFp,ref double SFs ,double epsilon,int maxIterations,ref int iterationCount) ?
Vector3d GetANVector() ?
double GetDTforTrueAnomaly(double tA,double wrapAfterSeconds) ?
double GetEccentricAnomaly(double tA) ?
Vector3d GetEccVector() ?
Vector3d GetFrameVel() ?
Vector3d GetFrameVelAtUT(double UT) ?
double GetMeanAnomaly(double E,double tA) ?
double getObTAtMeanAnomaly(double M) ?
double getObtAtUT(double UT) ?
double getOrbitalSpeedAt(double time) ?
double getOrbitalSpeedAtDistance(double d) ?
double getOrbitalSpeedAtPos(Vector3d pos) ?
double getOrbitalSpeedAtRelativePos(Vector3d relPos) ?
Vector3d getOrbitalVelocityAtObT(double ObT) ?
Vector3d getOrbitalVelocityAtUT(double UT) ?
Vector3d GetOrbitNormal()() ?
Trajectory GetPatchTrajectory(int sampleCount) ?
Vector3d getPositionAtT(double T) ?
Vector3d getPositionAtUT(double UT) ?
Vector3d getPositionFromEccAnomaly(double E) ?
Vector3d getPositionFromMeanAnomaly(double M) ?
Vector3d getPositionFromTrueAnomaly(double tA) ?
Vector3d getRelativePositionAtT(double T) ?


Vector3d getRelativePositionAtUT(double UT) ?


Vector3d getRelativePositionFromEccAnomaly(double E) ?


Vector3d getRelativePositionFromMeanAnomaly(double m) ?


Vector3d getRelativePositionFromTrueAnomaly(double tA) ?


Vector3d GetRelativeVel() ?


Vector3d GetRotFrameVel(CelestialBody refBody) ?


double getTrueAnomaly(double E) ?


double GetTrueAnomalyOfZupVector(Vector3d vector) ?
Vector3d getTruePositionAtUT(double UT) ?
double GetUTforTrueAnomaly(double tA,double wrapAfterSeconds) ?
Vector3d GetVel() ?
Vector3d GetWorldSpaceVel() ?
static bool PeApIntersects(Orbit primary,Orbit secondary,double threshold) ?
double RadiusAtTrueAnomaly(double tA) ?
static double SolveClosestApproach(Orbit p,Orbit s,ref double UT,double dT,double threshold,double MinUT,double MaxUT,double epsilon,int maxIterations,ref int iterationCount) ?
static double SolveClosestBSP(ref double Fp,ref double Fs,double Ir,double dF,Orbit p,orbit s,double epsilon,int maxIterations,ref int iterationCount) ?
double solveEccentricAnomaly(double M,double ecc,double maxError,int maxIterations) ?
static bool SolveSOI_BSP(Orbit p,Orbit s,ref double UT,double dT,double Rsoi,double MinUT,double MaxUT,double epsilon,int maxIterations,ref int iterationCount) ?
double TrueAnomalyAtRadius(double R) ?
double TrueAnomalyAtT(double T) ?
double TrueAnomalyAtUT(double UT) ?
void UpdateFromOrbitAtUT(Orbit orbit,double UT,CelestialBody toBody) ?
void UpdateFromStateVectors(Vector3d pos,Vector3d vel,CelestialBody refBody,double UT) ?
void UpdateFromUT(double UT) ?

Enumerations

public enum EncounterSolutionLevel {

NONE,
ESCAPE,
ORBIT_INTERSECT,
SOI_INTERSECT_2,
SOI_INTERSECT_1

}

public enum ObjectType {

VESSEL,
SPACE_DEBRIS,
CELESTIAL_BODIES,
UNKOWN_MISC,
KERBAL

}

public enum PatchTransitionType{

INITIAL,
FINAL,
ENCOUNTER,
ESCAPE,
MANEUVER

}

Tips

-Use FlightGlobals.ActiveVessel.orbit.ApA to get the actual Apoapsis of the vessel controlled by the player.