ksp::vessel
Collection of types and functions to get information and control in-game vessels.
Types
ActionGroups
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
abort |
bool |
R/W |
|
brakes |
bool |
R/W |
|
custom1 |
bool |
R/W |
|
custom10 |
bool |
R/W |
|
custom2 |
bool |
R/W |
|
custom3 |
bool |
R/W |
|
custom4 |
bool |
R/W |
|
custom5 |
bool |
R/W |
|
custom6 |
bool |
R/W |
|
custom7 |
bool |
R/W |
|
custom8 |
bool |
R/W |
|
custom9 |
bool |
R/W |
|
gear |
bool |
R/W |
|
light |
bool |
R/W |
|
radiator_panels |
bool |
R/W |
|
rcs |
bool |
R/W |
|
sas |
bool |
R/W |
|
science |
bool |
R/W |
|
solar_panels |
bool |
R/W |
ActuatorMode
Actuator mode of a reaction wheel
Methods
to_string
actuatormode.to_string ( ) -> string
String representation of the number
ActuatorModeConstants
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
All |
R/O |
Always on |
|
ManualOnly |
R/O |
Only active in manual control |
|
SASOnly |
R/O |
Only active with SAS |
Methods
from_string
actuatormodeconstants.from_string ( value : string ) -> Option<ksp::vessel::ActuatorMode>
Parse from string
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
value |
string |
Enum value to lookup |
Autopilot
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
enabled |
bool |
R/W |
|
global_lock_direction |
R/W |
||
global_target_orientation |
R/W |
||
lock_direction |
R/W |
||
mode |
R/W |
||
target_orientation |
R/W |
AutopilotMode
Vessel autopilot (SAS) mode
Methods
to_string
autopilotmode.to_string ( ) -> string
String representation of the number
AutopilotModeConstants
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
AntiTarget |
R/O |
Align the vessel to the vector pointing away from its target (if a target is set). |
|
Antinormal |
R/O |
Align the vessel to the anti-normal vector of its orbit. |
|
Autopilot |
R/O |
Align the vessel to the |
|
Maneuver |
R/O |
Align the vessel to the burn vector of the next maneuver node (if a maneuver node exists). |
|
Navigation |
R/O |
Align the vessel to the |
|
Normal |
R/O |
Align the vessel to the normal vector of its orbit. |
|
Prograde |
R/O |
Align the vessel to the prograde vector of its orbit. |
|
RadialIn |
R/O |
Align the vessel to the radial-in vector of its orbit. |
|
RadialOut |
R/O |
Align the vessel to the radial-out vector of its orbit. |
|
Retrograde |
R/O |
Align the vessel to the retrograde vector of its orbit. |
|
StabilityAssist |
R/O |
Stability assist mode. The autopilot tries to stop the rotation of the vessel. |
|
Target |
R/O |
Align the vessel to the vector pointing to its target (if a target is set). |
Methods
from_string
autopilotmodeconstants.from_string ( value : string ) -> Option<ksp::vessel::AutopilotMode>
Parse from string
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
value |
string |
Enum value to lookup |
CommandControlState
Current state of a command module
Methods
to_string
commandcontrolstate.to_string ( ) -> string
String representation of the number
CommandControlStateConstants
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
Disabled |
R/O |
Command module disabled. |
|
FullyFunctional |
R/O |
Command module is functional. |
|
Hibernating |
R/O |
Command module is hibernating. |
|
NoCommNetConnection |
R/O |
Command module has no comm net connection. |
|
None |
R/O |
||
NotEnoughCrew |
R/O |
Command module has not enough crew. |
|
NotEnoughResources |
R/O |
Command module has not resource crew. |
Methods
from_string
commandcontrolstateconstants.from_string ( value : string ) -> Option<ksp::vessel::CommandControlState>
Parse from string
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
value |
string |
Enum value to lookup |
ConnectionNodeStatus
State of the comm-net connection
Methods
to_string
connectionnodestatus.to_string ( ) -> string
String representation of the number
ConnectionNodeStatusConstants
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
Connected |
R/O |
Connected |
|
Disconnected |
R/O |
Disconnected |
|
Invalid |
R/O |
Invalid |
|
Pending |
R/O |
Pending |
Methods
from_string
connectionnodestatusconstants.from_string ( value : string ) -> Option<ksp::vessel::ConnectionNodeStatus>
Parse from string
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
value |
string |
Enum value to lookup |
DeltaVSituation
Vessel situation for delta-v calculation
Methods
to_string
deltavsituation.to_string ( ) -> string
String representation of the number
DeltaVSituationConstants
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
Altitude |
R/O |
Calculate delta-v at the current altitude of the vessel. |
|
SeaLevel |
R/O |
Calculate delta-v at sea level of the current main body. |
|
Vaccum |
R/O |
Calculate delta-v in vacuum. (Typo is in the game, maybe will get fixed some day) |
Methods
from_string
deltavsituationconstants.from_string ( value : string ) -> Option<ksp::vessel::DeltaVSituation>
Parse from string
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
value |
string |
Enum value to lookup |
DeployableDeployState
Current state of a deployable part (like CargoBays)
Methods
to_string
deployabledeploystate.to_string ( ) -> string
String representation of the number
DeployableDeployStateConstants
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
Broken |
R/O |
Part is broken |
|
Extended |
R/O |
Part is extended |
|
Extending |
R/O |
Part is currently extending |
|
Retracted |
R/O |
Part is retracted |
|
Retracting |
R/O |
Part is currently retracting |
Methods
from_string
deployabledeploystateconstants.from_string ( value : string ) -> Option<ksp::vessel::DeployableDeployState>
Parse from string
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
value |
string |
Enum value to lookup |
DockingState
Current state of a docking node
Methods
to_string
dockingstate.to_string ( ) -> string
String representation of the number
DockingStateConstants
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
Acquire_Dockee |
R/O |
Acquiring dockee |
|
Acquire_Docker |
R/O |
Acquiring docker |
|
Disengaged |
R/O |
Vessel is disengaged |
|
Docked |
R/O |
Vessel is docked |
|
None |
R/O |
||
Ready |
R/O |
Docking port is ready for docking |
Methods
from_string
dockingstateconstants.from_string ( value : string ) -> Option<ksp::vessel::DockingState>
Parse from string
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
value |
string |
Enum value to lookup |
EngineDeltaV
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
engine |
R/O |
Deprecated: Use |
|
engine_module |
R/O |
Corresponding engine module of the vessel |
|
part |
R/O |
Deprecated: Use |
|
start_burn_stage |
int |
R/O |
Number of the stage when engine is supposed to start |
Methods
get_ISP
enginedeltav.get_ISP ( situation : ksp::vessel::DeltaVSituation ) -> float
Estimated ISP of the engine in a given situation
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
situation |
ksp::vessel::DeltaVSituation |
get_global_thrust_vector
enginedeltav.get_global_thrust_vector ( situation : ksp::vessel::DeltaVSituation ) -> ksp::math::GlobalVector
Coordinate independent estimated thrust vector of the engine in a given situation
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
situation |
ksp::vessel::DeltaVSituation |
get_thrust
enginedeltav.get_thrust ( situation : ksp::vessel::DeltaVSituation ) -> float
Estimated thrust of the engine in a given situation
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
situation |
ksp::vessel::DeltaVSituation |
get_thrust_vector
enginedeltav.get_thrust_vector ( situation : ksp::vessel::DeltaVSituation ) -> ksp::math::Vec3
Estimated thrust vector of the engine in a given situation
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
situation |
ksp::vessel::DeltaVSituation |
EngineMode
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
allow_restart |
bool |
R/O |
|
allow_shutdown |
bool |
R/O |
|
engine_type |
R/O |
||
max_thrust |
float |
R/O |
|
min_thrust |
float |
R/O |
|
name |
string |
R/O |
|
propellant |
R/O |
||
throttle_locked |
bool |
R/O |
EngineType
Engine types
Methods
to_string
enginetype.to_string ( ) -> string
String representation of the number
EngineTypeConstants
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
Antimatter |
R/O |
||
Electric |
R/O |
||
Generic |
R/O |
Generic engine type (not specified) |
|
Helium3 |
R/O |
||
MetallicHydrogen |
R/O |
||
Methalox |
R/O |
Methan-oxigene rocket engine |
|
MonoProp |
R/O |
Mono-propellant engine |
|
Nuclear |
R/O |
Nuclear engine |
|
NuclearSaltwater |
R/O |
||
Piston |
R/O |
||
ScramJet |
R/O |
||
SolidBooster |
R/O |
Engine is a solid fuel booster |
|
Turbine |
R/O |
Turbine engine |
Methods
from_string
enginetypeconstants.from_string ( value : string ) -> Option<ksp::vessel::EngineType>
Parse from string
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
value |
string |
Enum value to lookup |
FlightCtrlState
Current state of the (pilots) flight controls.
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
breaks |
bool |
R/W |
Brakes |
gear_down |
bool |
R/W |
Gear down |
gear_up |
bool |
R/W |
Gear up |
kill_rot |
bool |
R/W |
Kill rotation |
main_throttle |
float |
R/W |
Setting for the main throttle (0 - 1) |
pitch |
float |
R/W |
Setting for pitch rotation (-1 - 1) |
pitch_trim |
float |
R/W |
Current trim value for pitch |
roll |
float |
R/W |
Setting for roll rotation (-1 - 1) |
roll_trim |
float |
R/W |
Current trim value for roll |
stage |
bool |
R/W |
Stage |
wheel_steer |
float |
R/W |
Setting for wheel steering (-1 - 1, applied to Rovers) |
wheel_steer_trim |
float |
R/W |
Current trim value for wheel steering |
wheel_throttle |
float |
R/W |
Setting for wheel throttle (0 - 1, applied to Rovers) |
wheel_throttle_trim |
float |
R/W |
Current trim value for wheel throttle |
x |
float |
R/W |
Setting for x-translation (-1 - 1) |
y |
float |
R/W |
Setting for y-translation (-1 - 1) |
yaw |
float |
R/W |
Setting for yaw rotation (-1 - 1) |
yaw_trim |
float |
R/W |
Current trim value for yaw |
z |
float |
R/W |
Setting for z-translation (-1 - 1) |
Maneuver
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
nodes |
R/O |
||
trajectory |
R/O |
Get the planed trajectory of the vessel if all maneuvers are successfully executed.The list of orbit patch will always start after the first maneuvering node.I.e. if not maneuvers are planed this list will be empty. |
Methods
add
maneuver.add ( ut : float,
radialOut : float,
normal : float,
prograde : float ) -> Result<ksp::vessel::ManeuverNode>
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
ut |
float |
||
radialOut |
float |
||
normal |
float |
||
prograde |
float |
add_burn_vector
maneuver.add_burn_vector ( ut : float,
burnVector : ksp::math::Vec3 ) -> Result<ksp::vessel::ManeuverNode>
Add a maneuver node at a given time ut
with a given burnVector
.
Note: Contrary to orbit.perturbed_orbit
the maneuver node calculation take the expected
burn-time of the vessel into account. Especially for greater delta-v this will lead to different results.
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
ut |
float |
||
burnVector |
ksp::math::Vec3 |
next_node
maneuver.next_node ( ) -> Result<ksp::vessel::ManeuverNode>
remove_all
maneuver.remove_all ( ) -> Unit
Remove all maneuver nodes
ManeuverNode
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
ETA |
float |
R/W |
Get/set the estimated time of arrival to the maneuver |
burn_duration |
float |
R/O |
Get the estimated burn duration of the maneuver |
burn_vector |
R/W |
Get/set the burn vector of the maneuver in the celestial frame of the main body |
|
expected_orbit |
R/O |
Get the expected orbit patch after the maneuver has been executed |
|
global_burn_vector |
R/W |
Get/set coordinate independent the burn vector of the maneuver |
|
normal |
float |
R/W |
Get/set the orbital normal part of the maneuver |
orbit_patch |
R/O |
Get the orbit patch the maneuver should be executed on |
|
prograde |
float |
R/W |
Get/set the orbital prograde part of the maneuver |
radial_out |
float |
R/W |
Get/set the orbital radial part of the maneuver |
time |
float |
R/W |
Get/set the universal time the maneuver should be executed |
Methods
remove
maneuvernode.remove ( ) -> Unit
Remove maneuver node from the maneuver plan
ModuleAirIntake
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
enabled |
bool |
R/O |
Enable/disable module |
flow_rate |
float |
R/O |
Resource flow rate |
part |
R/O |
||
part_name |
string |
R/O |
|
resource |
R/O |
||
resource_units |
float |
R/O |
|
toogle_intake |
bool |
R/W |
Toggle air intake. |
ModuleCommand
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
control_state |
R/O |
||
has_hibernation |
bool |
R/O |
|
hibernation_multiplier |
float |
R/O |
|
is_hibernating |
bool |
R/O |
|
part |
R/O |
||
part_name |
string |
R/O |
|
required_resources |
R/O |
Methods
control_from_here
modulecommand.control_from_here ( ) -> Unit
ModuleControlSurface
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
angle_of_attack |
float |
R/O |
|
authority_limiter |
float |
R/W |
|
drag |
float |
R/O |
|
drag_force |
R/O |
||
drag_position |
R/O |
||
enable_pitch |
bool |
R/W |
|
enable_roll |
bool |
R/W |
|
enable_yaw |
bool |
R/W |
|
global_drag_force |
R/O |
||
global_drag_position |
R/O |
||
global_lift_force |
R/O |
||
global_lift_position |
R/O |
||
invert_control |
bool |
R/W |
|
lift |
float |
R/O |
|
lift_drag_ratio |
float |
R/O |
|
lift_force |
R/O |
||
lift_position |
R/O |
||
part |
R/O |
||
part_name |
string |
R/O |
ModuleDecoupler
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
ejection_impulse |
float |
R/W |
|
is_decoupled |
bool |
R/O |
|
part |
R/O |
||
part_name |
string |
R/O |
Methods
decouple
moduledecoupler.decouple ( ) -> bool
ModuleDeployable
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
deploy_limit |
float |
R/W |
|
deploy_state |
R/O |
||
extendable |
bool |
R/O |
|
extended |
bool |
R/W |
|
part |
R/O |
||
part_name |
string |
R/O |
|
retractable |
bool |
R/O |
Methods
set_extended
moduledeployable.set_extended ( extend : bool ) -> Unit
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
extend |
bool |
ModuleDockingNode
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
docking_state |
R/O |
||
is_deployable_docking_port |
bool |
R/O |
|
node_types |
string[] |
R/O |
|
part |
R/O |
||
part_name |
string |
R/O |
Methods
control_from_here
moduledockingnode.control_from_here ( ) -> Unit
ModuleDrag
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
body_lift_force |
R/O |
||
body_lift_position |
R/O |
||
drag_force |
R/O |
||
drag_position |
R/O |
||
exposed_area |
float |
R/O |
|
global_body_lift_force |
R/O |
||
global_body_lift_position |
R/O |
||
global_drag_force |
R/O |
||
global_drag_position |
R/O |
||
part |
R/O |
||
part_name |
string |
R/O |
|
reference_area |
float |
R/O |
|
total_area |
float |
R/O |
ModuleEngine
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
auto_switch_mode |
bool |
R/W |
|
current_engine_mode |
R/O |
Get the current engine mode |
|
current_propellant |
R/O |
Get the propellant of the current engine mode |
|
current_throttle |
float |
R/O |
|
current_thrust |
float |
R/O |
|
engine_modes |
R/O |
Get all engine modes |
|
fairing |
Option<ksp::vessel::ModuleFairing> |
R/O |
|
gimbal |
Option<ksp::vessel::ModuleGimbal> |
R/O |
|
global_thrust_direction |
R/O |
Coordinate independent direction of thrust. |
|
has_fairing |
bool |
R/O |
Check if engine has fairing |
has_ignited |
bool |
R/O |
Check if engine has ignited |
independent_throttle |
float |
R/W |
Current independent throttle between 0.0 - 1.0 |
independent_throttle_enabled |
bool |
R/W |
Toggle independent throttle |
is_flameout |
bool |
R/O |
Check if engine had a flame-out |
is_gimbal |
bool |
R/O |
Check if engine has gimbal |
is_operational |
bool |
R/O |
Check if engine is operational |
is_propellant_starved |
bool |
R/O |
|
is_shutdown |
bool |
R/O |
Check if engine is shutdown |
is_staged |
bool |
R/O |
|
max_fuel_flow |
float |
R/O |
|
max_thrust_output_atm |
float |
R/O |
|
max_thrust_output_vac |
float |
R/O |
|
min_fuel_flow |
float |
R/O |
|
part |
R/O |
||
part_name |
string |
R/O |
|
propellants |
R/O |
Get the propellants of the different engine modes |
|
real_isp |
float |
R/O |
|
throttle_min |
float |
R/O |
|
thrust_direction |
R/O |
Direction of thrust in the celestial frame of the main body |
|
thrust_limiter |
float |
R/W |
Current thrust limit value between 0.0 - 1.0 |
Methods
calc_max_thrust_output_atm
moduleengine.calc_max_thrust_output_atm ( atmPressurekPa : float,
atmTemp : float,
atmDensity : float,
machNumber : float ) -> float
Calculate maximum thrust in atmosphere given atmospheric parameters
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
atmPressurekPa |
float |
x |
|
atmTemp |
float |
x |
|
atmDensity |
float |
x |
|
machNumber |
float |
x |
change_mode
moduleengine.change_mode ( name : string ) -> bool
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
name |
string |
ModuleFairing
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
ejection_force |
float |
R/W |
|
enabled |
bool |
R/W |
|
is_jettisoned |
bool |
R/O |
|
part |
R/O |
||
part_name |
string |
R/O |
Methods
jettison
modulefairing.jettison ( ) -> bool
Jettison the fairing
ModuleGenerator
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
enabled |
bool |
R/W |
|
generator_output |
float |
R/O |
|
is_always_active |
bool |
R/O |
|
part |
R/O |
||
part_name |
string |
R/O |
|
resource_setting |
R/O |
ModuleGimbal
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
enable_pitch |
bool |
R/W |
|
enable_roll |
bool |
R/W |
|
enable_yaw |
bool |
R/W |
|
enabled |
bool |
R/W |
|
limiter |
float |
R/W |
|
part |
R/O |
||
part_name |
string |
R/O |
|
pitch_yaw_roll |
R/W |
ModuleHeatshield
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
ablator_ratio |
float |
R/O |
|
is_ablating |
bool |
R/O |
|
is_ablator_exhausted |
bool |
R/O |
|
is_deployed |
bool |
R/O |
|
part |
R/O |
||
part_name |
string |
R/O |
|
required_resources |
R/O |
ModuleLaunchClamp
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
is_released |
bool |
R/O |
|
part |
R/O |
||
part_name |
string |
R/O |
Methods
release
modulelaunchclamp.release ( ) -> bool
ModuleLiftingSurface
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
angle_of_attack |
float |
R/O |
|
drag_force |
R/O |
||
drag_position |
R/O |
||
drag_scalar |
float |
R/O |
|
global_drag_force |
R/O |
||
global_drag_position |
R/O |
||
global_lift_force |
R/O |
||
global_lift_position |
R/O |
||
lift_drag_ratio |
float |
R/O |
|
lift_force |
R/O |
||
lift_position |
R/O |
||
lift_scalar |
float |
R/O |
|
part |
R/O |
||
part_name |
string |
R/O |
ModuleLight
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
blink_enabled |
bool |
R/W |
|
blink_rate |
float |
R/W |
|
has_resources_to_operate |
bool |
R/O |
|
light_color |
R/W |
||
light_enabled |
bool |
R/W |
|
part |
R/O |
||
part_name |
string |
R/O |
|
pitch |
float |
R/W |
|
required_resource |
R/O |
||
rotation |
float |
R/W |
ModuleParachute
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
armed |
bool |
R/W |
|
chute_safety |
R/O |
||
deploy_altitude |
float |
R/W |
|
deploy_mode |
R/W |
||
deploy_state |
R/O |
||
min_air_pressure |
float |
R/W |
|
part |
R/O |
||
part_name |
string |
R/O |
Methods
cut
moduleparachute.cut ( ) -> bool
deploy
moduleparachute.deploy ( ) -> bool
repack
moduleparachute.repack ( ) -> bool
ModuleRCS
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
enable_pitch |
bool |
R/W |
|
enable_roll |
bool |
R/W |
|
enable_x |
bool |
R/W |
|
enable_y |
bool |
R/W |
|
enable_yaw |
bool |
R/W |
|
enable_z |
bool |
R/W |
|
enabled |
bool |
R/W |
|
part |
R/O |
||
part_name |
string |
R/O |
|
propellant |
R/O |
||
thrust_limiter |
float |
R/W |
ModuleReactionWheel
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
has_resources_to_operate |
bool |
R/O |
|
part |
R/O |
||
part_name |
string |
R/O |
|
potential_torque |
R/O |
||
required_resources |
R/O |
||
toggle_torque |
bool |
R/W |
|
wheel_actuator_mode |
R/W |
||
wheel_authority |
float |
R/W |
|
wheel_state |
R/O |
ModuleScienceExperiment
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
experiments |
R/O |
||
is_deployed |
bool |
R/O |
|
part |
R/O |
||
part_name |
string |
R/O |
ModuleSolarPanel
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
base_flow_rate |
float |
R/O |
Base flow rate |
blocking_body |
Option<ksp::orbit::Body> |
R/O |
|
efficiency_multiplier |
float |
R/O |
|
energy_flow |
float |
R/O |
|
max_flow |
float |
R/O |
Maximum flow rate in current situation. Shorthand for |
part |
R/O |
||
part_name |
string |
R/O |
|
resource_setting |
R/O |
||
star_energy_scale |
float |
R/O |
ModuleTransmitter
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
active_transmission_completed |
float |
R/O |
|
active_transmission_size |
float |
R/O |
|
communication_range |
float |
R/O |
|
data_packet_size |
float |
R/O |
|
data_transmission_interval |
float |
R/O |
|
has_resources_to_operate |
bool |
R/O |
|
is_transmitting |
bool |
R/O |
|
part |
R/O |
||
part_name |
string |
R/O |
|
required_resources |
R/O |
ParachuteDeployMode
Parachute deploy mode
Methods
to_string
parachutedeploymode.to_string ( ) -> string
String representation of the number
ParachuteDeployModeConstants
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
IMMEDIATE |
R/O |
Parachute will deploy immediately regardless of conditions |
|
RISKY |
R/O |
Parachute might deploy in risky conditions (i.e. might tear off) |
|
SAFE |
R/O |
Parachute will deploy only under safe condition (i.e. will not tear of) |
Methods
from_string
parachutedeploymodeconstants.from_string ( value : string ) -> Option<ksp::vessel::ParachuteDeployMode>
Parse from string
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
value |
string |
Enum value to lookup |
ParachuteDeployState
Parachute deploy state
Methods
to_string
parachutedeploystate.to_string ( ) -> string
String representation of the number
ParachuteDeployStateConstants
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
ARMED |
R/O |
Parachute is armed (i.e. will deploy in the right condition) |
|
CUT |
R/O |
Parachute has been cut |
|
DEPLOYED |
R/O |
Parachute is fully deployed |
|
SEMIDEPLOYED |
R/O |
Parachute is partly deployed (i.e. not fully extended) |
|
STOWED |
R/O |
Parachute is stowed |
Methods
from_string
parachutedeploystateconstants.from_string ( value : string ) -> Option<ksp::vessel::ParachuteDeployState>
Parse from string
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
value |
string |
Enum value to lookup |
ParachuteSafeStates
Parachute safe states
Methods
to_string
parachutesafestates.to_string ( ) -> string
String representation of the number
ParachuteSafeStatesConstants
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
NONE |
R/O |
||
RISKY |
R/O |
Deployment of parachute is risky |
|
SAFE |
R/O |
Parachute can be safely deployed |
|
UNSAFE |
R/O |
Deployment of parachute is unsafe |
Methods
from_string
parachutesafestatesconstants.from_string ( value : string ) -> Option<ksp::vessel::ParachuteSafeStates>
Parse from string
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
value |
string |
Enum value to lookup |
Part
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
activation_stage |
int |
R/O |
|
air_intake |
Option<ksp::vessel::ModuleAirIntake> |
R/O |
|
command_module |
Option<ksp::vessel::ModuleCommand> |
R/O |
|
control_surface |
R/O |
||
decouple_stage |
int |
R/O |
|
decoupler |
Option<ksp::vessel::ModuleDecoupler> |
R/O |
|
deployable |
Option<ksp::vessel::ModuleDeployable> |
R/O |
|
docking_node |
Option<ksp::vessel::ModuleDockingNode> |
R/O |
|
drag |
Option<ksp::vessel::ModuleDrag> |
R/O |
|
dry_mass |
float |
R/O |
Dry mass of the part |
engine |
Option<ksp::vessel::ModuleEngine> |
R/O |
|
engine_module |
Option<ksp::vessel::ModuleEngine> |
R/O |
Deprecated: Use |
fairing |
Option<ksp::vessel::ModuleFairing> |
R/O |
|
generator |
Option<ksp::vessel::ModuleGenerator> |
R/O |
|
global_position |
R/O |
Get coordinate independent position of the part. |
|
global_rotation |
R/O |
||
green_mass |
float |
R/O |
Green mass (Kerbals) of the part |
heatshield |
Option<ksp::vessel::ModuleHeatshield> |
R/O |
|
id |
string |
R/O |
Unique part id. Note: this will be different for each vessel. |
is_cargo_bay |
bool |
R/O |
|
is_decoupler |
bool |
R/O |
|
is_deployable |
bool |
R/O |
|
is_drag |
bool |
R/O |
|
is_engine |
bool |
R/O |
|
is_fairing |
bool |
R/O |
|
is_generator |
bool |
R/O |
|
is_heatshield |
bool |
R/O |
|
is_launch_clamp |
bool |
R/O |
|
is_lifting_surface |
bool |
R/O |
|
is_light |
bool |
R/O |
|
is_parachute |
bool |
R/O |
|
is_rcs |
bool |
R/O |
|
is_reaction_wheel |
bool |
R/O |
|
is_science_experiment |
bool |
R/O |
|
is_solar_panel |
bool |
R/O |
|
is_transmitter |
bool |
R/O |
|
launch_clamp |
Option<ksp::vessel::ModuleLaunchClamp> |
R/O |
|
lifting_surface |
R/O |
||
light |
Option<ksp::vessel::ModuleLight> |
R/O |
|
max_temperature |
float |
R/O |
Maximum temperature of the part |
parachute |
Option<ksp::vessel::ModuleParachute> |
R/O |
|
part_category |
R/O |
||
part_description |
string |
R/O |
|
part_name |
string |
R/O |
|
part_title |
string |
R/O |
|
position |
R/O |
Get position of the part in celestial frame of the main body. |
|
rcs |
Option<ksp::vessel::ModuleRCS> |
R/O |
|
reaction_wheel |
Option<ksp::vessel::ModuleReactionWheel> |
R/O |
|
resource_mass |
float |
R/O |
Resource mass of the part |
resource_thermal_mass |
float |
R/O |
|
resources |
R/O |
||
science_experiment |
R/O |
||
solar_panel |
Option<ksp::vessel::ModuleSolarPanel> |
R/O |
|
splashed |
bool |
R/O |
Indicate if the part has splashed |
temperature |
float |
R/O |
Temperature of the part |
thermal_mass |
float |
R/O |
|
total_mass |
float |
R/O |
Total mass of the part |
transmitter |
Option<ksp::vessel::ModuleTransmitter> |
R/O |
|
vessel |
R/O |
||
wet_mass |
float |
R/O |
PartCategory
Vessel part category
Methods
to_string
partcategory.to_string ( ) -> string
String representation of the number
PartCategoryConstants
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
Aero |
R/O |
Aerodynamics |
|
Amenities |
R/O |
Amenities |
|
ColonyEssentials |
R/O |
ColonyEssentials |
|
Communication |
R/O |
Communication |
|
Control |
R/O |
Production |
|
Coupling |
R/O |
Coupling |
|
Electrical |
R/O |
Electrical |
|
Engine |
R/O |
Engine |
|
Favorites |
R/O |
Favorites |
|
FuelTank |
R/O |
FuelTank |
|
Ground |
R/O |
Ground |
|
Payload |
R/O |
Payload |
|
Pods |
R/O |
Pods |
|
Production |
R/O |
Production |
|
Science |
R/O |
Science |
|
Storage |
R/O |
Storage |
|
Structural |
R/O |
Production |
|
SubAssemblies |
R/O |
SubAssemblies |
|
Thermal |
R/O |
Thermal |
|
Utility |
R/O |
Utility |
|
none |
R/O |
No category |
Methods
from_string
partcategoryconstants.from_string ( value : string ) -> Option<ksp::vessel::PartCategory>
Parse from string
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
value |
string |
Enum value to lookup |
PilotInput
Contains the flight control values as desired by the pilot.
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
main_throttle |
float |
R/O |
Main throttle input by the pilot |
override_main_throttle |
Option<float> |
R/W |
Override main throttle. As long as this is defined (i.e. set to Some(value)) the pilot input will be overriden. Set to None to give control back to the pilot. |
override_pitch |
Option<float> |
R/W |
Override pitch input. As long as this is defined (i.e. set to Some(value)) the pilot input will be overriden. Set to None to give control back to the pilot. |
override_pitch_trim |
Option<float> |
R/W |
Override pitch trim. As long as this is defined (i.e. set to Some(value)) the pilot input will be overriden. Set to None to give control back to the pilot. |
override_roll |
Option<float> |
R/W |
Override roll input. As long as this is defined (i.e. set to Some(value)) the pilot input will be overriden. Set to None to give control back to the pilot. |
override_roll_trim |
Option<float> |
R/W |
Override roll trim. As long as this is defined (i.e. set to Some(value)) the pilot input will be overriden. Set to None to give control back to the pilot. |
override_translate_x |
Option<float> |
R/W |
Override RCS translation x input. As long as this is defined (i.e. set to Some(value)) the pilot input will be overriden. Set to None to give control back to the pilot. |
override_translate_y |
Option<float> |
R/W |
Override RCS translation y input. As long as this is defined (i.e. set to Some(value)) the pilot input will be overriden. Set to None to give control back to the pilot. |
override_translate_z |
Option<float> |
R/W |
Override RCS translation z input. As long as this is defined (i.e. set to Some(value)) the pilot input will be overriden. Set to None to give control back to the pilot. |
override_wheel_steer |
Option<float> |
R/W |
Override wheel steering. As long as this is defined (i.e. set to Some(value)) the pilot input will be overriden. Set to None to give control back to the pilot. |
override_wheel_steer_trim |
Option<float> |
R/W |
Override wheel steering trim. As long as this is defined (i.e. set to Some(value)) the pilot input will be overriden. Set to None to give control back to the pilot. |
override_wheel_throttle |
Option<float> |
R/W |
Override wheel throttle. As long as this is defined (i.e. set to Some(value)) the pilot input will be overriden. Set to None to give control back to the pilot. |
override_wheel_throttle_trim |
Option<float> |
R/W |
Override wheel throttle trim. As long as this is defined (i.e. set to Some(value)) the pilot input will be overriden. Set to None to give control back to the pilot. |
override_yaw |
Option<float> |
R/W |
Override yaw input. As long as this is defined (i.e. set to Some(value)) the pilot input will be overriden. Set to None to give control back to the pilot. |
override_yaw_trim |
Option<float> |
R/W |
Override yaw trim. As long as this is defined (i.e. set to Some(value)) the pilot input will be overriden. Set to None to give control back to the pilot. |
pitch |
float |
R/O |
Pitch input by the pilot |
pitch_trim |
float |
R/O |
Pitch trim as set by the pilot |
roll |
float |
R/O |
Roll input by the pilot |
roll_trim |
float |
R/O |
Roll trim as set by the pilot |
translate_x |
float |
R/O |
RCS translate x input by the pilot |
translate_y |
float |
R/O |
RCS translate y input by the pilot |
translate_z |
float |
R/O |
RCS translate z input by the pilot |
wheel_steer |
float |
R/O |
Wheel steering input by the pilot |
wheel_steer_trim |
float |
R/O |
Wheel trim as set by the pilot |
wheel_throttle |
float |
R/O |
Wheel throttle input by the pilot |
wheel_throttle_trim |
float |
R/O |
Wheel throttle trim as set by the pilot |
yaw |
float |
R/O |
Yaw input by the pilot |
yaw_trim |
float |
R/O |
Yaw trim as set by the pilot |
Methods
release
pilotinput.release ( ) -> Unit
resume
pilotinput.resume ( ) -> Unit
ReactionWheelState
State of a reaction wheel
Methods
to_string
reactionwheelstate.to_string ( ) -> string
String representation of the number
ReactionWheelStateConstants
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
Active |
R/O |
Wheel active |
|
Broken |
R/O |
Wheel broken |
|
Disabled |
R/O |
Wheel disabled |
Methods
from_string
reactionwheelstateconstants.from_string ( value : string ) -> Option<ksp::vessel::ReactionWheelState>
Parse from string
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
value |
string |
Enum value to lookup |
ScienceStorage
Represents the science storage / research inventory of a vessel.
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
active_transmitter |
Option<ksp::vessel::ModuleTransmitter> |
R/O |
|
is_active |
bool |
R/O |
|
research_reports |
R/O |
Methods
start_transmit_all
sciencestorage.start_transmit_all ( ) -> bool
StageDeltaV
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
active_engines |
R/O |
||
burn_time |
float |
R/O |
Estimated burn time of the stage. |
dry_mass |
float |
R/O |
Dry mass of the stage. |
end_mass |
float |
R/O |
End mass of the stage. |
engines |
R/O |
||
fuel_mass |
float |
R/O |
Mass of the fuel in the stage. |
parts |
R/O |
||
stage |
int |
R/O |
The stage number. |
start_mass |
float |
R/O |
Start mass of the stage. |
Methods
get_ISP
stagedeltav.get_ISP ( situation : ksp::vessel::DeltaVSituation ) -> float
Estimated ISP of the stage in a given situation
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
situation |
ksp::vessel::DeltaVSituation |
get_TWR
stagedeltav.get_TWR ( situation : ksp::vessel::DeltaVSituation ) -> float
Estimated TWR of the stage in a given situation
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
situation |
ksp::vessel::DeltaVSituation |
get_deltav
stagedeltav.get_deltav ( situation : ksp::vessel::DeltaVSituation ) -> float
Estimated delta-v of the stage in a given situation
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
situation |
ksp::vessel::DeltaVSituation |
get_thrust
stagedeltav.get_thrust ( situation : ksp::vessel::DeltaVSituation ) -> float
Estimated thrust of the stage in a given situation
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
situation |
ksp::vessel::DeltaVSituation |
Staging
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
count |
int |
R/O |
|
current |
int |
R/O |
|
ready |
bool |
R/O |
|
total_count |
int |
R/O |
Methods
next
staging.next ( ) -> bool
parts_in_stage
staging.parts_in_stage ( stage : int ) -> ksp::vessel::Part[]
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
stage |
int |
Targetable
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
body |
Option<ksp::orbit::Body> |
R/O |
Get the targeted celestial body, if target is a body. |
docking_node |
Option<ksp::vessel::ModuleDockingNode> |
R/O |
Get the targeted docking node, if target is a docking node. |
name |
string |
R/O |
Name of the vessel target. |
orbit |
R/O |
Orbit of the vessel target. |
|
vessel |
Option<ksp::vessel::Vessel> |
R/O |
Get the targeted vessel, if target is a vessel. |
Vessel
Represents an in-game vessel, which might be a rocket, plane, rover … or actually just a Kerbal in a spacesuite.
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
CoM |
R/O |
Position of the center of mass of the vessel. |
|
actions |
R/O |
Collection of methods to trigger action groups. |
|
air_intakes |
R/O |
Get a list of all air intake parts of the vessel. |
|
altitude_scenery |
float |
R/O |
|
altitude_sealevel |
float |
R/O |
Altitude from sea level. |
altitude_terrain |
float |
R/O |
Altitude from terrain. |
angular_velocity |
R/O |
Get the coordinate angular velocity in the celestial frame of its main body. |
|
atmosphere_density |
float |
R/O |
|
autopilot |
R/O |
Collection of methods to interact with the SAS system of the vessel. |
|
available_thrust |
float |
R/O |
Returns the maximum thrust of all engines in the current situation of the vessel. |
body_frame |
R/O |
The body/rotating reference frame of the vessel. |
|
celestial_frame |
R/O |
The celestial/non-rotating reference frame of the vessel. |
|
command_modules |
R/O |
Get a list of all command module parts of the vessel. |
|
connection_status |
R/O |
Current connection status to the comm-net. |
|
control_frame |
R/O |
Reference frame for the current control position. |
|
control_status |
R/O |
Current control status of the vessel. |
|
control_surfaces |
R/O |
Get a list of all control service parts of the vessel. |
|
current_control_part |
Option<ksp::vessel::Part> |
R/O |
Get the part (command module) that is currently controlling the vessel. |
delta_v |
R/O |
Collection of methods to obtain delta-v information of the vessel. |
|
docking_nodes |
R/O |
Get a list of all docking node parts of the vessel. |
|
dynamic_pressure_kpa |
float |
R/O |
Current dynamic atmospheric pressure in kPa. |
east |
R/O |
Get the horizon east vector in the celestial frame of the main body. |
|
engines |
R/O |
Get a list of all engine parts of the vessel. |
|
facing |
R/O |
Get the current facing direction of the vessel in the celestial frame of its main body. |
|
geo_coordinates |
R/O |
Get the current geo-coordinate of the vessel. |
|
global_angular_velocity |
R/O |
Get the coordinate system independent angular velocity of the vessel. |
|
global_center_of_mass |
R/O |
Coordinate independent position of the center of mass. |
|
global_east |
R/O |
Get the coordinate system independent horizon north vector. |
|
global_facing |
R/O |
Get the coordinate system independent facing direction of the vessel. |
|
global_moment_of_inertia |
R/O |
Get the coordinate system independent moment of inertial of the vessel |
|
global_north |
R/O |
Get the coordinate system independent horizon east vector. |
|
global_position |
R/O |
Coordinate independent position of the vessel. |
|
global_up |
R/O |
Get the coordinate system independent horizon up vector. |
|
global_velocity |
R/O |
Get the coordinate independent velocity of the vessel. |
|
has_launched |
bool |
R/O |
Check if the vessel has been launched. |
heading |
float |
R/O |
Heading of the vessel relative to current main body. |
horizon_frame |
R/O |
Reference frame for the horizon at the current position of the vessel. |
|
horizontal_surface_speed |
float |
R/O |
Horizontal surface speed relative to current main body. |
id |
string |
R/O |
Unique vessel id |
is_active |
bool |
R/O |
Check if the vessel is currently active. |
is_controllable |
bool |
R/O |
Check if the vessel is generally controllable, in the sense that it has a command module (i.e. it is not just space-debris). It still might not be possible to control the vessel due to a lack of crew, power of connection to the comm-net. Use |
is_flying |
bool |
R/O |
Check if the vessel is flyging. |
launch_time |
float |
R/O |
Universal time when vessel has been launched. |
mach_number |
float |
R/O |
Current mach number |
main_body |
R/O |
The main body of the current SOI the vessel is in. |
|
maneuver |
R/O |
Collection of methods to interact with the maneuver plan of the vessel. |
|
mass |
float |
R/O |
Total mass of the vessel. |
name |
string |
R/O |
The name of the vessel. |
north |
R/O |
Get the horizon north vector in the celestial frame of the main body. |
|
offset_ground |
float |
R/O |
|
orbit |
R/O |
Current orbit patch of the vessel. |
|
orbital_velocity |
R/O |
Orbital velocity of the vessel relative to the main body. This is equivalent of expressing the |
|
parts |
R/O |
Get a list of all vessel parts. |
|
pilot_input |
R/O |
Get the desired pilot input for this vessel. |
|
pitch_yaw_roll |
R/O |
Returns the pitch, yaw/heading and roll of the vessel relative to the horizon. |
|
position |
R/O |
Coordinate position of the vessel in the celestial frame of the main body. |
|
research_location |
Option<ksp::science::ResearchLocation> |
R/O |
Get the current research location of the vessel. |
science_storage |
Option<ksp::vessel::ScienceStorage> |
R/O |
Access the science storage/research inventory of the vessel. |
situation |
R/O |
Get the current situation of the vessel. |
|
solar_panels |
R/O |
Get a list of all solar panel parts of the vessel. |
|
sound_speed |
float |
R/O |
Current speed of sound. |
staging |
R/O |
Collection of methods to obtain information about stages and trigger staging. |
|
static_pressure_kpa |
float |
R/O |
Current static atmospheric pressure in kPa. |
surface_velocity |
R/O |
Surface velocity of the vessel relative to the main body. This is equivalent of expressing the |
|
target |
Option<ksp::vessel::Targetable> |
R/W |
Get the currently selected target of the vessel, if there is one. |
time_since_launch |
float |
R/O |
Number of seconds since launch. |
total_torque |
R/O |
Get the available torque of relative to its control frame. |
|
trajectory |
R/O |
Get the entire trajectory of the vessel containing all orbit patches. |
|
up |
R/O |
Get the horizon up vector in the celestial frame of the main body. |
|
vertical_speed |
float |
R/O |
Get the vertical speed of the vessel. |
vertical_surface_speed |
float |
R/O |
Vertical surface seed relative to current main body. |
Methods
global_heading_direction
vessel.global_heading_direction ( degreesFromNorth : float,
pitchAboveHorizon : float,
roll : float ) -> ksp::math::GlobalDirection
Calculate a coordinate system independent direction based on heading, pitch and roll relative to the horizon.
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
degreesFromNorth |
float |
||
pitchAboveHorizon |
float |
||
roll |
float |
heading_direction
vessel.heading_direction ( degreesFromNorth : float,
pitchAboveHorizon : float,
roll : float ) -> ksp::math::Direction
Calculate a direction in the celestial frame of the main body based on heading, pitch and roll relative to the horizon.
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
degreesFromNorth |
float |
||
pitchAboveHorizon |
float |
||
roll |
float |
make_active
vessel.make_active ( ) -> bool
Make this vessel the active vessel.
manage_rcs_translate
vessel.manage_rcs_translate ( translateProvider : sync fn(float) -> ksp::math::Vec3 ) -> ksp::control::RCSTranslateManager
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
translateProvider |
sync fn(float) -> ksp::math::Vec3 |
manage_steering
vessel.manage_steering ( pitchYawRollProvider : sync fn(float) -> ksp::math::Vec3 ) -> ksp::control::SteeringManager
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
pitchYawRollProvider |
sync fn(float) -> ksp::math::Vec3 |
manage_throttle
vessel.manage_throttle ( throttleProvider : sync fn(float) -> float ) -> ksp::control::ThrottleManager
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
throttleProvider |
sync fn(float) -> float |
manage_wheel_steering
vessel.manage_wheel_steering ( wheelSteeringProvider : sync fn(float) -> float ) -> ksp::control::WheelSteeringManager
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
wheelSteeringProvider |
sync fn(float) -> float |
manage_wheel_throttle
vessel.manage_wheel_throttle ( wheelThrottleProvider : sync fn(float) -> float ) -> ksp::control::WheelThrottleManager
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
wheelThrottleProvider |
sync fn(float) -> float |
override_input_pitch
vessel.override_input_pitch ( value : float ) -> Unit
Deprecated: Use corresponding field in pilot_input
.
One time override for the pitch control.
Note: This has to be refreshed regularly to have an impact.
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
value |
float |
override_input_roll
vessel.override_input_roll ( value : float ) -> Unit
Deprecated: Use corresponding field in pilot_input
.
One time override for the roll control.
Note: This has to be refreshed regularly to have an impact.
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
value |
float |
override_input_translate_x
vessel.override_input_translate_x ( value : float ) -> Unit
Deprecated: Use corresponding field in pilot_input
.
One time override for the translate x control.
Note: This has to be refreshed regularly to have an impact.
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
value |
float |
override_input_translate_y
vessel.override_input_translate_y ( value : float ) -> Unit
Deprecated: Use corresponding field in pilot_input
.
One time override for the translate y control.
Note: This has to be refreshed regularly to have an impact.
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
value |
float |
override_input_translate_z
vessel.override_input_translate_z ( value : float ) -> Unit
Deprecated: Use corresponding field in pilot_input
.
One time override for the translate z control.
Note: This has to be refreshed regularly to have an impact.
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
value |
float |
override_input_yaw
vessel.override_input_yaw ( value : float ) -> Unit
Deprecated: Use corresponding field in pilot_input
.
One time override for the yaw control.
Note: This has to be refreshed regularly to have an impact.
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
value |
float |
release_control
vessel.release_control ( ) -> Unit
Unhook all autopilots from the vessel.
set_rcs_translate
vessel.set_rcs_translate ( translate : ksp::math::Vec3 ) -> ksp::control::RCSTranslateManager
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
translate |
ksp::math::Vec3 |
set_steering
vessel.set_steering ( pitchYawRoll : ksp::math::Vec3 ) -> ksp::control::SteeringManager
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
pitchYawRoll |
ksp::math::Vec3 |
set_throttle
vessel.set_throttle ( throttle : float ) -> ksp::control::ThrottleManager
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
throttle |
float |
set_wheel_steering
vessel.set_wheel_steering ( wheelSteering : float ) -> ksp::control::WheelSteeringManager
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
wheelSteering |
float |
set_wheel_throttle
vessel.set_wheel_throttle ( wheelThrottle : float ) -> ksp::control::WheelThrottleManager
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
wheelThrottle |
float |
VesselControlState
Vessel control state
Methods
to_string
vesselcontrolstate.to_string ( ) -> string
String representation of the number
VesselControlStateConstants
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
FullControl |
R/O |
Vessel can be fully controlled. |
|
FullControlHibernation |
R/O |
Vessel is in hibernation with full control. |
|
NoCommNet |
R/O |
Vessel has no connection to mission control. |
|
NoControl |
R/O |
Vessel can not be controlled. |
Methods
from_string
vesselcontrolstateconstants.from_string ( value : string ) -> Option<ksp::vessel::VesselControlState>
Parse from string
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
value |
string |
Enum value to lookup |
VesselDeltaV
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
stages |
R/O |
Methods
stage
vesseldeltav.stage ( stage : int ) -> Option<ksp::vessel::StageDeltaV>
Get delta-v information for a specific stage
of the vessel, if existent.
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
stage |
int |
VesselSituation
Vessel situation
Methods
to_string
vesselsituation.to_string ( ) -> string
String representation of the number
VesselSituationConstants
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
Escaping |
R/O |
Vessel is on an escape trajectory. |
|
Flying |
R/O |
Vessel is flying. |
|
Landed |
R/O |
Vessel has landed. |
|
Orbiting |
R/O |
Vessel is orbiting its main body. |
|
PreLaunch |
R/O |
Vessel is in pre-launch situation. |
|
Splashed |
R/O |
Vessel has splashed in water. |
|
SubOrbital |
R/O |
Vessel is on a sub-orbital trajectory. |
|
Unknown |
R/O |
Vessel situation is unknown. |
Methods
from_string
vesselsituationconstants.from_string ( value : string ) -> Option<ksp::vessel::VesselSituation>
Parse from string
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
value |
string |
Enum value to lookup |
Constants
Name |
Type |
Description |
---|---|---|
ActuatorMode |
ksp::vessel::ActuatorModeConstants |
Actuator mode of a reaction wheel |
AutopilotMode |
ksp::vessel::AutopilotModeConstants |
Vessel autopilot (SAS) mode |
CommandControlState |
ksp::vessel::CommandControlStateConstants |
Current state of a command module |
ConnectionNodeStatus |
ksp::vessel::ConnectionNodeStatusConstants |
State of the comm-net connection |
DeltaVSituation |
ksp::vessel::DeltaVSituationConstants |
Vessel situation for delta-v calculation |
DeployableDeployState |
ksp::vessel::DeployableDeployStateConstants |
Current state of a deployable part (like CargoBays) |
DockingState |
ksp::vessel::DockingStateConstants |
Current state of a docking node |
EngineType |
ksp::vessel::EngineTypeConstants |
Engine types |
ParachuteDeployMode |
ksp::vessel::ParachuteDeployModeConstants |
Parachute deploy mode |
ParachuteDeployState |
ksp::vessel::ParachuteDeployStateConstants |
Parachute deploy state |
ParachuteSafeStates |
ksp::vessel::ParachuteSafeStatesConstants |
Parachute safe states |
PartCategory |
ksp::vessel::PartCategoryConstants |
Vessel part category |
ReactionWheelState |
ksp::vessel::ReactionWheelStateConstants |
State of a reaction wheel |
VesselControlState |
ksp::vessel::VesselControlStateConstants |
Vessel control state |
VesselSituation |
ksp::vessel::VesselSituationConstants |
Vessel situation |
Functions
active_vessel
pub sync fn active_vessel ( ) -> Result<ksp::vessel::Vessel>
Try to get the currently active vessel. Will result in an error if there is none.
get_all_owned_vessels
pub sync fn get_all_owned_vessels ( ) -> ksp::vessel::Vessel[]
Get all vessels owned by the current player.
get_vessels_in_range
pub sync fn get_vessels_in_range ( ) -> ksp::vessel::Vessel[]
Get all vessels in range of the current view.