|
controls
3.0.0
|
Represents a single thruster with its physical placement and force direction. More...
#include <Thruster.h>
Public Member Functions | |
| 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. More... | |
| uint8_t | getIdx () const |
| Returns the unique thruster index. More... | |
| bool | getIsXY_Yaw () const |
| Returns true if this thruster belongs to the XY-Yaw allocation group. More... | |
| Vector3d | getOriginalPosition () const |
| Returns the nominal position without the CG offset applied. More... | |
| Vector3d | getPosition () const |
| Returns the effective position with the CG offset applied. More... | |
| Vector3d | getPositiveForceDirection () const |
| Returns the unit vector of positive thrust direction. More... | |
| void | setOffset (const Vector3d &offset) |
| Updates the positional offset for this thruster. More... | |
Public Attributes | |
| uint8_t | idx |
| Unique zero-based index identifying this thruster within the layout. More... | |
| std::string | name |
| Human-readable thruster name used in log messages. More... | |
| Vector3d | position |
| Thruster position relative to the vehicle reference point in the body frame (m) More... | |
| Vector3d | offset |
| Positional offset applied on top of position (e.g. More... | |
| Vector3d | positiveForceDirection |
| Unit vector in the direction of positive thrust in the body frame. More... | |
| bool | isXY_Yaw |
| True if this thruster participates in the XY-Yaw QP allocation group; false if it belongs to the Z-Roll-Pitch group. More... | |
Represents a single thruster with its physical placement and force direction.
| Thruster::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.
| name | [in] Human-readable identifier |
| position | [in] Position relative to vehicle reference point (m) |
| offset | [in] Additional positional offset (m) |
| positiveForceDirection | [in] Unit vector of positive thrust direction |
| isXY_Yaw | [in] True if this thruster is in the XY-Yaw allocation group |
| idx | [in] Unique zero-based thruster index |
| uint8_t Thruster::getIdx | ( | void | ) | const |
Returns the unique thruster index.
| bool Thruster::getIsXY_Yaw | ( | void | ) | const |
Returns true if this thruster belongs to the XY-Yaw allocation group.
| Vector3d Thruster::getOriginalPosition | ( | void | ) | const |
Returns the nominal position without the CG offset applied.
| Vector3d Thruster::getPosition | ( | void | ) | const |
Returns the effective position with the CG offset applied.
| Vector3d Thruster::getPositiveForceDirection | ( | void | ) | const |
Returns the unit vector of positive thrust direction.
| void Thruster::setOffset | ( | const Vector3d & | offset | ) |
Updates the positional offset for this thruster.
| offset | [in] New offset vector in the body frame (m) |
| uint8_t Thruster::idx |
Unique zero-based index identifying this thruster within the layout.
| bool Thruster::isXY_Yaw |
True if this thruster participates in the XY-Yaw QP allocation group; false if it belongs to the Z-Roll-Pitch group.
| std::string Thruster::name |
Human-readable thruster name used in log messages.
| Vector3d Thruster::offset |
Positional offset applied on top of position (e.g.
CG offset correction)
| Vector3d Thruster::position |
Thruster position relative to the vehicle reference point in the body frame (m)
The reference point is typically the centre of mass or buoyancy.
| Vector3d Thruster::positiveForceDirection |
Unit vector in the direction of positive thrust in the body frame.
For example, (1, 0, 0) means the thruster pushes in the +X direction.