|
static double | AngleOfAscendingNode (Orbit currentOrbit, Orbit targetOrbit) |
| Finds the angle of the ascending node between two orbits. More...
|
|
static double | AngleOfDescendingNode (Orbit currentOrbit, Orbit targetOrbit) |
| Finds the angle of the descending node between two orbits. More...
|
|
static Orbit | GenerateOrbit (int seed, CelestialBody targetBody, OrbitType orbitType, double altitudeDifficulty, double inclinationDifficulty, double eccentricityOverride=0) |
| Generates a random orbit. More...
|
|
static double | GetRelativeInclination (Orbit a, Orbit b) |
| Gets the relative inclination difference between two orbits. More...
|
|
static OrbitType | IdentifyOrbit (Orbit o) |
| Checks an orbit for characteristics of an orbit type. More...
|
|
static Vector3d | PositionOfApoapsis (Orbit o) |
| Gets the world position of an orbit's apoapsis. More...
|
|
static Vector3d | PositionOfPeriapsis (Orbit o) |
| Gets the world position of an orbit's periapsis. More...
|
|
static bool | ValidateOrbit (int seed, ref Orbit orbit, OrbitType orbitType, double altitudeDifficulty, double inclinationDifficulty, string source="") |
| Checks a generated orbit for awkward parameters, and patches it to sane ones. More...
|
|
static double FinePrint.Utilities.OrbitUtilities.AngleOfAscendingNode |
( |
Orbit |
currentOrbit, |
|
|
Orbit |
targetOrbit |
|
) |
| |
|
inlinestatic |
Finds the angle of the ascending node between two orbits.
- Parameters
-
currentOrbit | The current orbit. |
targetOrbit | The target orbit. |
- Returns
- The true anomaly of the ascending node between both orbits.
< If the vector points to the infalling part of the orbit then we need to do 360 minus the angle from Pe to get the true anomaly.
static double FinePrint.Utilities.OrbitUtilities.AngleOfDescendingNode |
( |
Orbit |
currentOrbit, |
|
|
Orbit |
targetOrbit |
|
) |
| |
|
inlinestatic |
Finds the angle of the descending node between two orbits.
- Parameters
-
currentOrbit | The current orbit. |
targetOrbit | The target orbit. |
- Returns
- The true anomaly of the descending node between both orbits.
static Orbit FinePrint.Utilities.OrbitUtilities.GenerateOrbit |
( |
int |
seed, |
|
|
CelestialBody |
targetBody, |
|
|
OrbitType |
orbitType, |
|
|
double |
altitudeDifficulty, |
|
|
double |
inclinationDifficulty, |
|
|
double |
eccentricityOverride = 0 |
|
) |
| |
|
inlinestatic |
Generates a random orbit.
- Parameters
-
seed | The seed to generate from. |
targetBody | The celestial body. |
orbitType | Type of the orbit. |
altitudeDifficulty | How drastic the apses can get. |
inclinationDifficulty | How drastic the inclination can get. |
eccentricityOverride | Force an eccentricity. (0-1) |
- Returns
- A randomly generated orbit.
static double FinePrint.Utilities.OrbitUtilities.GetRelativeInclination |
( |
Orbit |
a, |
|
|
Orbit |
b |
|
) |
| |
|
inlinestatic |
Gets the relative inclination difference between two orbits.
- Parameters
-
a | The first orbit. |
b | The other orbit. |
- Returns
- Angular difference (0 to 180)
static OrbitType FinePrint.Utilities.OrbitUtilities.IdentifyOrbit |
( |
Orbit |
o | ) |
|
|
inlinestatic |
Checks an orbit for characteristics of an orbit type.
- Parameters
-
- Returns
- The orbit's orbit type.
static Vector3d FinePrint.Utilities.OrbitUtilities.PositionOfApoapsis |
( |
Orbit |
o | ) |
|
|
inlinestatic |
Gets the world position of an orbit's apoapsis.
- Parameters
-
- Returns
- A world position.
static Vector3d FinePrint.Utilities.OrbitUtilities.PositionOfPeriapsis |
( |
Orbit |
o | ) |
|
|
inlinestatic |
Gets the world position of an orbit's periapsis.
- Parameters
-
- Returns
- A world position.
static bool FinePrint.Utilities.OrbitUtilities.ValidateOrbit |
( |
int |
seed, |
|
|
ref Orbit |
orbit, |
|
|
OrbitType |
orbitType, |
|
|
double |
altitudeDifficulty, |
|
|
double |
inclinationDifficulty, |
|
|
string |
source = "" |
|
) |
| |
|
inlinestatic |
Checks a generated orbit for awkward parameters, and patches it to sane ones.
- Parameters
-
seed | The seed to generate parameters from. |
orbit | The orbit reference to patch. |
orbitType | Type of the orbit. |
altitudeDifficulty | How drastic the apses can get. |
inclinationDifficulty | How drastic the inclination can get. |
- Returns
- If the orbit was sane to begin with.
< We could check for many more things one day: null referenceBody, eccentricity over one, apoapsis out of sphere of influence, etc.
< However, for now, let's stick with pure NaNs and infinities, things that can cause the orbit to actually disappear.
The documentation for this class was generated from the following file:
- KSP/Assets/Scripts/Scenarios/Career Modules/Contracts/FinePrint/Utilities/OrbitUtilities.cs