Table of Contents

Class OrbiterComponent

Namespace
KSP.Sim.impl
Assembly
Assembly-CSharp.dll
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

orbiterDefinition OrbiterDefinition
universeModel IUniverseModel

OrbiterComponent(UniverseModel)

Configures a (new) OrbiterComponent using the supplied universeModel.

public OrbiterComponent(UniverseModel universeModel)

Parameters

universeModel UniverseModel

Fields

MAX_NBODY_ORBITS

public const int MAX_NBODY_ORBITS = 10

Field Value

int

Properties

DefinitionType

[TypeConverterIgnore]
public override Type DefinitionType { get; }

Property Value

Type

ManeuverPlanSolver

The ManeuverPlanSolver for this OrbiterComponent.

[TypeConverterIgnore]
public ManeuverPlanSolver ManeuverPlanSolver { get; set; }

Property Value

ManeuverPlanSolver

OrbitTargeter

The OrbitTargeter for this OrbiterComponent.

[TypeConverterIgnore]
public OrbitTargeter OrbitTargeter { get; set; }

Property Value

OrbitTargeter

PatchedConicSolver

The PatchedConicSolver for this OrbiterComponent.

[TypeConverterIgnore]
public PatchedConicSolver PatchedConicSolver { get; set; }

Property Value

PatchedConicSolver

PatchedConicsOrbit

The current patch for this OrbiterComponent.

[TypeConverterIgnore]
public PatchedConicsOrbit PatchedConicsOrbit { get; }

Property Value

PatchedConicsOrbit

PatchedNBodyOrbits

The list of patches generated by ManeuverPlanSolver.

[TypeConverterIgnore]
public List<PatchedNBodyOrbit> PatchedNBodyOrbits { get; }

Property Value

List<PatchedNBodyOrbit>

PatchedOrbit

The current patch for this OrbiterComponent.

[TypeConverterIgnore]
public IPatchedOrbit PatchedOrbit { get; set; }

Property Value

IPatchedOrbit

Position

The Position structure for this OrbiterComponent.

[TypeConverterIgnore]
public Position Position { get; }

Property Value

Position

StateType

[TypeConverterIgnore]
public override Type StateType { get; }

Property Value

Type

Type

[TypeConverterIgnore]
public override Type Type { get; }

Property Value

Type

Velocity

The Velocity structure for this OrbiterComponent.

[TypeConverterIgnore]
public Velocity Velocity { get; }

Property Value

Velocity

coordinateSystem

The coordinate system for this OrbiterComponent.

[TypeConverterIgnore]
public ICoordinateSystem coordinateSystem { get; }

Property Value

ICoordinateSystem

localPosition

The current local position for this OrbiterComponent.

[TypeConverterIgnore]
public Vector3d localPosition { get; }

Property Value

Vector3d

lowerCamVsSmaRatio

public float lowerCamVsSmaRatio { get; }

Property Value

float

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

IMotion

relativeVelocity

The current relative velocity for this OrbiterComponent.

[TypeConverterIgnore]
public Vector relativeVelocity { get; }

Property Value

Vector

reverse

The reverse flag for this OrbiterComponent. If true, the orbit progresses retrograde?

[TypeConverterIgnore]
public bool reverse { get; }

Property Value

bool

upperCamVsSmaRatio

public float upperCamVsSmaRatio { get; }

Property Value

float

Methods

CheckOrbitStability()

Checks the orbital stability for this OrbiterComponent.

public void CheckOrbitStability()

GetDefinition()

public override object GetDefinition()

Returns

object

GetState()

public override object GetState()

Returns

object

OnFixedUpdate(double, double)

public override void OnFixedUpdate(double universalTime, double deltaUniversalTime)

Parameters

universalTime double
deltaUniversalTime double

OnRemoved(SimulationObjectModel, double)

public override void OnRemoved(SimulationObjectModel simObject, double universalTime)

Parameters

simObject SimulationObjectModel
universalTime double

OnStart(double)

public override void OnStart(double universalTime)

Parameters

universalTime double

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

state KeplerOrbitState
universalTime double
simulationModelMap ISimulationModelMap

SetState(object, ISimulationModelMap)

public override object SetState(object stateData, ISimulationModelMap simulationModelMap)

Parameters

stateData object
simulationModelMap ISimulationModelMap

Returns

object

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

newPosition Position
newVelocity Velocity

UpdatePosition(Position)

Updates the Position structure for this OrbiterComponent. To update both position and velocity use UpdateFromStateVectors.

public void UpdatePosition(Position newPosition)

Parameters

newPosition Position

UpdateVelocity(Velocity)

Updates the Velocity structure for this OrbiterComponent. To update both position and velocity use UpdateFromStateVectors

public void UpdateVelocity(Velocity newVelocity)

Parameters

newVelocity Velocity

ValidateState(object, ISimulationModelMap)

public override bool ValidateState(object stateData, ISimulationModelMap simulationModelMap)

Parameters

stateData object
simulationModelMap ISimulationModelMap

Returns

bool

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

Action<OrbiterComponent, CelestialBodyComponent>

OrbitalStateUpdated

The action triggered when this OrbiterComponent's state has been updated. See UpdatePosition, UpdateVelocity, and UpdateFromStateVectors.

public event Action<IKeplerOrbit> OrbitalStateUpdated

Event Type

Action<IKeplerOrbit>

PositionUpdated

The action triggered when the position is updated.

public event Action<Position> PositionUpdated

Event Type

Action<Position>

VelocityUpdated

The action triggered when the velocity is updated

public event Action<Velocity> VelocityUpdated

Event Type

Action<Velocity>