- This class simulates a thruster and contains functions for it.
- By setting the thruster valve open and close, thruster torque and force are generated.
- The thruster model includes the magnitude and directional errors in the ini file.
- According to the thruster output, users can set the thrust duty to the value between 0 and 1.
simple_thruster.cpp
,simple_thruster.hpp
- Definitions and declarations of the class
thruster.ini
- Parameters for a/multiple thruster(s)
plot_simple_thruster.py
: An example of a Python script to plot simple thruster output
- Set the parameters written in
thruster.ini
.- Users can set multiple thrusters.
- Create an instance by
SimpleThruster
function. - Add
calc_thrust
function toGenerateForce_b()
inSatComponents
class andcalc_torque
function toGenerateTorque_b()
inSatComponents
classcalc_torque
function requires a position of the spacecraft's mass center as an argument.
- When a thruster is open, set the duty to 1 by
set_duty(1)
function.- Users can set duty to the value between 0 and 1.
- Thrust magnitude is a scalar value of thrust.
- Thrust contains the magnitude and direction errors according to the ini file setting.
- Thrust magnitude calculation considers the duty of thruster. If the thruster valve is closed, the thrust magnitude is 0.
- input
- Thruster duty ratio
- Maximum thrust magnitude
thrust_magnitude_N
- Thrust direction
thruster_direction_b
- Thrust magnitude error
thrust_error_standard_deviation_N
- Thrust direction error
direction_error_standard_deviation_deg
- output
- Thrust magnitude and direction
Thrust magnitude can be calculated as follows:
where
Thrust direction can be calculated as follows:
where
-
$\boldsymbol{d}_{true}$ is the thrust vector without errors -
$n$ is the random angles to rotate the direction of error$\boldsymbol{d}_{err}$ - $\boldsymbol{d}{x}$ is the vector which is not equal to $\boldsymbol{d}{true}$
-
$n_d$ is the directional error -
$\boldsymbol{d}_{thrust}$ is the thrust vector with errors -
$\boldsymbol{q}(\boldsymbol{d},n)$ is the quaternion which has the rotation axis$\boldsymbol{d}$ and the rotation angle$n$ .
Thrust can be calculated as follows:
where
- Torque by thruster is calculated from the thrust vector and the vector between the center of mass of the spacecraft and thruster.
- input
- Thruster position
thruster_position_b_m
- Mass center of spacecraft
- Thrust magnitude and direction
- Thruster position
- output
- Torque
Torque by the thruster can be calculated as follows:
where
-
$\boldsymbol{T}_{thrust}$ is torque by the thruster -
$\boldsymbol{v}_{thruster}$ is thruster position -
$\boldsymbol{v}_{SC}$ is the mass center of spacecraft.
-
input
- Position
thruster_position_b_m
: [0m, 0m, 0.1m] - Direction
thruster_direction_b
: [0, 0, 1] - Thrust magnitude
thrust_magnitude_N
: 0.001N - Thrust magnitude error
thrust_error_standard_deviation_N
: 0.0N - Thrust direction error
direction_error_standard_deviation_deg
: 0.0deg - Simulation time: 100sec
- Position
-
result
-
Force Mean: [0,0,0.001] N
-
Force Std Dev: [0,0,0] N
-
Torque Mean: [0,0,0] Nm
-
Torque Std Dev: [0,0,0] Nm
-
- input
- Position
thruster_position_b_m
: [0, 0, 0.1] m - Direction
thruster_direction_b
: [0, 0, 1] - Thrust magnitude
thrust_magnitude_N
: 0.001N - Thrust magnitude error
thrust_error_standard_deviation_N
: 0.00001N - Thrust direction error
direction_error_standard_deviation_deg
: 0.0deg - Simulation time: 100sec
- Position
- result
-
Force Mean: [0,0,0.999611e-3] N
-
Force Std Dev: [0,0,1.09804e-5] N
-
Torque Mean: [0,0,0] Nm
-
Torque Std Dev: [0,0,0] Nm
-
- input
- Position
thruster_position_b_m
: [0, 0, 0.1] m - Direction
thruster_direction_b
: [0, 0, 1] - Thrust magnitude
thrust_magnitude_N
: 0.001N - Thrust magnitude error
thrust_error_standard_deviation_N
: 0.0N - Thrust direction error
direction_error_standard_deviation_deg
: 10.0deg - Simulation time: 100sec
- Position
- result
-
Force Mean: [-4.93e-6, -1.04e-5, 0.9834e-3] N
-
Force Std Dev: [1.0e-4, 9.79e-5, 1.216e-5] N
-
Torque Mean: [1.04e-6,-4.94e-7,0] Nm
-
Torque Std Dev: [1.29e-5, 1.26e-5, 0] Nm
-
- input
- Position
thruster_position_b_m
: [0, 0.1, 0] m - Direction
thruster_direction_b
: [0, 0, 1] - Thrust magnitude
thrust_magnitude_N
: 0.001N - Thrust magnitude error
thrust_error_standard_deviation_N
: 0.0N - Thrust direction error
direction_error_standard_deviation_deg
: 0.0deg - Simulation time: 100sec
- Position
- result
-
Force Mean: [0,0,0.001] N
-
Force Std Dev: [0,0,0] N
-
Torque Mean: [0.0001,0,0] Nm
-
Torque Std Dev: [0,0,0] Nm
-