LCOV - code coverage report
Current view: top level - allocator/config - ThrusterLayout.h Hit Total Coverage
Test: doc-coverage.info Lines: 4 4 100.0 %
Date: 2026-06-17 17:03:54

          Line data    Source code
       1             : #ifndef CONTROLS_ALLOCATOR_CONFIG_THRUSTER_LAYOUT_H
       2             : #define CONTROLS_ALLOCATOR_CONFIG_THRUSTER_LAYOUT_H
       3             : 
       4             : #include <allocator/config/Thruster.h>
       5             : 
       6             : #include <vector>
       7             : 
       8             : /**
       9             :  * @brief Manages a collection of Thruster objects and builds the allocation matrix
      10             :  */
      11           1 : class ThrusterLayout {
      12             : public:
      13             :     /** @brief All thrusters registered in this layout */
      14             :     std::vector<Thruster> thrusters_;
      15             : 
      16             :     /**
      17             :      * @brief Constructs an empty layout
      18             :      */
      19           1 :     ThrusterLayout();
      20             : 
      21             :     /**
      22             :      * @brief Adds a thruster to the layout
      23             :      *
      24             :      * @param thruster [in] Thruster to append
      25             :      */
      26           1 :     void add_thruster(const Thruster& thruster);
      27             : 
      28             :     /**
      29             :      * @brief Builds the 6xN force-allocation matrix from the current thruster set
      30             :      *
      31             :      * Each column i corresponds to the thruster with idx == i.  The upper three
      32             :      * rows are the normalised thrust direction; the lower three rows are the
      33             :      * cross-product moment arm (position × direction).
      34             :      *
      35             :      * @return 6xN allocation matrix T where T * f_thrusters = τ_body
      36             :      */
      37           1 :     MatrixXd build_allocation_matrix() const;
      38             : };
      39             : 
      40             : #endif  // CONTROLS_ALLOCATOR_CONFIG_THRUSTER_LAYOUT_H

Generated by: LCOV version 1.14