Class OrbiterComponent
public class OrbiterComponent : ObjectComponent, IGuidIdentity, IPositionDriver, ILinearMotionDriver
- Inheritance
-
OrbiterComponent
- Implements
- Inherited Members
- Extension Methods
Constructors
OrbiterComponent()
Configures a (new) (blank?) OrbiterComponent.
public OrbiterComponent()
OrbiterComponent(OrbiterDefinition, IUniverseModel)
Configures a (new) OrbiterComponent using the supplied orbiterDefinition and universeModel.
public OrbiterComponent(OrbiterDefinition orbiterDefinition, IUniverseModel universeModel)
Parameters
orbiterDefinitionOrbiterDefinitionuniverseModelIUniverseModel
OrbiterComponent(UniverseModel)
Configures a (new) OrbiterComponent using the supplied universeModel.
public OrbiterComponent(UniverseModel universeModel)
Parameters
universeModelUniverseModel
Fields
MAX_NBODY_ORBITS
public const int MAX_NBODY_ORBITS = 10
Field Value
Properties
DefinitionType
[TypeConverterIgnore]
public override Type DefinitionType { get; }
Property Value
ManeuverPlanSolver
The ManeuverPlanSolver for this OrbiterComponent.
[TypeConverterIgnore]
public ManeuverPlanSolver ManeuverPlanSolver { get; set; }
Property Value
OrbitTargeter
The OrbitTargeter for this OrbiterComponent.
[TypeConverterIgnore]
public OrbitTargeter OrbitTargeter { get; set; }
Property Value
PatchedConicSolver
The PatchedConicSolver for this OrbiterComponent.
[TypeConverterIgnore]
public PatchedConicSolver PatchedConicSolver { get; set; }
Property Value
PatchedConicsOrbit
The current patch for this OrbiterComponent.
[TypeConverterIgnore]
public PatchedConicsOrbit PatchedConicsOrbit { get; }
Property Value
PatchedNBodyOrbits
The list of patches generated by ManeuverPlanSolver.
[TypeConverterIgnore]
public List<PatchedNBodyOrbit> PatchedNBodyOrbits { get; }
Property Value
PatchedOrbit
The current patch for this OrbiterComponent.
[TypeConverterIgnore]
public IPatchedOrbit PatchedOrbit { get; set; }
Property Value
Position
The Position structure for this OrbiterComponent.
[TypeConverterIgnore]
public Position Position { get; }
Property Value
StateType
[TypeConverterIgnore]
public override Type StateType { get; }
Property Value
Type
[TypeConverterIgnore]
public override Type Type { get; }
Property Value
Velocity
The Velocity structure for this OrbiterComponent.
[TypeConverterIgnore]
public Velocity Velocity { get; }
Property Value
coordinateSystem
The coordinate system for this OrbiterComponent.
[TypeConverterIgnore]
public ICoordinateSystem coordinateSystem { get; }
Property Value
localPosition
The current local position for this OrbiterComponent.
[TypeConverterIgnore]
public Vector3d localPosition { get; }
Property Value
lowerCamVsSmaRatio
public float lowerCamVsSmaRatio { get; }
Property Value
nodeColor
public Color nodeColor { get; }
Property Value
- Color
orbitColor
public Color orbitColor { get; }
Property Value
- Color
relativeToMotion
The current relative motion for this OrbiterComponent.
[TypeConverterIgnore]
public IMotion relativeToMotion { get; }
Property Value
relativeVelocity
The current relative velocity for this OrbiterComponent.
[TypeConverterIgnore]
public Vector relativeVelocity { get; }
Property Value
reverse
The reverse flag for this OrbiterComponent. If true, the orbit progresses retrograde?
[TypeConverterIgnore]
public bool reverse { get; }
Property Value
upperCamVsSmaRatio
public float upperCamVsSmaRatio { get; }
Property Value
Methods
CheckOrbitStability()
Checks the orbital stability for this OrbiterComponent.
public void CheckOrbitStability()
GetDefinition()
public override object GetDefinition()
Returns
GetState()
public override object GetState()
Returns
OnFixedUpdate(double, double)
public override void OnFixedUpdate(double universalTime, double deltaUniversalTime)
Parameters
OnRemoved(SimulationObjectModel, double)
public override void OnRemoved(SimulationObjectModel simObject, double universalTime)
Parameters
simObjectSimulationObjectModeluniversalTimedouble
OnStart(double)
public override void OnStart(double universalTime)
Parameters
universalTimedouble
SetState(KeplerOrbitState, double, ISimulationModelMap)
Sets the stateData for this OrbiterComponent using the supplied KeplerOrbitState, universalTime, and simulationModelMap.
public void SetState(KeplerOrbitState state, double universalTime, ISimulationModelMap simulationModelMap)
Parameters
stateKeplerOrbitStateuniversalTimedoublesimulationModelMapISimulationModelMap
SetState(object, ISimulationModelMap)
public override object SetState(object stateData, ISimulationModelMap simulationModelMap)
Parameters
stateDataobjectsimulationModelMapISimulationModelMap
Returns
UpdateFromStateVectors(Position, Velocity)
Updates both the Position structure and Velocity structure for this OrbiterComponent. To update only position or velocity use either UpdatePosition or UpdateVelocity respectively.
public void UpdateFromStateVectors(Position newPosition, Velocity newVelocity)
Parameters
UpdatePosition(Position)
Updates the Position structure for this OrbiterComponent. To update both position and velocity use UpdateFromStateVectors.
public void UpdatePosition(Position newPosition)
Parameters
newPositionPosition
UpdateVelocity(Velocity)
Updates the Velocity structure for this OrbiterComponent. To update both position and velocity use UpdateFromStateVectors
public void UpdateVelocity(Velocity newVelocity)
Parameters
newVelocityVelocity
ValidateState(object, ISimulationModelMap)
public override bool ValidateState(object stateData, ISimulationModelMap simulationModelMap)
Parameters
stateDataobjectsimulationModelMapISimulationModelMap
Returns
Events
OnReferenceBodyChange
The action triggered when the reference body changes, e.g. when transitioning across an SOI boundary.
public event Action<OrbiterComponent, CelestialBodyComponent> OnReferenceBodyChange
Event Type
OrbitalStateUpdated
The action triggered when this OrbiterComponent's state has been updated. See UpdatePosition, UpdateVelocity, and UpdateFromStateVectors.
public event Action<IKeplerOrbit> OrbitalStateUpdated
Event Type
PositionUpdated
The action triggered when the position is updated.
public event Action<Position> PositionUpdated
Event Type
VelocityUpdated
The action triggered when the velocity is updated
public event Action<Velocity> VelocityUpdated