convert_virtual_u_to_rocket_u#
Class method.
- do_dpc.environments.rocket_env.rocket_utils.convert_virtual_u_to_rocket_u(u_virtual)[source]#
Converts virtual control inputs into rocket control inputs.
- The transformation follows:
Fe = sqrt(Fx^2 + Fy^2) phi = arctan(Fy/Fx)
- Parameters:
u_virtual (np.ndarray) – Virtual actuator inputs, a 3-element array [Fx, Fy, Fs].
- Returns:
- Rocket control inputs, a 3-element array [Fe, Fs, phi_normalized], where:
Fe is the magnitude of the thrust vector.
Fs is the side thrust value.
phi_normalized is the normalized nozzle angle.
- Return type:
np.ndarray
Note
If Fx is too small (near zero), phi is safely calculated using arctan2.
phi is normalized using the maximum nozzle angle from RocketEnvCfgFacade.