Power#
- class KSA.Battery#
A battery, which stores electrical energy. Obtained from
KSA.Part.batteries.- part: KSA.Part#
The part the battery is in.
- Attribute:
Read-only, cannot be set
- Return type:
- stored_energy: number#
The energy stored in the battery, in joules.
- Attribute:
Read-only, cannot be set
- Return type:
number
- energy_capacity: number#
The energy the battery can store, in joules.
- Attribute:
Read-only, cannot be set
- Return type:
number
- class KSA.SolarPanel#
A solar panel, which turns sunlight into electrical power. Obtained from
KSA.Part.solar_panels.- part: KSA.Part#
The part the solar panel is in.
- Attribute:
Read-only, cannot be set
- Return type:
- active: boolean#
Whether the solar panel can produce power, because it is deployed or does not deploy.
- Attribute:
Read-only, cannot be set
- Return type:
boolean
- power: number#
The power the solar panel produces, in watts.
- Attribute:
Read-only, cannot be set
- Return type:
number
- sun_angle: number#
The angle between the solar panel’s face and the direction to the sun, in degrees. Zero when the panel faces the sun.
- Attribute:
Read-only, cannot be set
- Return type:
number
- occluded: boolean#
Whether a body blocks the sunlight to the solar panel.
- Attribute:
Read-only, cannot be set
- Return type:
boolean
- deployable: KSA.Deployable#
The deployable section that opens the solar panel, or
nilfor a panel that does not deploy.- Attribute:
Read-only, cannot be set
- Return type:
KSA.DeployableorTypes.none
- class KSA.Generator#
A generator, which produces electrical power. Obtained from
KSA.Part.generators.Note
A generator runs while its
KSA.Generator.engineis active, and produces power in proportion to the engine’s throttle.- part: KSA.Part#
The part the generator is in.
- Attribute:
Read-only, cannot be set
- Return type:
- engine: KSA.Engine#
The engine that drives the generator, or
nilif it has none.- Attribute:
Read-only, cannot be set
- Return type:
KSA.EngineorTypes.none
- active: boolean#
Whether the generator is producing power.
- Attribute:
Read-only, cannot be set
- Return type:
boolean
- power: number#
The power the generator produces, in watts.
- Attribute:
Read-only, cannot be set
- Return type:
number
- class KSA.PowerConsumer#
A power consumer, which uses electrical power, such as a light. Obtained from
KSA.Part.power_consumers.- part: KSA.Part#
The part the power consumer is in.
- Attribute:
Read-only, cannot be set
- Return type:
- active: boolean#
Whether the part is using power.
- Attribute:
Read-only, cannot be set
- Return type:
boolean
- power: number#
The power the part uses, in watts.
- Attribute:
Read-only, cannot be set
- Return type:
number
- class KSA.Light#
A light. Obtained from
KSA.Part.lights.Note
The vehicle’s lights switch on and off together, see
KSA.Control.lights. Cabin lights are always on.- active: boolean#
Whether the light is on.
- Attribute:
Read-only, cannot be set
- Return type:
boolean