C# Класс BetterBurnTime.ClosestApproachTracker

Наследование: UnityEngine.MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AbsolutePositionAt UnityEngine.Vector3d
Clamp double
FindClosestApproach void
Recalculate bool
Reset void
SeparationAt double
TargetVesselOf Vessel
TrackingInterval double

Открытые методы

Метод Описание
LateUpdate ( ) : void

Called on each frame.

Start ( ) : void

Here when the add-on loads upon flight start.

Приватные методы

Метод Описание
AbsolutePositionAt ( Orbit orbit, double time ) : UnityEngine.Vector3d

Gets the position of the orbit at the specified time, in world coordinates.

Clamp ( double value, double min, double max ) : double
FindClosestApproach ( Orbit sourceOrbit, Orbit targetOrbit, double currentTime, double &closestApproachTime, double &closestApproachDistance ) : void

Find the UT time at which body A comes closest to body B. Thanks to sarbian for the code that inspired this function: https://github.com/MuMech/MechJeb2/blob/master/MechJeb2/OrbitExtensions.cs#L123-L158

Recalculate ( ) : bool

Tries to find the vessel's closest encounter with its target, if any. Returns true if there's anything to display.

Reset ( ) : void

Reset the tracker and clear out all info.

SeparationAt ( Orbit orbit1, Orbit orbit2, double time ) : double

Gets the separation in meters of the two orbits at the specified time.

TargetVesselOf ( Vessel vessel ) : Vessel

Gets the target vessel of the specified vessel, or none if there isn't one or it's not usable for some reason.

TrackingInterval ( Orbit orbit ) : double

Get the length of time to examine for a closest approach. For elliptic orbits, this will be one orbit.

Описание методов

LateUpdate() публичный Метод

Called on each frame.
public LateUpdate ( ) : void
Результат void

Start() публичный Метод

Here when the add-on loads upon flight start.
public Start ( ) : void
Результат void