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 &positive_force_direction, uint8_t idx)
 Constructs a thruster with all positional and directional parameters. More...
 
Vector3d get_position () const
 Returns the effective position with the CG offset applied. More...
 
Vector3d get_positive_force_direction () const
 Returns the unit vector of positive thrust direction. More...
 
void set_offset (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 positive_force_direction_
 Unit vector in the direction of positive thrust in the body frame. 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 &  positive_force_direction,
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)
positive_force_direction[in] Unit vector of positive thrust direction
idx[in] Unique zero-based thruster index

Member Function Documentation

◆ get_position()

Vector3d Thruster::get_position ( void  ) const

Returns the effective position with the CG offset applied.

Returns
position + offset in the body frame (m)

◆ get_positive_force_direction()

Vector3d Thruster::get_positive_force_direction ( void  ) const

Returns the unit vector of positive thrust direction.

Returns
Positive force direction in the body frame

◆ set_offset()

void Thruster::set_offset ( 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.

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

◆ positive_force_direction_

Vector3d Thruster::positive_force_direction_

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: