controls  3.0.0
Thruster.h
Go to the documentation of this file.
1 #ifndef CONTROLS_ALLOCATOR_CONFIG_THRUSTER_H
2 #define CONTROLS_ALLOCATOR_CONFIG_THRUSTER_H
3 
4 #include <utils/Types.h>
5 
6 #include <string>
7 
11 class Thruster {
12 public:
14  uint8_t idx_;
15 
17  std::string name_;
18 
24  Vector3d position_;
25 
27  Vector3d offset_;
28 
35 
45  Thruster(const std::string& name, const Vector3d& position, const Vector3d& offset,
46  const Vector3d& positive_force_direction, uint8_t idx);
47 
53  Vector3d get_position() const;
54 
60  Vector3d get_positive_force_direction() const;
61 
67  void set_offset(const Vector3d& offset);
68 };
69 
70 #endif // CONTROLS_ALLOCATOR_CONFIG_THRUSTER_H
Represents a single thruster with its physical placement and force direction.
Definition: Thruster.h:11
Vector3d position_
Thruster position relative to the vehicle reference point in the body frame (m)
Definition: Thruster.h:24
Vector3d positive_force_direction_
Unit vector in the direction of positive thrust in the body frame.
Definition: Thruster.h:34
Vector3d offset_
Positional offset applied on top of position (e.g.
Definition: Thruster.h:27
Vector3d get_position() const
Returns the effective position with the CG offset applied.
Definition: Thruster.cpp:12
Vector3d get_positive_force_direction() const
Returns the unit vector of positive thrust direction.
Definition: Thruster.cpp:16
Thruster(const std::string &name, const Vector3d &position, const Vector3d &offset, const Vector3d &positive_force_direction, uint8_t idx)
Constructs a thruster with all positional and directional parameters.
Definition: Thruster.cpp:3
std::string name_
Human-readable thruster name used in log messages.
Definition: Thruster.h:17
void set_offset(const Vector3d &offset)
Updates the positional offset for this thruster.
Definition: Thruster.cpp:20
uint8_t idx_
Unique zero-based index identifying this thruster within the layout.
Definition: Thruster.h:14