@@ -184,7 +184,7 @@ def __init__(
184184 Parameters
185185 ----------
186186 name : str, optional
187- Name of the dual-axis thrust vector actuator. Default is "Thrust Vector Control".
187+ Name of the dual-axis thrust vector actuator. Default is "Thrust Vector Control (X/Y)-axis ".
188188 demand_rate : int, optional
189189 Demand rate of the dual-axis thrust vector actuator in Hz. Default is 100 Hz.
190190 None indicates a continuous-time actuator.
@@ -201,19 +201,20 @@ def __init__(
201201 exceeds the maximum value. Default is True.
202202 initial_gimbal_angle : float, optional
203203 Initial gimbal angle in deg. Default is 0.0 (no gimbal).
204- roll_torque_time_constant : float, optional
205- Time constant for the roll torque actuator dynamics (first-order IIR
204+ gimbal_time_constant : float, optional
205+ Time constant for the gimbal actuator dynamics (first-order IIR
206206 filter) in seconds. If None, no actuator dynamics are applied.
207- Must be non-negative. Default is None. demand_rate must be specified if roll_torque_time_constant is not None.
207+ Must be non-negative. Default is None. demand_rate must be specified if gimbal_time_constant is not None.
208208
209209
210210 Returns
211211 -------
212212 None
213213 """
214+ self .name = name
214215
215216 self .x = ThrustVectorActuator (
216- name = name + " X-axis" ,
217+ name = self . name + " X-axis" ,
217218 demand_rate = demand_rate ,
218219 max_gimbal_angle = max_gimbal_angle ,
219220 gimbal_rate_limit = gimbal_rate_limit ,
@@ -222,7 +223,7 @@ def __init__(
222223 gimbal_time_constant = gimbal_time_constant ,
223224 )
224225 self .y = ThrustVectorActuator (
225- name = name + " Y-axis" ,
226+ name = self . name + " Y-axis" ,
226227 demand_rate = demand_rate ,
227228 max_gimbal_angle = max_gimbal_angle ,
228229 gimbal_rate_limit = gimbal_rate_limit ,
@@ -233,7 +234,7 @@ def __init__(
233234
234235 @property
235236 def gimbal_angle_x (self ):
236- """Returns the current gimbal angle around the y -axis (yaw )."""
237+ """Returns the current gimbal angle around the x -axis (pitch )."""
237238 return self .x .gimbal_angle
238239
239240 @gimbal_angle_x .setter
@@ -267,3 +268,45 @@ def gimbal_angles(self, value):
267268 """
268269 self .gimbal_angle_x = value [0 ]
269270 self .gimbal_angle_y = value [1 ]
271+
272+ def info (self ):
273+ """Prints summarized information of the thrust vector actuator.
274+
275+ Returns
276+ -------
277+ None
278+ """
279+ self .x .info ()
280+ self .y .info ()
281+
282+ def all_info (self ):
283+ """Prints all information of the thrust vector actuator.
284+
285+ Returns
286+ -------
287+ None
288+ """
289+ self .info ()
290+
291+ def to_dict (self , ** kwargs ): # pylint: disable=unused-argument
292+ return {
293+ "name" : self .name ,
294+ "demand_rate" : self .x .demand_rate ,
295+ "max_gimbal_angle" : self .x .actuator_range [1 ],
296+ "gimbal_rate_limit" : self .x .actuator_rate_limit ,
297+ "clamp" : self .x .clamp ,
298+ "initial_gimbal_angle" : self .x .actuator_initial_output ,
299+ "gimbal_time_constant" : self .x .actuator_time_constant ,
300+ }
301+
302+ @classmethod
303+ def from_dict (cls , data ):
304+ return cls (
305+ name = data .get ("name" ),
306+ demand_rate = data .get ("demand_rate" ),
307+ max_gimbal_angle = data .get ("max_gimbal_angle" ),
308+ gimbal_rate_limit = data .get ("gimbal_rate_limit" ),
309+ clamp = data .get ("clamp" ),
310+ initial_gimbal_angle = data .get ("initial_gimbal_angle" ),
311+ gimbal_time_constant = data .get ("gimbal_time_constant" ),
312+ )
0 commit comments