Difference between revisions of "API:Orbit"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Created page with " {{PropertiesStart}} {{Property |type=double |name=ApA |hasget=1 }} {{Property |type=double |name=ApR |hasget=1 }} {{Property |type=double |name=PeA |hasget=1 }} {{Property|ty...")
 
Line 472: Line 472:
  
 
{{Method
 
{{Method
|returntype=
+
|returntype=Vector3d
|name=
+
|name=GetOrbitNormal()
 
|args=
 
|args=
 
}}
 
}}
  
 
{{Method
 
{{Method
|returntype=
+
|returntype=Trajectory
|name=
+
|name=GetPatchTrajectory
 +
|args={{arg|int|sampleCount}}
 +
}}
 +
 
 +
{{Method
 +
|returntype=Vector3d
 +
|name=getPositionAtT
 +
|args={{arg|double|T}}
 +
}}
 +
 
 +
{{Method
 +
|returntype=Vector3d
 +
|name=getPositionAtUT
 +
|args={{arg|double|UT}}
 +
}}
 +
 
 +
{{Method
 +
|returntype=Vector3d
 +
|name=getPositionFromEccAnomaly
 +
|args={{arg|double|E}}
 +
}}
 +
 
 +
{{Method
 +
|returntype=Vector3d
 +
|name=getPositionFromMeanAnomaly
 +
|args={{arg|double|M}}
 +
}}
 +
 
 +
{{Method
 +
|returntype=Vector3d
 +
|name=getPositionFromTrueAnomaly
 +
|args={{arg|double|tA}}
 +
 
 +
}}
 +
 
 +
{{Method
 +
|returntype=Vector3d
 +
|name=getRelativePositionAtT
 +
|args={{arg|double|T}}
 +
 
 +
}}
 +
 
 +
 
 +
 
 +
{{Method
 +
|returntype=Vector3d
 +
|name=getRelativePositionAtUT
 +
|args={{arg|double|UT}}
 +
 
 +
}}
 +
 
 +
 
 +
{{Method
 +
|returntype=Vector3d
 +
|name=getRelativePositionFromEccAnomaly
 +
|args={{arg|double|E}}
 +
 
 +
}}
 +
 
 +
 
 +
{{Method
 +
|returntype=Vector3d
 +
|name=getRelativePositionFromMeanAnomaly
 +
|args={{arg|double|m}}
 +
 
 +
}}
 +
 
 +
 
 +
{{Method
 +
|returntype=Vector3d
 +
|name=getRelativePositionFromTrueAnomaly
 +
|args={{arg|double|tA}}
 +
 
 +
}}
 +
 
 +
 
 +
{{Method
 +
|returntype=Vector3d
 +
|name=GetRelativeVel
 
|args=
 
|args=
 +
 +
}}
 +
 +
 +
{{Method
 +
|returntype=Vector3d
 +
|name=GetRotFrameVel
 +
|args={{arg|CelestialBody|refBody}}
 +
 
}}
 
}}
 +
  
 
{{Method
 
{{Method
|returntype=
+
|returntype=double
|name=
+
|name=getTrueAnomaly
 +
|args={{arg|double|E}}
 +
 
 +
}}
 +
 
 +
 
 +
{{Method
 +
|returntype=double
 +
|name=GetTrueAnomalyOfZupVector
 +
|args={{arg|Vector3d|vector}}
 +
 
 +
}}
 +
 
 +
{{Method
 +
|returntype=Vector3d
 +
|name=getTruePositionAtUT
 +
|args={{arg|double|UT}}
 +
 
 +
}}
 +
 
 +
{{Method
 +
|returntype=double
 +
|name=GetUTforTrueAnomaly
 +
|args={{arg|double|tA}},{{arg|double|wrapAfterSeconds}}
 +
 
 +
}}
 +
 
 +
{{Method
 +
|returntype=Vector3d
 +
|name=GetVel
 
|args=
 
|args=
 +
 
}}
 
}}
  
 
{{Method
 
{{Method
|returntype=
+
|returntype=Vector3d
|name=
+
|name=GetWorldSpaceVel
 
|args=
 
|args=
 +
 +
}}
 +
 +
{{Method
 +
|returntype=static bool
 +
|name=PeApIntersects
 +
|args={{arg|Orbit|primary}},{{arg|Orbit|secondary}},{{arg|double|threshold}}
 +
 +
}}
 +
 +
{{Method
 +
|returntype=double
 +
|name=RadiusAtTrueAnomaly
 +
|args={{arg|double|tA}}
 +
 +
}}
 +
 +
{{Method
 +
|returntype=static double
 +
|name=SolveClosestApproach
 +
|args={{arg|Orbit|p}},{{arg|Orbit|s}},{{arg|ref double|UT}},{{arg|double|dT}},{{arg|double|threshold}},{{arg|double|MinUT}},{{arg|double|MaxUT}},{{arg|double|epsilon}},{{arg|int|maxIterations}},{{arg|ref int|iterationCount}}
 +
 +
}}
 +
 +
{{Method
 +
|returntype=static double
 +
|name=SolveClosestBSP
 +
|args={{arg|ref double|Fp}},{{arg|ref double|Fs}},{{arg|double|Ir}},{{arg|double|dF}},{{arg|Orbit|p}},{{arg|orbit|s}},{{arg|double|epsilon}},{{arg|int|maxIterations}},{{arg|ref int|iterationCount}}
 +
 +
}}
 +
 +
{{Method
 +
|returntype=double
 +
|name=solveEccentricAnomaly
 +
|args={{arg|double|M}},{{arg|double|ecc}},{{arg|double|maxError}},{{arg|int|maxIterations}}
 +
 +
}}
 +
 +
{{Method
 +
|returntype=static bool
 +
|name=SolveSOI_BSP
 +
|args={{arg|Orbit|p}},{{arg|Orbit|s}},{{arg|ref double|UT}},{{arg|double|dT}},{{arg|double|Rsoi}},{{arg|double|MinUT}},{{arg|double|MaxUT}},{{arg|double|epsilon}},{{arg|int|maxIterations}},{{arg|ref int|iterationCount}}
 +
 +
}}
 +
 +
{{Method
 +
|returntype=double
 +
|name=TrueAnomalyAtRadius
 +
|args={{arg|double|R}}
 +
 +
}}
 +
 +
{{Method
 +
|returntype=double
 +
|name=TrueAnomalyAtT
 +
|args={{arg|double|T}}
 +
 +
}}
 +
 +
{{Method
 +
|returntype=double
 +
|name=TrueAnomalyAtUT
 +
|args={{arg|double|UT}}
 +
 
}}
 
}}
  
 
{{Method
 
{{Method
|returntype=
+
|returntype=void
|name=
+
|name=UpdateFromOrbitAtUT
|args=
+
|args={{arg|Orbit|orbit}},{{arg|double|UT}},{{arg|CelestialBody|toBody}}
 +
 
 
}}
 
}}
  
 
{{Method
 
{{Method
|returntype=
+
|returntype=void
|name=
+
|name=UpdateFromStateVectors
|args=
+
|args={{arg|Vector3d|pos}},{{arg|Vector3d|vel}},{{arg|CelestialBody|refBody}},{{arg|double|UT}}
 +
 
 
}}
 
}}
  
 
{{Method
 
{{Method
|returntype=
+
|returntype=void
|name=
+
|name=UpdateFromUT
|args=
+
|args={{arg|double|UT}}
 +
 
 
}}
 
}}
  

Revision as of 23:40, 6 January 2013

Properties

The following are public properties available in Orbit.

Signature Description
double ApA { get; } ?
double ApR { get; } ?
double PeA { get; } ?
double PeR { get; } ?
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 ?
double timeToPe ?
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

}