Kerbal Space Program
1.12.4
|
Public Member Functions | |
delegate double | BisectFunc (double x) |
Delegate for Bisect method. More... | |
Static Public Member Functions | |
static double | AlignmentTime (TransferDataSimple transferDataSimple, Orbit sourceOrbit, Orbit targetOrbit, double startUT, double offsetDegrees=0d) |
The time in seconds from current UT that the phase angles of the Source and Target body orbits will align. More... | |
static double | Bisect (BisectFunc f, double minimum, double maximum, double acceptableRange=0.01, int maxIter=15) |
Bisection method More... | |
static double | CalcCircularizeDV (TransferDataSimple transferDataSimple, double newApoapsis) |
Calculate Circularization dV. More... | |
static double | CalcSameSOITransferDV (TransferDataSimple transferDataSimple, Orbit startOrbit) |
Calculate same SOI Hohmann Transfer dV. More... | |
static bool | CalculateCorrection (TransferDataSimple transferDataSimple, double startUT, SafeAbortBackgroundWorker bw) |
Calculate a Correction Burn if orbits are inclined. Will only process if relative inclination is > 1. More... | |
static void | CalculateStartEndXferTimes (CelestialBody sourceBody, CelestialBody targetBody, double offsetDegrees, out double startTime, out double endTime) |
Calculates the start and end transfer window times where the phase angle between source and target planet is within offset degrees occuring after the current time. More... | |
static void | CalculateStartEndXferTimes (CelestialBody sourceBody, CelestialBody targetBody, double afterUT, double offsetDegrees, out double startTime, out double endTime) |
Calculates the start and end transfer window times where the phase angle between source and target planet is within offset degrees. More... | |
static void | CalculateStartEndXferTimes (TransferDataSimple transferDataSimple, CelestialBody sourceBody, CelestialBody targetBody, double offsetDegrees, out string startTime, out string endTime) |
Calculates the start and end transfer window times where the phase angle between source and target planet is within offset degrees. More... | |
static bool | ChangingPeriapsis (Orbit start, Orbit target, double UT) |
Are we changing Periapsis to reach target. More... | |
static Vector3d | DeltaVToInterceptAtTime (Orbit o, double initialUT, Orbit target, double DT, out Vector3d secondDV) |
static double | FinalizeLambert (TransferDataSimple transferDataSimple, double startUT, Orbit startOrbit, Orbit targetOrbit) |
Finalize Lambert solution. More... | |
static bool | FindIntercept (TransferDataSimple transferDataSimple, Orbit startOrbit, CelestialBody targetBody, Vector3d dV, double UT, bool sameSOIXfer, double initialClosestApproach, SafeAbortBackgroundWorker bw, out Vector3d adjustedDV) |
static double | HohmannTimeOfFlight (Orbit origin, Orbit destination) |
Calculates the time of flight for a Hohmann transfer between origin and destination , assuming the orbits are circular and coplanar. More... | |
static void | LambertSolver (double mu, Vector3d r1, Vector3d v1, Vector3d r2, Vector3d v2, double tof, int nrev, out Vector3d vi, out Vector3d vf) |
Solve Lambert's Problem. More... | |
static double | Root (BisectFunc f, double a, double b, double tol, int maxIterations=50, int sign=0) |
Brent's Algorithm for root finding. More... | |
static double | SafeOrbitRadius (CelestialBody body) |
Returns the minimum safe orbit radius for body. More... | |
static bool | SameSOITransfer (TransferDataSimple transferDataSimple) |
Is the transfer within the Same SOI? More... | |
static void | SuperiorLambert (double mu, Vector3d r1, Vector3d v1, Vector3d r2, Vector3d v2, double tof, out Vector3d vi, out Vector3d vf) |
Superior Lambert solution using Gim J. Der derivative on Sun's solution. More... | |
static double | TransferDV (TransferDataSimple transferDataSimple, double startUT) |
Calculate the Transfer dV for a simple Transfer. Target and Source body must have already been set. More... | |
Static Public Attributes | |
static double | safetyEnvelope = 1.025 |
The safety Envelope for setting minimum Radius on Transfer Orbits. More... | |
|
inlinestatic |
The time in seconds from current UT that the phase angles of the Source and Target body orbits will align.
transferDataSimple | This is the instance of the TransferDataSimple. |
sourceOrbit | This is the source Orbit |
targetOrbit | This is the target Orbit |
startUT | This is the starting UT to use for the calcs. |
offsetDegrees | This optional offset in degrees will be applied to the optimal angle calculation |
|
inlinestatic |
Bisection method
f | single dimension function |
minimum | minimum value |
maximum | maximum value |
acceptableRange | acceptable range |
maxIter | maximum iterations |
delegate double TransferMath.BisectFunc | ( | double | x | ) |
Delegate for Bisect method.
x |
|
inlinestatic |
Calculate Circularization dV.
transferDataSimple | |
newApoapsis | Should include radius of CB |
|
inlinestatic |
Calculate same SOI Hohmann Transfer dV.
transferDataSimple | TransferDataSimple data instance |
startOrbit | The starting orbit |
|
inlinestatic |
Calculate a Correction Burn if orbits are inclined. Will only process if relative inclination is > 1.
bw | BackgroundWorker |
transferDataSimple | the TransferDataSimple data instance |
startUT | The start UT to start from |
|
inlinestatic |
Calculates the start and end transfer window times where the phase angle between source and target planet is within offset degrees occuring after the current time.
sourceBody | Starting Celestial Body for the Transfer |
targetBody | Ending Celestial Body for the Transfer |
offsetDegrees | How many degrees either side of the optimum phase angle do we want to use for start and finish |
startTime | The start time in UT of the TRansfer Window |
endTime | The end time in UT of the TRansfer Window |
|
inlinestatic |
Calculates the start and end transfer window times where the phase angle between source and target planet is within offset degrees.
sourceBody | Starting Celestial Body for the Transfer |
targetBody | Ending Celestial Body for the Transfer |
afterUT | The time after which the middled of the transfer should be |
offsetDegrees | How many degrees either side of the optimum phase angle do we want to use for start and finish |
startTime | The time in seconds from afterUT to the start of the window |
endTime | The time in seconds from afterUT to the end of the window |
|
inlinestatic |
Calculates the start and end transfer window times where the phase angle between source and target planet is within offset degrees.
transferDataSimple | Transfer data object related to this transfer |
sourceBody | Starting Celestial Body for the Transfer |
targetBody | Ending Celestial Body for the Transfer |
offsetDegrees | How many degrees either side of the optimum phase angle do we want to use for start and finish |
startTime | The time in seconds from current UT to the start of the window |
endTime | The time in seconds from current UT to the end of the window |
Are we changing Periapsis to reach target.
start | Start orbit |
target | Target orbit |
UT | The burn start UT |
|
inlinestatic |
|
inlinestatic |
Finalize Lambert solution.
transferDataSimple | |
startUT | |
startOrbit | |
targetOrbit |
|
inlinestatic |
Calculates the time of flight for a Hohmann transfer between origin and destination , assuming the orbits are circular and coplanar.
origin | The origin orbit. |
destination | The destination orbit. |
|
inlinestatic |
Solve Lambert's Problem.
mu | Gravity |
r1 | Position at Origin |
v1 | Velocity at Origin |
r2 | Position at Destination |
v2 | Velocity at Destination |
tof | Time of Flight (secs) |
nrev | Number of Orbits |
vi | Velocity Vector at Ejection |
vf | Velocity Vector at Arrival |
|
inlinestatic |
Brent's Algorithm for root finding.
f | single dimension function to find the root of |
a | first value |
b | second value |
tol | tolerance |
maxIterations | maximum iterations |
sign |
|
inlinestatic |
Returns the minimum safe orbit radius for body.
body |
|
inlinestatic |
Is the transfer within the Same SOI?
transferDataSimple |
|
inlinestatic |
Superior Lambert solution using Gim J. Der derivative on Sun's solution.
mu | |
r1 | |
v1 | |
r2 | |
v2 | |
tof | |
vi | |
vf |
|
inlinestatic |
Calculate the Transfer dV for a simple Transfer. Target and Source body must have already been set.
transferDataSimple | This is the instance of the TransferDataSimple. |
vessel | This is the Vessel - should be the ActiveVessel. |
startUT | This is the starting UT to use for the calcs. |
|
static |
The safety Envelope for setting minimum Radius on Transfer Orbits.