KSP API
|
The Sun, the planets, and the moons are all CelestialBodies. More...
Public Member Functions | |
CelestialBody () | |
void | CBUpdate () |
void | debugTimeWarpLimits () |
void | DisplaySurfaceResource (int resourceID) |
double | GetAltitude (Vector3d worldPos) |
Gets the height of a given position above this body's sea level, in meters. More... | |
Bounds | getBounds () |
double | GetDensity (double pressure, double temperature) |
Vector3d | GetFrameVel () |
The velocity of the CelestialBody, {AliceWorld, Sun}. (See Orbit.cs for the reference frame definitions). More... | |
Vector3d | GetFrameVelAtUT (double UT) |
Vector3 | GetFwdVector () |
double | GetLatitude (Vector3d worldPos) |
Gets the latitude of a given position, in degrees. More... | |
double | GetLongitude (Vector3d worldPos) |
Gets the longitude of a given position, in degrees. Note that you CANNOT count on this value being in any particular range. This function may for example return 420, meaning 60 degrees east. You would be well advised to coerce it into a standard range like -180 to 180 before using it. More... | |
string | GetName () |
The name of this target. More... | |
Vector3 | GetObtVelocity () |
Orbit | GetOrbit () |
OrbitDriver | GetOrbitDriver () |
Vector3d | getPositionAtUT (double UT) |
double | GetPressure (double altitude) |
Vector3d | GetRelSurfaceNVector (double lat, double lon) |
Vector3d | GetRelSurfacePosition (Vector3d worldPosition) |
Vector3d | GetRelSurfacePosition (double lat, double lon, double alt) |
Returns a vector pointing from the center of the body to the given latitude, longitude, and altitude. More... | |
Vector3d | getRFrmVel (Vector3d worldPos) |
Returns the velocity at a given position of the frame of reference that rotates with the planet. This velocity is the difference between the "orbit" and "surface" velocities. More... | |
double | GetSolarPowerFactor (double density) |
double | GetSpeedOfSound (double pressure, double density) |
Vector3 | GetSrfVelocity () |
Vector3d | GetSurfaceNVector (double lat, double lon) |
Returns a unit vector perpendicular to the surface of the body at the given latitude and longitude (pretending for the moment that the body is a perfect sphere). More... | |
VesselTargetModes | GetTargetingMode () |
double | GetTemperature (double altitude) |
Transform | GetTransform () |
Vector3d | getTruePositionAtUT (double UT) |
Vessel | GetVessel () |
Vector3d | GetWorldSurfacePosition (double lat, double lon, double alt) |
Returns the position, in world coordinates, of a given latitude, longitude, and altitude More... | |
bool | HasChild (CelestialBody body) |
bool | HasParent (CelestialBody body) |
void | HideSurfaceResource () |
void | resetTimeWarpLimits () |
double | RevealAltitude () |
Returns the body's altitude above the reference sphere of its primary More... | |
float | RevealMass () |
Returns the body's mass, in kg More... | |
string | RevealName () |
Returns the body's tracking station name More... | |
string | RevealSituationString () |
Describes the state of the body More... | |
double | RevealSpeed () |
Returns the body's speed More... | |
string | RevealType () |
Returns the type of the body More... | |
void | SetResourceMap (Texture2D map) |
void | SetupConstants () |
Public Attributes | |
AtmosphereFromGround | afg |
double | albedo |
double | angularV |
The magnitude of the angular velocity of the body's rotation, in radians per second. More... | |
Vector3d | angularVelocity |
The body's angular velocity vector, in rotations per second. This points along the axis of rotation and its magnitude is the rotation rate in radians per second. More... | |
double | atmDensityASL |
bool | atmosphere |
Whether this body has an atmosphere More... | |
double | atmosphereAdiabaticIndex |
bool | atmosphereContainsOxygen |
Presumably, whether jet engines will work in this body's atmosphere More... | |
double | atmosphereDepth |
double | atmosphereGasMassLapseRate |
double | atmosphereMolarMass |
FloatCurve | atmospherePressureCurve |
bool | atmospherePressureCurveIsNormalized |
double | atmospherePressureSeaLevel |
FloatCurve | atmosphereTemperatureCurve |
bool | atmosphereTemperatureCurveIsNormalized |
double | atmosphereTemperatureLapseRate |
double | atmosphereTemperatureSeaLevel |
FloatCurve | atmosphereTemperatureSunMultCurve |
bool | atmosphereUsePressureCurve |
bool | atmosphereUseTemperatureCurve |
Color | atmosphericAmbientColor |
FloatCurve | axialTemperatureSunMultCurve |
CBAttributeMapSO | BiomeMap |
string | bodyDescription |
string | bodyName |
The name of the body, as a string. More... | |
Transform | bodyTransform |
CelestialBodyType | bodyType |
double | convectionMultiplier |
double | coreTemperatureOffset |
double | Density |
double | directRotAngle |
FloatCurve | eccentricityTemperatureSunMultCurve |
double | emissivity |
double | GeeASL |
The gravitational acceleration of the body at sea level, in units of gees (1 gee = 9.81 m/s^2) More... | |
double | gMagnitudeAtCenter |
The gravitational acceleration (in m/s^2) at a radius r (in m) from the body's center is gMagnitudeAtCenter / r^2 More... | |
double | gravParameter |
The gravitational parameter GM is the universal gravitational constant G times the mass M of the body. In KSP the gravitational constant G is exactly 6.673 m^3 / (kg s^2), and the body mass is measured in kilograms. More... | |
double | hillSphere |
Unused? More... | |
double | initialRotation |
bool | inverseRotation |
float | inverseRotThresholdAltitude |
bool | isHomeWorld |
FloatCurve | latitudeTemperatureBiasCurve |
FloatCurve | latitudeTemperatureSunMultCurve |
double | Mass |
The mass of the body in kilograms. Computed More... | |
double | navballSwitchRadiusMult |
bool | ocean |
Whether this planet has an ocean at "sea level" More... | |
float | oceanAFGAltMult |
float | oceanAFGBase |
bool | oceanAFGLerp |
float | oceanAFGMin |
double | oceanDensity |
float | oceanFogColorAltMult |
Color | oceanFogColorEnd |
Color | oceanFogColorStart |
float | oceanFogDensityAltScalar |
float | oceanFogDensityEnd |
float | oceanFogDensityExponent |
float | oceanFogDensityPQSMult |
float | oceanFogDensityStart |
float | oceanSkyColorMult |
float | oceanSkyColorOpacityAltMult |
float | oceanSkyColorOpacityBase |
float | oceanSunAltMult |
float | oceanSunBase |
float | oceanSunMin |
bool | oceanUseFog |
OrbitDriver | orbitDriver |
List< CelestialBody > | orbitingBodies |
A list of this body's moons (or, in the case of the Sun, a list of the planets). More... | |
PQS | pqsController |
The pqsController computes the terrain of the planet. Note that for the Sun, pqsController = null. More... | |
CelestialBodySubtree | progressTree |
double | Radius |
The radius of the planet in meters. Note that this is only the radius of "sea level"; the actual terrain may be higher. More... | |
double | radiusAtmoFactor |
bool | rotates |
QuaternionD | rotation |
double | rotationAngle |
double | rotationPeriod |
The time, in seconds, for the body to complete one rotation around its axis More... | |
GameObject | scaledBody |
CelestialBodyScienceParams | scienceValues |
double | shockTemperatureMultiplier |
double | solarDayLength |
bool | solarRotationPeriod |
double | sphereOfInfluence |
The radius of this body's sphere of influence (measured from the center of the body), in meters. More... | |
double | SurfaceArea |
bool | tidallyLocked |
Presumably, whether this body is tidally locked to the body around with it orbits. More... | |
float[] | timeWarpAltitudeLimits |
Presumably, this gives the minimum altitude you must have in order to be allowed to use each warp rate when in this body's sphere of influence. More... | |
bool | use_The_InName |
Vector3d | zUpAngularVelocity |
Properties | |
DiscoveryInfo | DiscoveryInfo [get] |
Describes to what extent this body has been explored More... | |
int | flightGlobalsIndex [get, set] |
string | name [get] |
Orbit | orbit [get] |
Describes the orbit of this body around its primary. More... | |
Vector3d | position [get, set] |
The position of the center of the body, in world coordinates. More... | |
CelestialBody | referenceBody [get] |
Presumably, the body this body orbits around More... | |
Texture2D | ResourceMap [get] |
PResource | Resources [get] |
Vector3d | RotationAxis [get] |
string | theName [get] |
![]() | |
DiscoveryInfo | DiscoveryInfo [get] |
Describes to what extent this object has been explored More... | |
The Sun, the planets, and the moons are all CelestialBodies.
CelestialBody.CelestialBody | ( | ) |
void CelestialBody.CBUpdate | ( | ) |
void CelestialBody.debugTimeWarpLimits | ( | ) |
void CelestialBody.DisplaySurfaceResource | ( | int | resourceID | ) |
double CelestialBody.GetAltitude | ( | Vector3d | worldPos | ) |
Gets the height of a given position above this body's sea level, in meters.
worldPos | A position in world coordinates |
Bounds CelestialBody.getBounds | ( | ) |
double CelestialBody.GetDensity | ( | double | pressure, |
double | temperature | ||
) |
Vector3d CelestialBody.GetFrameVel | ( | ) |
The velocity of the CelestialBody, {AliceWorld, Sun}. (See Orbit.cs for the reference frame definitions).
Vector3d CelestialBody.GetFrameVelAtUT | ( | double | UT | ) |
Vector3 CelestialBody.GetFwdVector | ( | ) |
Implements ITargetable.
double CelestialBody.GetLatitude | ( | Vector3d | worldPos | ) |
Gets the latitude of a given position, in degrees.
worldPos | A position in world coordinates |
double CelestialBody.GetLongitude | ( | Vector3d | worldPos | ) |
Gets the longitude of a given position, in degrees. Note that you CANNOT count on this value being in any particular range. This function may for example return 420, meaning 60 degrees east. You would be well advised to coerce it into a standard range like -180 to 180 before using it.
worldPos | A position in world coordinates |
string CelestialBody.GetName | ( | ) |
The name of this target.
Implements ITargetable.
Vector3 CelestialBody.GetObtVelocity | ( | ) |
Implements ITargetable.
Orbit CelestialBody.GetOrbit | ( | ) |
Implements ITargetable.
OrbitDriver CelestialBody.GetOrbitDriver | ( | ) |
Implements ITargetable.
Vector3d CelestialBody.getPositionAtUT | ( | double | UT | ) |
double CelestialBody.GetPressure | ( | double | altitude | ) |
Vector3d CelestialBody.GetRelSurfaceNVector | ( | double | lat, |
double | lon | ||
) |
Vector3d CelestialBody.GetRelSurfacePosition | ( | double | lat, |
double | lon, | ||
double | alt | ||
) |
Returns a vector pointing from the center of the body to the given latitude, longitude, and altitude.
lat | Latitude in degrees |
lon | Longitude in degrees |
alt | Altitude above sea level in meters |
Returns the velocity at a given position of the frame of reference that rotates with the planet. This velocity is the difference between the "orbit" and "surface" velocities.
worldPos | A position in world coordinates |
double CelestialBody.GetSolarPowerFactor | ( | double | density | ) |
double CelestialBody.GetSpeedOfSound | ( | double | pressure, |
double | density | ||
) |
Vector3 CelestialBody.GetSrfVelocity | ( | ) |
Implements ITargetable.
Vector3d CelestialBody.GetSurfaceNVector | ( | double | lat, |
double | lon | ||
) |
Returns a unit vector perpendicular to the surface of the body at the given latitude and longitude (pretending for the moment that the body is a perfect sphere).
lat | Latitude in degrees |
lon | Longitude in degrees |
VesselTargetModes CelestialBody.GetTargetingMode | ( | ) |
Implements ITargetable.
double CelestialBody.GetTemperature | ( | double | altitude | ) |
Transform CelestialBody.GetTransform | ( | ) |
Implements ITargetable.
Vector3d CelestialBody.getTruePositionAtUT | ( | double | UT | ) |
Vessel CelestialBody.GetVessel | ( | ) |
Implements ITargetable.
Vector3d CelestialBody.GetWorldSurfacePosition | ( | double | lat, |
double | lon, | ||
double | alt | ||
) |
Returns the position, in world coordinates, of a given latitude, longitude, and altitude
lat | Latitude in degrees |
lon | Longitude in degrees |
alt | Altitude above sea level in meters |
bool CelestialBody.HasChild | ( | CelestialBody | body | ) |
bool CelestialBody.HasParent | ( | CelestialBody | body | ) |
void CelestialBody.HideSurfaceResource | ( | ) |
void CelestialBody.resetTimeWarpLimits | ( | ) |
double CelestialBody.RevealAltitude | ( | ) |
Returns the body's altitude above the reference sphere of its primary
Implements IDiscoverable
Implements IDiscoverable.
float CelestialBody.RevealMass | ( | ) |
string CelestialBody.RevealName | ( | ) |
string CelestialBody.RevealSituationString | ( | ) |
Describes the state of the body
"Orbiting the Sun"
Implements IDiscoverable
Implements IDiscoverable.
double CelestialBody.RevealSpeed | ( | ) |
string CelestialBody.RevealType | ( | ) |
Returns the type of the body
Implements IDiscoverable
Implements IDiscoverable.
void CelestialBody.SetResourceMap | ( | Texture2D | map | ) |
void CelestialBody.SetupConstants | ( | ) |
AtmosphereFromGround CelestialBody.afg |
double CelestialBody.albedo |
double CelestialBody.angularV |
The magnitude of the angular velocity of the body's rotation, in radians per second.
Vector3d CelestialBody.angularVelocity |
The body's angular velocity vector, in rotations per second. This points along the axis of rotation and its magnitude is the rotation rate in radians per second.
double CelestialBody.atmDensityASL |
bool CelestialBody.atmosphere |
Whether this body has an atmosphere
double CelestialBody.atmosphereAdiabaticIndex |
bool CelestialBody.atmosphereContainsOxygen |
Presumably, whether jet engines will work in this body's atmosphere
double CelestialBody.atmosphereDepth |
double CelestialBody.atmosphereGasMassLapseRate |
double CelestialBody.atmosphereMolarMass |
FloatCurve CelestialBody.atmospherePressureCurve |
bool CelestialBody.atmospherePressureCurveIsNormalized |
double CelestialBody.atmospherePressureSeaLevel |
FloatCurve CelestialBody.atmosphereTemperatureCurve |
bool CelestialBody.atmosphereTemperatureCurveIsNormalized |
double CelestialBody.atmosphereTemperatureLapseRate |
double CelestialBody.atmosphereTemperatureSeaLevel |
FloatCurve CelestialBody.atmosphereTemperatureSunMultCurve |
bool CelestialBody.atmosphereUsePressureCurve |
bool CelestialBody.atmosphereUseTemperatureCurve |
Color CelestialBody.atmosphericAmbientColor |
FloatCurve CelestialBody.axialTemperatureSunMultCurve |
CBAttributeMapSO CelestialBody.BiomeMap |
string CelestialBody.bodyDescription |
string CelestialBody.bodyName |
The name of the body, as a string.
Transform CelestialBody.bodyTransform |
CelestialBodyType CelestialBody.bodyType |
double CelestialBody.convectionMultiplier |
double CelestialBody.coreTemperatureOffset |
double CelestialBody.Density |
double CelestialBody.directRotAngle |
FloatCurve CelestialBody.eccentricityTemperatureSunMultCurve |
double CelestialBody.emissivity |
double CelestialBody.GeeASL |
The gravitational acceleration of the body at sea level, in units of gees (1 gee = 9.81 m/s^2)
double CelestialBody.gMagnitudeAtCenter |
The gravitational acceleration (in m/s^2) at a radius r (in m) from the body's center is gMagnitudeAtCenter / r^2
double CelestialBody.gravParameter |
The gravitational parameter GM is the universal gravitational constant G times the mass M of the body. In KSP the gravitational constant G is exactly 6.673 m^3 / (kg s^2), and the body mass is measured in kilograms.
double CelestialBody.hillSphere |
Unused?
double CelestialBody.initialRotation |
bool CelestialBody.inverseRotation |
float CelestialBody.inverseRotThresholdAltitude |
bool CelestialBody.isHomeWorld |
FloatCurve CelestialBody.latitudeTemperatureBiasCurve |
FloatCurve CelestialBody.latitudeTemperatureSunMultCurve |
double CelestialBody.Mass |
The mass of the body in kilograms. Computed
double CelestialBody.navballSwitchRadiusMult |
bool CelestialBody.ocean |
Whether this planet has an ocean at "sea level"
float CelestialBody.oceanAFGAltMult |
float CelestialBody.oceanAFGBase |
bool CelestialBody.oceanAFGLerp |
float CelestialBody.oceanAFGMin |
double CelestialBody.oceanDensity |
float CelestialBody.oceanFogColorAltMult |
Color CelestialBody.oceanFogColorEnd |
Color CelestialBody.oceanFogColorStart |
float CelestialBody.oceanFogDensityAltScalar |
float CelestialBody.oceanFogDensityEnd |
float CelestialBody.oceanFogDensityExponent |
float CelestialBody.oceanFogDensityPQSMult |
float CelestialBody.oceanFogDensityStart |
float CelestialBody.oceanSkyColorMult |
float CelestialBody.oceanSkyColorOpacityAltMult |
float CelestialBody.oceanSkyColorOpacityBase |
float CelestialBody.oceanSunAltMult |
float CelestialBody.oceanSunBase |
float CelestialBody.oceanSunMin |
bool CelestialBody.oceanUseFog |
OrbitDriver CelestialBody.orbitDriver |
this is what gives the celestial body its orbit and makes it go along the orbit as well
List<CelestialBody> CelestialBody.orbitingBodies |
A list of this body's moons (or, in the case of the Sun, a list of the planets).
PQS CelestialBody.pqsController |
The pqsController computes the terrain of the planet. Note that for the Sun, pqsController = null.
CelestialBodySubtree CelestialBody.progressTree |
double CelestialBody.Radius |
The radius of the planet in meters. Note that this is only the radius of "sea level"; the actual terrain may be higher.
double CelestialBody.radiusAtmoFactor |
bool CelestialBody.rotates |
QuaternionD CelestialBody.rotation |
double CelestialBody.rotationAngle |
double CelestialBody.rotationPeriod |
The time, in seconds, for the body to complete one rotation around its axis
GameObject CelestialBody.scaledBody |
CelestialBodyScienceParams CelestialBody.scienceValues |
double CelestialBody.shockTemperatureMultiplier |
double CelestialBody.solarDayLength |
bool CelestialBody.solarRotationPeriod |
double CelestialBody.sphereOfInfluence |
The radius of this body's sphere of influence (measured from the center of the body), in meters.
double CelestialBody.SurfaceArea |
bool CelestialBody.tidallyLocked |
Presumably, whether this body is tidally locked to the body around with it orbits.
float [] CelestialBody.timeWarpAltitudeLimits |
Presumably, this gives the minimum altitude you must have in order to be allowed to use each warp rate when in this body's sphere of influence.
bool CelestialBody.use_The_InName |
Vector3d CelestialBody.zUpAngularVelocity |
|
get |
Describes to what extent this body has been explored
|
getset |
|
get |
|
get |
Describes the orbit of this body around its primary.
|
getset |
The position of the center of the body, in world coordinates.
|
get |
Presumably, the body this body orbits around
|
get |
|
get |
|
get |
|
get |