C# Class RegexKSP.NodeTools

Mostra file Open project: jbengtson/ksp-precisenode Class Usage Examples

Public Methods

Method Description
Angle360 ( double d ) : double

Adjusts the specified angle to between 0 and 360 degrees.

CreateNodeGizmo ( ManeuverNode node ) : void

Creates a new Meneuver Node Gizmo if needed

changeConicsMode ( int mode ) : void

Sets the conics render mode

convertUTtoHumanDuration ( double UT ) : String

Converts the UT to human-readable duration.

convertUTtoHumanTime ( double UT ) : String

Converts the UT to human-readable Kerbal local time.

fetchKey ( ) : KeyCode

Function to figure out which KeyCode was pressed.

findNextEncounter ( ManeuverNode node ) : Orbit
formatMeters ( double d ) : string

Formats the given double into meters.

getEjectionAngle ( Orbit o, double nodeUT ) : double

Gets the ejection angle of the current maneuver node.

getEquatorialANUT ( Orbit o ) : double

Gets the UT for the equatorial AN.

getEquatorialDNUT ( Orbit o ) : double

Gets the UT for the equatorial DN.

getSolver ( ) : PatchedConicSolver

Convenience function.

getTargetANUT ( Orbit a, Orbit b ) : double

Gets the UT for the ascending node in reference to the target orbit.

getTargetDNUT ( Orbit a, Orbit b ) : double

Gets the UT for the descending node in reference to the target orbit.

getTargetOrbit ( ) : Orbit

Returns the orbit of the currently targeted item or null if there is none.

mergeNodeDown ( ManeuverNode n ) : void

Merges the given node into the next lowest node (n's index - 1). If there is no lower node, does nothing.

Private Methods

Method Description
difference ( UnityEngine.Vector3d initial, UnityEngine.Vector3d final ) : UnityEngine.Vector3d
findPreviousOrbit ( ManeuverNode n ) : Orbit
mergeBurnVectors ( double UT, ManeuverNode first, Orbit projOrbit ) : UnityEngine.Vector3d

Method Details

Angle360() public static method

Adjusts the specified angle to between 0 and 360 degrees.
public static Angle360 ( double d ) : double
d double The specified angle to restrict.
return double

CreateNodeGizmo() public static method

Creates a new Meneuver Node Gizmo if needed
public static CreateNodeGizmo ( ManeuverNode node ) : void
node ManeuverNode
return void

changeConicsMode() public static method

Sets the conics render mode
public static changeConicsMode ( int mode ) : void
mode int The conics render mode to use, one of 0, 1, 2, 3, or 4. Arguments outside those will be set to 3.
return void

convertUTtoHumanDuration() public static method

Converts the UT to human-readable duration.
public static convertUTtoHumanDuration ( double UT ) : String
UT double Kerbal Spece Program Universal Time.
return String

convertUTtoHumanTime() public static method

Converts the UT to human-readable Kerbal local time.
public static convertUTtoHumanTime ( double UT ) : String
UT double Kerbal Spece Program Universal Time.
return String

fetchKey() public static method

Function to figure out which KeyCode was pressed.
public static fetchKey ( ) : KeyCode
return KeyCode

findNextEncounter() public static method

public static findNextEncounter ( ManeuverNode node ) : Orbit
node ManeuverNode
return Orbit

formatMeters() public static method

Formats the given double into meters.
public static formatMeters ( double d ) : string
d double The double to format
return string

getEjectionAngle() public static method

Gets the ejection angle of the current maneuver node.
public static getEjectionAngle ( Orbit o, double nodeUT ) : double
o Orbit
nodeUT double Kerbal Spece Program Universal Time.
return double

getEquatorialANUT() public static method

Gets the UT for the equatorial AN.
public static getEquatorialANUT ( Orbit o ) : double
o Orbit The Orbit to calculate the UT from.
return double

getEquatorialDNUT() public static method

Gets the UT for the equatorial DN.
public static getEquatorialDNUT ( Orbit o ) : double
o Orbit The Orbit to calculate the UT from.
return double

getSolver() public static method

Convenience function.
public static getSolver ( ) : PatchedConicSolver
return PatchedConicSolver

getTargetANUT() public static method

Gets the UT for the ascending node in reference to the target orbit.
public static getTargetANUT ( Orbit a, Orbit b ) : double
a Orbit The orbit to find the UT on.
b Orbit The target orbit.
return double

getTargetDNUT() public static method

Gets the UT for the descending node in reference to the target orbit.
public static getTargetDNUT ( Orbit a, Orbit b ) : double
a Orbit The orbit to find the UT on.
b Orbit The target orbit.
return double

getTargetOrbit() public static method

Returns the orbit of the currently targeted item or null if there is none.
public static getTargetOrbit ( ) : Orbit
return Orbit

mergeNodeDown() public static method

Merges the given node into the next lowest node (n's index - 1). If there is no lower node, does nothing.
public static mergeNodeDown ( ManeuverNode n ) : void
n ManeuverNode The ManeuverNode to merge down.
return void