ksp::control
Types
MovingAverage
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
last_sample_time |
float |
R/W |
|
mean |
float |
R/W |
|
mean_diff |
float |
R/W |
|
sample_limit |
int |
R/W |
|
value_count |
int |
R/O |
Methods
reset
movingaverage.reset ( ) -> Unit
update
movingaverage.update ( sampleTime : float,
value : float ) -> float
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
sampleTime |
float |
||
value |
float |
update_delta
movingaverage.update_delta ( deltaT : float,
input : float ) -> float
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
deltaT |
float |
||
input |
float |
PIDLoop
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
change_rate |
float |
R/W |
|
d_term |
float |
R/W |
|
error |
float |
R/W |
|
error_sum |
float |
R/W |
|
extra_unwind |
bool |
R/W |
|
i_term |
float |
R/W |
|
input |
float |
R/W |
|
kd |
float |
R/W |
|
ki |
float |
R/W |
|
kp |
float |
R/W |
|
last_sample_time |
float |
R/W |
|
max_output |
float |
R/W |
|
min_output |
float |
R/W |
|
output |
float |
R/W |
|
p_term |
float |
R/W |
|
setpoint |
float |
R/W |
Methods
reset_i
pidloop.reset_i ( ) -> Unit
Reset the integral part of the PID loop
update
pidloop.update ( sampleTime : float,
input : float ) -> float
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
sampleTime |
float |
||
input |
float |
update_delta
pidloop.update_delta ( deltaT : float,
input : float ) -> float
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
deltaT |
float |
||
input |
float |
RCSTranslateManager
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
translate |
R/W |
Methods
release
rcstranslatemanager.release ( ) -> Unit
resume
rcstranslatemanager.resume ( ) -> Unit
set_translate_provider
rcstranslatemanager.set_translate_provider ( newTranslateProvider : sync fn(float) -> ksp::math::Vec3 ) -> Unit
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
newTranslateProvider |
sync fn(float) -> ksp::math::Vec3 |
SteeringManager
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
pitch_yaw_roll |
R/W |
Methods
release
steeringmanager.release ( ) -> Unit
resume
steeringmanager.resume ( ) -> Unit
set_pitch_yaw_roll_provider
steeringmanager.set_pitch_yaw_roll_provider ( newPitchYawRollProvider : sync fn(float) -> ksp::math::Vec3 ) -> Unit
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
newPitchYawRollProvider |
sync fn(float) -> ksp::math::Vec3 |
ThrottleManager
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
throttle |
float |
R/W |
Methods
release
throttlemanager.release ( ) -> Unit
resume
throttlemanager.resume ( ) -> Unit
set_throttle_provider
throttlemanager.set_throttle_provider ( newThrottleProvider : sync fn(float) -> float ) -> Unit
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
newThrottleProvider |
sync fn(float) -> float |
TorquePI
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
I |
float |
R/W |
|
loop |
R/W |
||
tr |
float |
R/W |
|
ts |
float |
R/W |
Methods
reset_i
torquepi.reset_i ( ) -> Unit
Reset the integral part of the PID loop
update
torquepi.update ( sampleTime : float,
input : float,
setpoint : float,
momentOfInertia : float,
maxOutput : float ) -> float
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
sampleTime |
float |
||
input |
float |
||
setpoint |
float |
||
momentOfInertia |
float |
||
maxOutput |
float |
update_delta
torquepi.update_delta ( deltaT : float,
input : float,
setpoint : float,
momentOfInertia : float,
maxOutput : float ) -> float
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
deltaT |
float |
||
input |
float |
||
setpoint |
float |
||
momentOfInertia |
float |
||
maxOutput |
float |
WheelSteeringManager
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
wheel_steer |
float |
R/W |
Methods
release
wheelsteeringmanager.release ( ) -> Unit
resume
wheelsteeringmanager.resume ( ) -> Unit
set_wheel_steer_provider
wheelsteeringmanager.set_wheel_steer_provider ( newWheelSteerProvider : sync fn(float) -> float ) -> Unit
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
newWheelSteerProvider |
sync fn(float) -> float |
WheelThrottleManager
Fields
Name |
Type |
Read-only |
Description |
---|---|---|---|
wheel_throttle |
float |
R/W |
Methods
release
wheelthrottlemanager.release ( ) -> Unit
resume
wheelthrottlemanager.resume ( ) -> Unit
set_wheel_throttle_provider
wheelthrottlemanager.set_wheel_throttle_provider ( newWheelThrottleProvider : sync fn(float) -> float ) -> Unit
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
newWheelThrottleProvider |
sync fn(float) -> float |
Functions
moving_average
pub sync fn moving_average ( sampleLimit : int ) -> ksp::control::MovingAverage
Create a new MovingAverage with given sample limit.
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
sampleLimit |
int |
pid_loop
pub sync fn pid_loop ( kp : float,
ki : float,
kd : float,
minOutput : float,
maxOutput : float,
extraUnwind : bool ) -> ksp::control::PIDLoop
Create a new PIDLoop with given parameters.
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
kp |
float |
||
ki |
float |
||
kd |
float |
||
minOutput |
float |
||
maxOutput |
float |
||
extraUnwind |
bool |
x |
torque_pi
pub sync fn torque_pi ( ts : float ) -> ksp::control::TorquePI
Create a new TorquePI with given parameters.
Parameters
Name |
Type |
Optional |
Description |
---|---|---|---|
ts |
float |