controls  3.0.0
Public Member Functions | Public Attributes | List of all members
Thruster Class Reference

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...
 

Detailed Description

Represents a single thruster with its physical placement and force direction.

Constructor & Destructor Documentation

◆ Thruster()

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.

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

Member Function Documentation

◆ getIdx()

uint8_t Thruster::getIdx ( void  ) const

Returns the unique thruster index.

Returns
Zero-based thruster index

◆ getIsXY_Yaw()

bool Thruster::getIsXY_Yaw ( void  ) const

Returns true if this thruster belongs to the XY-Yaw allocation group.

Returns
True for XY-Yaw group, false for Z-Roll-Pitch group

◆ getOriginalPosition()

Vector3d Thruster::getOriginalPosition ( void  ) const

Returns the nominal position without the CG offset applied.

Returns
Position vector in the body frame (m)

◆ getPosition()

Vector3d Thruster::getPosition ( void  ) const

Returns the effective position with the CG offset applied.

Returns
position + offset in the body frame (m)

◆ getPositiveForceDirection()

Vector3d Thruster::getPositiveForceDirection ( void  ) const

Returns the unit vector of positive thrust direction.

Returns
Positive force direction in the body frame

◆ setOffset()

void Thruster::setOffset ( const Vector3d &  offset)

Updates the positional offset for this thruster.

Parameters
offset[in] New offset vector in the body frame (m)

Member Data Documentation

◆ idx

uint8_t Thruster::idx

Unique zero-based index identifying this thruster within the layout.

◆ isXY_Yaw

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.

◆ name

std::string Thruster::name

Human-readable thruster name used in log messages.

◆ offset

Vector3d Thruster::offset

Positional offset applied on top of position (e.g.

CG offset correction)

◆ position

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.

◆ positiveForceDirection

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.


The documentation for this class was generated from the following files: