Class PatchedConicsOrbit
- Namespace
- KSP.Sim.impl
- Assembly
- Assembly-CSharp.dll
public class PatchedConicsOrbit : IPatchedOrbit, IDisposable, IComparable<IPatchedOrbit>, IKeplerOrbit, IDynamicOrbit, IOrbit
- Inheritance
-
PatchedConicsOrbit
- Implements
-
- Inherited Members
-
- Extension Methods
-
Constructors
PatchedConicsOrbit(IUniverseModel)
public PatchedConicsOrbit(IUniverseModel universeModel)
Parameters
universeModel IUniverseModel
Fields
Deg2Rad
public const double Deg2Rad = 0.017453292519943295
Field Value
- double
OrbitalElements
public OrbitalElements OrbitalElements
Field Value
- OrbitalElements
Rad2Deg
public const double Rad2Deg = 57.29577951308232
Field Value
- double
ReferenceBodyConstants
public ReferenceBodyConstants ReferenceBodyConstants
Field Value
- ReferenceBodyConstants
findClosestPoints
public PatchedConicsOrbit.FindClosestPointsDelegate findClosestPoints
Field Value
- PatchedConicsOrbit.FindClosestPointsDelegate
meanMotion
Field Value
- double
Properties
ActivePatch
[TypeConverterIgnore]
public bool ActivePatch { get; set; }
Property Value
- bool
Apoapsis
[TypeConverterIgnore]
public double Apoapsis { get; }
Property Value
- double
ApoapsisArl
[TypeConverterIgnore]
public double ApoapsisArl { get; }
Property Value
- double
ClEctr1
[TypeConverterIgnore]
public double ClEctr1 { get; set; }
Property Value
- double
ClEctr2
[TypeConverterIgnore]
public double ClEctr2 { get; set; }
Property Value
- double
ClosestApproachDistance
[TypeConverterIgnore]
public double ClosestApproachDistance { get; set; }
Property Value
- double
EccentricAnomaly
[TypeConverterIgnore]
public double EccentricAnomaly { get; }
Property Value
- double
EndTrueAnomaly
[TypeConverterIgnore]
public double EndTrueAnomaly { get; set; }
Property Value
- double
EndUT
[TypeConverterIgnore]
public double EndUT { get; set; }
Property Value
- double
MeanAnomaly
[TypeConverterIgnore]
public double MeanAnomaly { get; }
Property Value
- double
NextPatch
[TypeConverterIgnore]
public IPatchedOrbit NextPatch { get; set; }
Property Value
- IPatchedOrbit
ObT
[TypeConverterIgnore]
public double ObT { get; }
Property Value
- double
ObTAtEpoch
[TypeConverterIgnore]
public double ObTAtEpoch { get; }
Property Value
- double
OrbitFrame
[TypeConverterIgnore]
public CelestialFrame OrbitFrame { get; }
Property Value
- CelestialFrame
OrbitMarkerHandler
[TypeConverterIgnore]
public OrbitMarkerHandler OrbitMarkerHandler { get; }
Property Value
- OrbitMarkerHandler
OrbitalEnergy
[TypeConverterIgnore]
public double OrbitalEnergy { get; }
Property Value
- double
PatchEndTransition
[TypeConverterIgnore]
public PatchTransitionType PatchEndTransition { get; set; }
Property Value
- PatchTransitionType
PatchStartTransition
[TypeConverterIgnore]
public PatchTransitionType PatchStartTransition { get; set; }
Property Value
- PatchTransitionType
Periapsis
[TypeConverterIgnore]
public double Periapsis { get; }
Property Value
- double
PeriapsisArl
[TypeConverterIgnore]
public double PeriapsisArl { get; }
Property Value
- double
Position
[TypeConverterIgnore]
public Position Position { get; }
Property Value
- Position
PreviousPatch
[TypeConverterIgnore]
public IPatchedOrbit PreviousPatch { get; set; }
Property Value
- IPatchedOrbit
ReferenceFrame
[TypeConverterIgnore]
public ITransformFrame ReferenceFrame { get; }
Property Value
- ITransformFrame
SemiLatusRectum
[TypeConverterIgnore]
public double SemiLatusRectum { get; }
Property Value
- double
SemiMinorAxis
[TypeConverterIgnore]
public double SemiMinorAxis { get; }
Property Value
- double
SpecificAngularMomentum
[TypeConverterIgnore]
public Vector3d SpecificAngularMomentum { get; }
Property Value
- Vector3d
SpecificAngularMomentumVelocity
[TypeConverterIgnore]
public Velocity SpecificAngularMomentumVelocity { get; }
Property Value
- Velocity
StartTrueAnomaly
[TypeConverterIgnore]
public double StartTrueAnomaly { get; set; }
Property Value
- double
StartUT
[TypeConverterIgnore]
public double StartUT { get; set; }
Property Value
- double
TimeToAp
[TypeConverterIgnore]
public double TimeToAp { get; set; }
Property Value
- double
TimeToPe
[TypeConverterIgnore]
public double TimeToPe { get; set; }
Property Value
- double
TrueAnomaly
[TypeConverterIgnore]
public double TrueAnomaly { get; }
Property Value
- double
TrueAnomalyFirstEncounterPriOrbit
[TypeConverterIgnore]
public double TrueAnomalyFirstEncounterPriOrbit { get; set; }
Property Value
- double
TrueAnomalyFirstEncounterSecOrbit
[TypeConverterIgnore]
public double TrueAnomalyFirstEncounterSecOrbit { get; set; }
Property Value
- double
TrueAnomalySecEncounterPriOrbit
[TypeConverterIgnore]
public double TrueAnomalySecEncounterPriOrbit { get; set; }
Property Value
- double
TrueAnomalySecEncounterSecOrbit
[TypeConverterIgnore]
public double TrueAnomalySecEncounterSecOrbit { get; set; }
Property Value
- double
UniversalTimeAtClosestApproach
[TypeConverterIgnore]
public double UniversalTimeAtClosestApproach { get; set; }
Property Value
- double
UniversalTimeAtSoiEncounter
[TypeConverterIgnore]
public double UniversalTimeAtSoiEncounter { get; set; }
Property Value
- double
Velocity
[TypeConverterIgnore]
public Velocity Velocity { get; }
Property Value
- Velocity
altitude
[TypeConverterIgnore]
public double altitude { get; }
Property Value
- double
an
[TypeConverterIgnore]
public Vector3d an { get; }
Property Value
- Vector3d
argumentOfPeriapsis
public double argumentOfPeriapsis { get; set; }
Property Value
- double
closestEncounterBody
[TypeConverterIgnore]
public CelestialBodyComponent closestEncounterBody { get; set; }
Property Value
- CelestialBodyComponent
closestEncounterLevel
[TypeConverterIgnore]
public EncounterSolutionLevel closestEncounterLevel { get; set; }
Property Value
- EncounterSolutionLevel
closestEncounterPatch
[TypeConverterIgnore]
public PatchedConicsOrbit closestEncounterPatch { get; set; }
Property Value
- PatchedConicsOrbit
closestTgtApprUT
[TypeConverterIgnore]
public double closestTgtApprUT { get; set; }
Property Value
- double
collisionPointUT
[TypeConverterIgnore]
public double collisionPointUT { get; set; }
Property Value
- double
coordinateSystem
[TypeConverterIgnore]
public ICoordinateSystem coordinateSystem { get; }
Property Value
- ICoordinateSystem
eccVec
[TypeConverterIgnore]
public Vector3d eccVec { get; }
Property Value
- Vector3d
eccentricity
public double eccentricity { get; set; }
Property Value
- double
epoch
public double epoch { get; set; }
Property Value
- double
inclination
public double inclination { get; set; }
Property Value
- double
localPosition
[TypeConverterIgnore]
public Vector3d localPosition { get; }
Property Value
- Vector3d
longitudeOfAscendingNode
public double longitudeOfAscendingNode { get; set; }
Property Value
- double
meanAnomalyAtEpoch
public double meanAnomalyAtEpoch { get; set; }
Property Value
- double
nearestTT
[TypeConverterIgnore]
public double nearestTT { get; set; }
Property Value
- double
nextTT
[TypeConverterIgnore]
public double nextTT { get; set; }
Property Value
- double
numClosePoints
[TypeConverterIgnore]
public int numClosePoints { get; set; }
Property Value
- int
orbitPercent
[TypeConverterIgnore]
public double orbitPercent { get; }
Property Value
- double
orbitalSpeed
[TypeConverterIgnore]
public double orbitalSpeed { get; }
Property Value
- double
period
[TypeConverterIgnore]
public double period { get; }
Property Value
- double
radius
[TypeConverterIgnore]
public double radius { get; }
Property Value
- double
referenceBody
[TypeConverterIgnore]
public CelestialBodyComponent referenceBody { get; }
Property Value
- CelestialBodyComponent
relativeToMotion
[TypeConverterIgnore]
public IMotion relativeToMotion { get; }
Property Value
- IMotion
relativeVelocity
[TypeConverterIgnore]
public Vector relativeVelocity { get; }
Property Value
- Vector
relativeVelocityZup
[TypeConverterIgnore]
public Vector3d relativeVelocityZup { get; }
Property Value
- Vector3d
secondaryPosAtTransition1
[TypeConverterIgnore]
public Position secondaryPosAtTransition1 { get; set; }
Property Value
- Position
secondaryPosAtTransition2
[TypeConverterIgnore]
public Position secondaryPosAtTransition2 { get; set; }
Property Value
- Position
semiMajorAxis
public double semiMajorAxis { get; set; }
Property Value
- double
timeToTransition1
[TypeConverterIgnore]
public double timeToTransition1 { get; set; }
Property Value
- double
timeToTransition2
[TypeConverterIgnore]
public double timeToTransition2 { get; set; }
Property Value
- double
Methods
CompareTo(IPatchedOrbit)
public int CompareTo(IPatchedOrbit other)
Parameters
other IPatchedOrbit
Returns
- int
Dispose()
DisposeMarkerHandler()
public void DisposeMarkerHandler()
EccentricAnomalyAtUT(double)
public double EccentricAnomalyAtUT(double UT)
Parameters
UT double
Returns
- double
FindClosestPoints(IKeplerOrbit, ref double, ref double, ref double, ref double, ref double, ref double, double, int, ref int)
public int FindClosestPoints(IKeplerOrbit 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)
Parameters
s IKeplerOrbit
CD double
CCD double
FFp double
FFs double
SFp double
SFs double
epsilon double
maxIterations int
iterationCount int
Returns
- int
GetDTforTrueAnomaly(double, double)
public double GetDTforTrueAnomaly(double trueAnomaly, double wrapAfterSeconds)
Parameters
trueAnomaly double
wrapAfterSeconds double
Returns
- double
GetEccentricAnomaly(double)
public double GetEccentricAnomaly(double trueAnomaly)
Parameters
trueAnomaly double
Returns
- double
GetFrameVelAtUTZup(double)
public Vector3d GetFrameVelAtUTZup(double UT)
Parameters
UT double
Returns
- Vector3d
GetFrameVelZup()
public Vector3d GetFrameVelZup()
Returns
- Vector3d
GetMeanAnomaly(double)
public double GetMeanAnomaly(double eccentricAnomaly)
Parameters
eccentricAnomaly double
Returns
- double
GetOrbitalCurvatureAtTrueAnomaly(double)
public double GetOrbitalCurvatureAtTrueAnomaly(double trueAnomaly)
Parameters
trueAnomaly double
Returns
- double
GetOrbitalSpeedAtDistance(double)
public double GetOrbitalSpeedAtDistance(double d)
Parameters
d double
Returns
- double
GetOrbitalStateVectorsAtObT(double, double, out Vector3d, out Vector3d)
public double GetOrbitalStateVectorsAtObT(double ObT, double UT, out Vector3d localPositionZup, out Vector3d relativeVelocityZup)
Parameters
ObT double
UT double
localPositionZup Vector3d
relativeVelocityZup Vector3d
Returns
- double
GetOrbitalStateVectorsAtTrueAnomaly(double, double, out Vector3d, out Vector3d)
public double GetOrbitalStateVectorsAtTrueAnomaly(double trueAnomaly, double UT, out Vector3d localPositionZup, out Vector3d relativeVelocityZup)
Parameters
trueAnomaly double
UT double
localPositionZup Vector3d
relativeVelocityZup Vector3d
Returns
- double
GetOrbitalStateVectorsAtUT(double, out Vector3d, out Vector3d)
public double GetOrbitalStateVectorsAtUT(double UT, out Vector3d localPositionZup, out Vector3d relativeVelocityZup)
Parameters
UT double
localPositionZup Vector3d
relativeVelocityZup Vector3d
Returns
- double
GetOrbitalVelocityAtUTZup(double)
public Vector3d GetOrbitalVelocityAtUTZup(double UT)
Parameters
UT double
Returns
- Vector3d
GetRelativeANVector()
public Vector3d GetRelativeANVector()
Returns
- Vector3d
GetRelativeEccVector()
public Vector3d GetRelativeEccVector()
Returns
- Vector3d
GetRelativeOrbitNormal()
public Vector3d GetRelativeOrbitNormal()
Returns
- Vector3d
GetRelativePositionAtObT(double)
public Vector3d GetRelativePositionAtObT(double obT)
Parameters
obT double
Returns
- Vector3d
GetRelativePositionAtUT(double)
public Vector3d GetRelativePositionAtUT(double UT)
Parameters
UT double
Returns
- Vector3d
GetRelativePositionAtUTZup(double)
public Vector3d GetRelativePositionAtUTZup(double UT)
Parameters
UT double
Returns
- Vector3d
GetRelativePositionFromEccAnomaly(double)
public Vector3d GetRelativePositionFromEccAnomaly(double eccentricAnomaly)
Parameters
eccentricAnomaly double
Returns
- Vector3d
GetRelativePositionFromEccAnomalyWithSemiMinorAxis(double, double)
public Vector3d GetRelativePositionFromEccAnomalyWithSemiMinorAxis(double eccentricAnomaly, double semiMinorAxis)
Parameters
eccentricAnomaly double
semiMinorAxis double
Returns
- Vector3d
GetRelativePositionFromTrueAnomaly(double)
public Vector3d GetRelativePositionFromTrueAnomaly(double trueAnomaly)
Parameters
trueAnomaly double
Returns
- Vector3d
GetRelativePositionFromTrueAnomalyZup(double)
public Vector3d GetRelativePositionFromTrueAnomalyZup(double trueAnomalyA)
Parameters
trueAnomalyA double
Returns
- Vector3d
GetState()
public KeplerOrbitState GetState()
Returns
- KeplerOrbitState
GetStateVectorsFromUT(double, out Vector3d, out Vector)
public void GetStateVectorsFromUT(double UT, out Vector3d pos, out Vector vel)
Parameters
UT double
pos Vector3d
vel Vector
GetTimeToPeriapsis()
public double GetTimeToPeriapsis()
Returns
- double
GetTrueAnomaly(double)
public double GetTrueAnomaly(double eccentricAnomaly)
Parameters
eccentricAnomaly double
Returns
- double
GetTrueAnomalyOfZupVector(Vector3d)
public double GetTrueAnomalyOfZupVector(Vector3d vector)
Parameters
vector Vector3d
Returns
- double
GetTruePositionAtT(double)
public Position GetTruePositionAtT(double obT)
Parameters
obT double
Returns
- Position
GetTruePositionAtT(double, ICoordinateSystem)
public Vector3d GetTruePositionAtT(double obT, ICoordinateSystem targetCoordinateSystem)
Parameters
obT double
targetCoordinateSystem ICoordinateSystem
Returns
- Vector3d
GetTruePositionAtUT(double)
public Position GetTruePositionAtUT(double UT)
Parameters
UT double
Returns
- Position
GetTruePositionAtUT(double, ICoordinateSystem)
public Vector3d GetTruePositionAtUT(double UT, ICoordinateSystem targetCoordinateSystem)
Parameters
UT double
targetCoordinateSystem ICoordinateSystem
Returns
- Vector3d
GetUTforTrueAnomaly(double, double)
public double GetUTforTrueAnomaly(double trueAnomaly, double wrapAfterSeconds)
Parameters
trueAnomaly double
wrapAfterSeconds double
Returns
- double
GetVel(VesselComponent)
public Vector3d GetVel(VesselComponent relativeVessel)
Parameters
relativeVessel VesselComponent
Returns
- Vector3d
InitializeMarkerHandler()
public void InitializeMarkerHandler()
PeApIntersects(IKeplerOrbit, double)
public bool PeApIntersects(IKeplerOrbit secondary, double threshold)
Parameters
secondary IKeplerOrbit
threshold double
Returns
- bool
RadiusAtTrueAnomaly(double)
public double RadiusAtTrueAnomaly(double trueAnomaly)
Parameters
trueAnomaly double
Returns
- double
SetReferenceBody(CelestialBodyComponent)
public void SetReferenceBody(CelestialBodyComponent body)
Parameters
body CelestialBodyComponent
SetState(OrbitalElements, string, ISimulationModelMap)
public void SetState(OrbitalElements newElements, string referenceBodyGuid, ISimulationModelMap simulationModelMap)
Parameters
newElements OrbitalElements
referenceBodyGuid string
simulationModelMap ISimulationModelMap
SolveClosestApproach(IKeplerOrbit, ref double, double, double, double, double, int, ref int)
public double SolveClosestApproach(IKeplerOrbit s, ref double UT, double dT, double MinUT, double MaxUT, double epsilon, int maxIterations, ref int iterationCount)
Parameters
s IKeplerOrbit
UT double
dT double
MinUT double
MaxUT double
epsilon double
maxIterations int
iterationCount int
Returns
- double
SolveSOI_BSP(IKeplerOrbit, ref double, double, double, double, double, double, int, ref int)
public bool SolveSOI_BSP(IKeplerOrbit secondaryKeplerOrbit, ref double UT, double dT, double Rsoi, double MinUT, double MaxUT, double epsilon, int maxIterations, ref int iterationCount)
Parameters
secondaryKeplerOrbit IKeplerOrbit
UT double
dT double
Rsoi double
MinUT double
MaxUT double
epsilon double
maxIterations int
iterationCount int
Returns
- bool
ToString()
public override string ToString()
Returns
- string
TrueAnomalyAtObT(double)
public double TrueAnomalyAtObT(double obT)
Parameters
obT double
Returns
- double
TrueAnomalyAtRadius(double)
public double TrueAnomalyAtRadius(double R)
Parameters
R double
Returns
- double
TrueAnomalyAtUT(double)
public double TrueAnomalyAtUT(double UT)
Parameters
UT double
Returns
- double
UpdateFromOrbitAtUT(IOrbit, double, CelestialBodyComponent)
public void UpdateFromOrbitAtUT(IOrbit orbit, double UT, CelestialBodyComponent toBody)
Parameters
orbit IOrbit
UT double
toBody CelestialBodyComponent
UpdateFromStateVectors(Position, Velocity, CelestialBodyComponent, double)
public void UpdateFromStateVectors(Position position, Velocity velocity, CelestialBodyComponent refBody, double UT)
Parameters
position Position
velocity Velocity
refBody CelestialBodyComponent
UT double
UpdateFromUT(double)
public void UpdateFromUT(double UT)
Parameters
UT double
ValidateState(KeplerOrbitState, ISimulationModelMap)
public bool ValidateState(KeplerOrbitState stateData, ISimulationModelMap simulationModelMap)
Parameters
stateData KeplerOrbitState
simulationModelMap ISimulationModelMap
Returns
- bool