FlightGlobals contains lists of all CelestialBodies and Vessels in the game. It also provides static utility functions for computing the atmospheric and gravitational properties of CelestialBodies. More...
Public Types | |
| enum | VesselTargetModes { VesselTargetModes.None = 0, VesselTargetModes.Direction = 1, VesselTargetModes.DirectionAndVelocity = 2, VesselTargetModes.DirectionVelocityAndOrientation = 3 } |
Public Member Functions | |
| FlightGlobals () | |
| Quaternion | getFoR (FoRModes mode) |
| void | SetShipOrbit (int selBodyIndex, double ecc, double sma, double inc, double LAN, double mna, double argPe, double ObT) |
| void | SetVesselTarget (ITargetable tgt) |
| Sets the currently selected target vessel, celestial body, or docking node More... | |
| void | Start () |
Static Public Member Functions | |
| static void | addPhysicalObject (GameObject pObject) |
| static ClearToSaveStatus | ClearToSave () |
| static void | ForceSetActiveVessel (Vessel v) |
| static float | getAltitudeAtPos (Vector3 position) |
| The altitude above the sea level of the current main body of the given world space position. More... | |
| static double | getAltitudeAtPos (Vector3d position) |
| The altitude above the sea level of the current main body of the given world space position. More... | |
| static double | getAltitudeAtPos (Vector3d position, CelestialBody body) |
| The altitude above the sea level of the given body of the given world space position. More... | |
| static double | getAtmDensity (double pressure) |
| Converts an atmospheric pressure into an atmospheric density. Atmospheric density is what appears in the KSP drag equation. This function seems to just multiply the input by 1.2230948554874 More... | |
| static Vector3d | getCentrifugalAcc (Vector3d pos, CelestialBody body) |
| static Vector3d | getCoriolisAcc (Vector3d vel, CelestialBody body) |
| static float | getExternalTemperature (Vector3d pos) |
| Finds the temperature at a given world space position. More... | |
| static float | getExternalTemperature (float altitude, CelestialBody body) |
| Finds the temperature at a given altitude above a given body. More... | |
| static Quaternion | GetFoR (FoRModes mode) |
| static Vector3d | getGeeForceAtPosition (Vector3d pos) |
| Returns the gravitational acceleration vector at a given position. Contrary to its name, it does not return force. More... | |
| static CelestialBody | getMainBody () |
| Returns the current dominant body? More... | |
| static CelestialBody | getMainBody (Vector3d refPos) |
| Returns the body whose sphere of influence contains a given position? More... | |
| static double | getStaticPressure () |
| Returns the current atmospheric pressure? More... | |
| static double | getStaticPressure (Vector3d position) |
| Returns the atmospheric pressure at a given position. Feed the output of this function into getAtmDensity to get the atmopsheric density. More... | |
| static double | getStaticPressure (double altitude, CelestialBody body=null) |
| Returns the atmospheric pressure at a given altitude above a given body More... | |
| static double | getStaticPressure (Vector3d position, CelestialBody body) |
| Returns the atmospheric pressure of a given body's atmopshere at a given position More... | |
| static Vector3d | getUpAxis () |
| static Vector3d | getUpAxis (Vector3d position) |
| static void | removePhysicalObject (GameObject pObject) |
| static void | SetActiveVessel (Vessel v) |
Public Attributes | |
| Vessel | activeVessel |
| List< CelestialBody > | bodies |
| float | drag_multiplier |
| Camera | mainCameraRef |
| List< Vessel > | vessels |
| Vector3 | vesselTargetDelta |
| Vector3 | vesselTargetDirection |
| Transform | vesselTargetTransform |
Static Public Attributes | |
| static Part | activeTarget |
| static double | camera_altitude |
| static Vector3d | camera_position |
| static CelestialBody | currentMainBody |
| static FlightGlobals | fetch |
| Use this FlightGlobals instance to access non-static members of FlightGlobals. For example, the current target is FlightGlobals.fetch.VesselTarget. More... | |
| static FoRModes | FoRMode |
| static bool | overrideOrbit |
| static List< GameObject > | physicalObjects |
| static bool | ready |
| static Vector3d | ship_acceleration |
| static double | ship_altitude |
| static Vector3 | ship_angularMomentum |
| static Vector3d | ship_angularVelocity |
| static Vector3d | ship_CoM |
| static double | ship_dns |
| static double | ship_geeForce |
| static float | ship_heading |
| static double | ship_latitude |
| static double | ship_longitude |
| static Vector3 | ship_MOI |
| static double | ship_obtSpeed |
| static Vector3d | ship_obtVelocity |
| static Orbit | ship_orbit |
| static Quaternion | ship_orientation |
| static Quaternion | ship_orientation_offset |
| static Vector3d | ship_position |
| static Quaternion | ship_rotation |
| static double | ship_srfSpeed |
| static Vector3d | ship_srfVelocity |
| static double | ship_stP |
| static double | ship_tgtSpeed |
| static Vector3d | ship_tgtVelocity |
| static Vector3d | ship_upAxis |
| static Vector3d | ship_velocity |
| static double | ship_verticalSpeed |
| static bool | warpDriveActive |
Properties | |
| static Vessel | ActiveVessel [get] |
| The vessel the player is currently controlling. More... | |
| static List< CelestialBody > | Bodies [get] |
| A list of all CelestialBodies in the universe. Contents in 0.18.2: More... | |
| static float | DragMultiplier [get] |
| The KSP formula for the drag force on a part is (1/2) * DragMultiplier * part.mass * part.mass_drag * airspeed^2 More... | |
| static bool | RefFrameIsRotating [get] |
| Whether KSP is doing its computations in an inertial reference frame, or the reference frame that rotates with the current dominant celestial body. More... | |
| static Vector3d | upAxis [get] |
| static float | vacuumTemperature [get] |
| static List< Vessel > | Vessels [get] |
| A list of all the Vessels that currently exist More... | |
| ITargetable | VesselTarget [get] |
| The currently selected target vessel, celestial body, or docking node. If no target is selected, this is null. More... | |
| FlightGlobals.VesselTargetModes | vesselTargetMode [get] |
FlightGlobals contains lists of all CelestialBodies and Vessels in the game. It also provides static utility functions for computing the atmospheric and gravitational properties of CelestialBodies.
| FlightGlobals.FlightGlobals | ( | ) |
|
static |
|
static |
|
static |
|
static |
The altitude above the sea level of the current main body of the given world space position.
| position | World space position |
|
static |
The altitude above the sea level of the current main body of the given world space position.
| position | World space position |
|
static |
The altitude above the sea level of the given body of the given world space position.
| position | World space position |
| body | The body in question |
|
static |
Converts an atmospheric pressure into an atmospheric density. Atmospheric density is what appears in the KSP drag equation. This function seems to just multiply the input by 1.2230948554874
| pressure | Use the output of getStaticPressure |
|
static |
|
static |
|
static |
Finds the temperature at a given world space position.
| pos | World space position |
|
static |
Finds the temperature at a given altitude above a given body.
| altitude | An altitude (in meters?) |
| body | The body of interest |
|
static |
| Quaternion FlightGlobals.getFoR | ( | FoRModes | mode | ) |
Returns the gravitational acceleration vector at a given position. Contrary to its name, it does not return force.
| pos | World space position |
|
static |
Returns the current dominant body?
|
static |
Returns the body whose sphere of influence contains a given position?
| refPos | World space position? |
|
static |
Returns the current atmospheric pressure?
|
static |
Returns the atmospheric pressure at a given position. Feed the output of this function into getAtmDensity to get the atmopsheric density.
| position | World space position |
|
static |
Returns the atmospheric pressure at a given altitude above a given body
| altitude | Altitude in meters? |
| body | The body in question |
|
static |
Returns the atmospheric pressure of a given body's atmopshere at a given position
| position | World space position |
| body | The body in question |
|
static |
|
static |
|
static |
| void FlightGlobals.SetShipOrbit | ( | int | selBodyIndex, |
| double | ecc, | ||
| double | sma, | ||
| double | inc, | ||
| double | LAN, | ||
| double | mna, | ||
| double | argPe, | ||
| double | ObT | ||
| ) |
| void FlightGlobals.SetVesselTarget | ( | ITargetable | tgt | ) |
Sets the currently selected target vessel, celestial body, or docking node
| tgt | The Vessel, CelestialBody, or ModuleDockingNode to target |
| void FlightGlobals.Start | ( | ) |
|
static |
| Vessel FlightGlobals.activeVessel |
| List<CelestialBody> FlightGlobals.bodies |
|
static |
|
static |
|
static |
| float FlightGlobals.drag_multiplier |
|
static |
Use this FlightGlobals instance to access non-static members of FlightGlobals. For example, the current target is FlightGlobals.fetch.VesselTarget.
|
static |
| Camera FlightGlobals.mainCameraRef |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| List<Vessel> FlightGlobals.vessels |
| Vector3 FlightGlobals.vesselTargetDelta |
| Vector3 FlightGlobals.vesselTargetDirection |
| Transform FlightGlobals.vesselTargetTransform |
|
static |
|
staticget |
The vessel the player is currently controlling.
|
staticget |
A list of all CelestialBodies in the universe. Contents in 0.18.2:
Bodies[0] = Sun
Bodies[1] = Kerbin
Bodies[2] = Mun
Bodies[3] = Minmus
Bodies[4] = Moho
Bodies[5] = Eve
Bodies[6] = Dun
Bodies[7] = Ike
Bodies[8] = Jool
Bodies[9] = Laythe
Bodies[10] = Vall
Bodies[11] = Bop
Bodies[12] = Tylo
Bodies[13] = Gilly
Bodies[14] = Pol
Bodies[15] = Dres
Bodies[16] = Eeloo
|
staticget |
The KSP formula for the drag force on a part is (1/2) * DragMultiplier * part.mass * part.mass_drag * airspeed^2
|
staticget |
Whether KSP is doing its computations in an inertial reference frame, or the reference frame that rotates with the current dominant celestial body.
|
staticget |
|
staticget |
|
staticget |
A list of all the Vessels that currently exist
|
get |
The currently selected target vessel, celestial body, or docking node. If no target is selected, this is null.
|
get |
1.8.7