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 
40  bool isXY_Yaw;
41 
52  Thruster(const std::string& name, const Vector3d& position, const Vector3d& offset,
53  const Vector3d& positiveForceDirection, bool isXY_Yaw, uint8_t idx);
54 
60  uint8_t getIdx() const;
61 
67  bool getIsXY_Yaw() const;
68 
74  Vector3d getOriginalPosition() const;
75 
81  Vector3d getPosition() const;
82 
88  Vector3d getPositiveForceDirection() const;
89 
95  void setOffset(const Vector3d& offset);
96 };
97 
98 #endif // CONTROLS_ALLOCATOR_CONFIG_THRUSTER_H
Represents a single thruster with its physical placement and force direction.
Definition: Thruster.h:11
Vector3d offset
Positional offset applied on top of position (e.g.
Definition: Thruster.h:27
Vector3d positiveForceDirection
Unit vector in the direction of positive thrust in the body frame.
Definition: Thruster.h:34
Vector3d position
Thruster position relative to the vehicle reference point in the body frame (m)
Definition: Thruster.h:24
bool isXY_Yaw
True if this thruster participates in the XY-Yaw QP allocation group; false if it belongs to the Z-Ro...
Definition: Thruster.h:40
Thruster(const std::string &name, const Vector3d &position, const Vector3d &offset, const Vector3d &positiveForceDirection, bool isXY_Yaw, uint8_t idx)
Constructs a thruster with all positional and directional parameters.
Definition: Thruster.cpp:3
void setOffset(const Vector3d &offset)
Updates the positional offset for this thruster.
Definition: Thruster.cpp:33
Vector3d getOriginalPosition() const
Returns the nominal position without the CG offset applied.
Definition: Thruster.cpp:25
Vector3d getPositiveForceDirection() const
Returns the unit vector of positive thrust direction.
Definition: Thruster.cpp:29
uint8_t getIdx() const
Returns the unique thruster index.
Definition: Thruster.cpp:13
Vector3d getPosition() const
Returns the effective position with the CG offset applied.
Definition: Thruster.cpp:21
bool getIsXY_Yaw() const
Returns true if this thruster belongs to the XY-Yaw allocation group.
Definition: Thruster.cpp:17
std::string name
Human-readable thruster name used in log messages.
Definition: Thruster.h:17
uint8_t idx
Unique zero-based index identifying this thruster within the layout.
Definition: Thruster.h:14