C# Class kOS.Suffixed.Orbitable

Inheritance: kOS.Safe.Serialization.SerializableStructure, IHasSharedObjects
Show file Open project: KSP-KOS/KOS Class Usage Examples

Public Methods

Method Description
GetName ( ) : kOS.Safe.Encapsulation.StringValue

Subclasses must override this method to return a string name of this orbital thing (its vessel name or body name)

GetNorthVector ( ) : kOS.Suffixed.Vector

Subclasses must override this method to return a unit vector in the northward direction of its SOI body.

GetOrbit ( ) : Orbit

Get the KSP Orbit object associated with this orbitable

GetOrbitAtUT ( double desiredUT ) : Orbit

Return the Orbit that the object will be in at some point in the future. If the object is capable of having maneuver nodes and transitions (a vessel), then it should give a prediction under the assumption that the chain of maneuver nodes will be executed as planned.

GetOrbitInfo ( ) : OrbitInfo

Get the OrbitInfo object associated with this Orbitable.

GetParentBody ( ) : CelestialBody
GetPosition ( ) : kOS.Suffixed.Vector

Subclasses must override this method to return the position of this object right now.

GetPositionAtUT ( kOS.Suffixed.TimeSpan timeStamp ) : kOS.Suffixed.Vector

Subclasses must override this method to return the position of this object at some arbitrary future time. It must take into account any orbital transfers to other SOI's and any planned maneuver nodes (It should return the predicted location under the assumption that the maneuver nodes currently planned will be executed as planned.) (Technically it can also describe positions in the past).

GetPrograde ( ) : kOS.Suffixed.Direction
GetRetrograde ( ) : kOS.Suffixed.Direction
GetSurfacePrograde ( ) : kOS.Suffixed.Direction
GetSurfaceRetrograde ( ) : kOS.Suffixed.Direction
GetUpVector ( ) : kOS.Suffixed.Vector

Subclasses must override this method to return a unit vector in the upward direction away from its SOI body.

GetVelocities ( ) : OrbitableVelocity

Subclasses must override this method to return the velocity of this object right now.

GetVelocitiesAtUT ( kOS.Suffixed.TimeSpan timeStamp ) : OrbitableVelocity

Subclasses must override this method to return the OrbitableVelocity of this object at some arbitrary future time. It must take into account any orbital transfers to other SOI's and any planned maneuver nodes (It should return the predicted location under the assumption that the maneuver nodes currently planned will be executed as planned.) (Technically it can also describe positions in the past).

PositionToAltitude ( kOS.Suffixed.Vector pos ) : double
PositionToLatitude ( kOS.Suffixed.Vector pos ) : double
PositionToLongitude ( kOS.Suffixed.Vector pos ) : double

Protected Methods

Method Description
Orbitable ( ) : kOS.Safe.Encapsulation
Orbitable ( SharedObjects shareObj ) : kOS.Safe.Encapsulation

Private Methods

Method Description
BuildPatchList ( ) : kOS.Suffixed.ListValue
GetDistance ( ) : ScalarValue
HasBody ( ) : BooleanValue
InitializeSuffixes ( ) : void

Method Details

GetName() public abstract method

Subclasses must override this method to return a string name of this orbital thing (its vessel name or body name)
public abstract GetName ( ) : kOS.Safe.Encapsulation.StringValue
return kOS.Safe.Encapsulation.StringValue

GetNorthVector() public abstract method

Subclasses must override this method to return a unit vector in the northward direction of its SOI body.
public abstract GetNorthVector ( ) : kOS.Suffixed.Vector
return kOS.Suffixed.Vector

GetOrbit() public method

Get the KSP Orbit object associated with this orbitable
public GetOrbit ( ) : Orbit
return Orbit

GetOrbitAtUT() public abstract method

Return the Orbit that the object will be in at some point in the future. If the object is capable of having maneuver nodes and transitions (a vessel), then it should give a prediction under the assumption that the chain of maneuver nodes will be executed as planned.
public abstract GetOrbitAtUT ( double desiredUT ) : Orbit
desiredUT double the timestamp when to query for
return Orbit

GetOrbitInfo() public method

Get the OrbitInfo object associated with this Orbitable.
public GetOrbitInfo ( ) : OrbitInfo
return OrbitInfo

GetParentBody() public method

public GetParentBody ( ) : CelestialBody
return CelestialBody

GetPosition() public abstract method

Subclasses must override this method to return the position of this object right now.
public abstract GetPosition ( ) : kOS.Suffixed.Vector
return kOS.Suffixed.Vector

GetPositionAtUT() public abstract method

Subclasses must override this method to return the position of this object at some arbitrary future time. It must take into account any orbital transfers to other SOI's and any planned maneuver nodes (It should return the predicted location under the assumption that the maneuver nodes currently planned will be executed as planned.) (Technically it can also describe positions in the past).
public abstract GetPositionAtUT ( kOS.Suffixed.TimeSpan timeStamp ) : kOS.Suffixed.Vector
timeStamp kOS.Suffixed.TimeSpan The universal time of the future prediction
return kOS.Suffixed.Vector

GetPrograde() public method

public GetPrograde ( ) : kOS.Suffixed.Direction
return kOS.Suffixed.Direction

GetRetrograde() public method

public GetRetrograde ( ) : kOS.Suffixed.Direction
return kOS.Suffixed.Direction

GetSurfacePrograde() public method

public GetSurfacePrograde ( ) : kOS.Suffixed.Direction
return kOS.Suffixed.Direction

GetSurfaceRetrograde() public method

public GetSurfaceRetrograde ( ) : kOS.Suffixed.Direction
return kOS.Suffixed.Direction

GetUpVector() public abstract method

Subclasses must override this method to return a unit vector in the upward direction away from its SOI body.
public abstract GetUpVector ( ) : kOS.Suffixed.Vector
return kOS.Suffixed.Vector

GetVelocities() public abstract method

Subclasses must override this method to return the velocity of this object right now.
public abstract GetVelocities ( ) : OrbitableVelocity
return OrbitableVelocity

GetVelocitiesAtUT() public abstract method

Subclasses must override this method to return the OrbitableVelocity of this object at some arbitrary future time. It must take into account any orbital transfers to other SOI's and any planned maneuver nodes (It should return the predicted location under the assumption that the maneuver nodes currently planned will be executed as planned.) (Technically it can also describe positions in the past).
public abstract GetVelocitiesAtUT ( kOS.Suffixed.TimeSpan timeStamp ) : OrbitableVelocity
timeStamp kOS.Suffixed.TimeSpan The universal time of the future prediction
return OrbitableVelocity

Orbitable() protected method

protected Orbitable ( ) : kOS.Safe.Encapsulation
return kOS.Safe.Encapsulation

Orbitable() protected method

protected Orbitable ( SharedObjects shareObj ) : kOS.Safe.Encapsulation
shareObj SharedObjects
return kOS.Safe.Encapsulation

PositionToAltitude() public method

public PositionToAltitude ( kOS.Suffixed.Vector pos ) : double
pos kOS.Suffixed.Vector
return double

PositionToLatitude() public method

public PositionToLatitude ( kOS.Suffixed.Vector pos ) : double
pos kOS.Suffixed.Vector
return double

PositionToLongitude() public method

public PositionToLongitude ( kOS.Suffixed.Vector pos ) : double
pos kOS.Suffixed.Vector
return double