Ignore:
Timestamp:
04/08/16 15:39:24 (8 years ago)
Author:
Bayard Gildas
Message:

formatting script + include reformatted

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/FlairFilter/TrajectoryGenerator1D.h

    r9 r13  
    1616#include <IODevice.h>
    1717
    18 namespace flair
    19 {
    20     namespace core
    21     {
    22         class cvmatrix;
    23     }
    24     namespace gui
    25     {
    26         class LayoutPosition;
    27     }
     18namespace flair {
     19namespace core {
     20class cvmatrix;
     21}
     22namespace gui {
     23class LayoutPosition;
     24}
    2825}
    2926
    3027class TrajectoryGenerator1D_impl;
    3128
    32 namespace flair
    33 {
    34 namespace filter
    35 {
    36     /*! \class TrajectoryGenerator1D
    37     *
    38     * \brief Class generating a trajectory in 1D
    39     *
    40     * This class generates position and velocity references, given
    41     * an absolute maximum velocity and an absolute acceleration. \n
    42     * When trajectory is started (see StartTraj()), position and velocity will increase
    43     * at the given acceleration. If the maximum velocity is reached,
    44     * velocity will not increase anymore. Then, velocity will decrease according
    45     * to the given acceleration until velocity is null and final position is reached. \n
    46     * Manual inputs can be introduced using SetPositionOffset() and SetSpeedOffset().
    47     *
    48     */
    49     class TrajectoryGenerator1D : public core::IODevice
    50     {
    51         public:
    52             /*!
    53             * \brief Constructor
    54             *
    55             * Construct a TrajectoryGenerator1D at given position. \n
    56             * The TrajectoryGenerator1D will automatically be child of position->getLayout() Layout. After calling this function,
    57             * position will be deleted as it is no longer usefull. \n
    58             *
    59             * \param position position to display settings
    60             * \param name name
    61             * \param unit unit of the position (for exemple m, deg, etc). Its only used for display on ground station.
    62             */
    63             TrajectoryGenerator1D(const gui::LayoutPosition* position,std::string name,std::string unit="");
     29namespace flair {
     30namespace filter {
     31/*! \class TrajectoryGenerator1D
     32*
     33* \brief Class generating a trajectory in 1D
     34*
     35* This class generates position and velocity references, given
     36* an absolute maximum velocity and an absolute acceleration. \n
     37* When trajectory is started (see StartTraj()), position and velocity will
     38*increase
     39* at the given acceleration. If the maximum velocity is reached,
     40* velocity will not increase anymore. Then, velocity will decrease according
     41* to the given acceleration until velocity is null and final position is
     42*reached. \n
     43* Manual inputs can be introduced using SetPositionOffset() and
     44*SetSpeedOffset().
     45*
     46*/
     47class TrajectoryGenerator1D : public core::IODevice {
     48public:
     49  /*!
     50  * \brief Constructor
     51  *
     52  * Construct a TrajectoryGenerator1D at given position. \n
     53  * The TrajectoryGenerator1D will automatically be child of
     54  *position->getLayout() Layout. After calling this function,
     55  * position will be deleted as it is no longer usefull. \n
     56  *
     57  * \param position position to display settings
     58  * \param name name
     59  * \param unit unit of the position (for exemple m, deg, etc). Its only used
     60  *for display on ground station.
     61  */
     62  TrajectoryGenerator1D(const gui::LayoutPosition *position, std::string name,
     63                        std::string unit = "");
    6464
    65             /*!
    66             * \brief Destructor
    67             *
    68             */
    69             ~TrajectoryGenerator1D();
     65  /*!
     66  * \brief Destructor
     67  *
     68  */
     69  ~TrajectoryGenerator1D();
    7070
    71             /*!
    72             * \brief Start trajectory
    73             *
    74             * \param start_pos start position
    75             * \param end_pos end position
    76             */
    77             void StartTraj(float start_pos,float end_pos);
     71  /*!
     72  * \brief Start trajectory
     73  *
     74  * \param start_pos start position
     75  * \param end_pos end position
     76  */
     77  void StartTraj(float start_pos, float end_pos);
    7878
    79             /*!
    80             * \brief Stop trajectory
    81             *
    82             */
    83             void StopTraj(void);
     79  /*!
     80  * \brief Stop trajectory
     81  *
     82  */
     83  void StopTraj(void);
    8484
    85             /*!
    86             * \brief Reset
    87             *
    88             * Reset all outputs to 0. This can be done only when IsRunning()==false.
    89             *
    90             */
    91             void Reset(void);
     85  /*!
     86  * \brief Reset
     87  *
     88  * Reset all outputs to 0. This can be done only when IsRunning()==false.
     89  *
     90  */
     91  void Reset(void);
    9292
    93             /*!
    94             * \brief Is trajectory running?
    95             *
    96             * \return true if trajectory is running
    97             */
    98             bool IsRunning(void) const;
     93  /*!
     94  * \brief Is trajectory running?
     95  *
     96  * \return true if trajectory is running
     97  */
     98  bool IsRunning(void) const;
    9999
    100             /*!
    101             * \brief Set position offset
    102             *
    103             * \param value position offset
    104             */
    105             void SetPositionOffset(float value);
     100  /*!
     101  * \brief Set position offset
     102  *
     103  * \param value position offset
     104  */
     105  void SetPositionOffset(float value);
    106106
    107             /*!
    108             * \brief Set speed offset
    109             *
    110             * \param value speed offset
    111             */
    112             void SetSpeedOffset(float value);
     107  /*!
     108  * \brief Set speed offset
     109  *
     110  * \param value speed offset
     111  */
     112  void SetSpeedOffset(float value);
    113113
    114             /*!
    115             * \brief Update using provided datas
    116             *
    117             * Uses values specified by StartTraj(),
    118             * SetPositionOffset() and SetSpeedOffset().
    119             *
    120             * \param time time of the update
    121             */
    122             void Update(core::Time time);
     114  /*!
     115  * \brief Update using provided datas
     116  *
     117  * Uses values specified by StartTraj(),
     118  * SetPositionOffset() and SetSpeedOffset().
     119  *
     120  * \param time time of the update
     121  */
     122  void Update(core::Time time);
    123123
    124             /*!
    125             * \brief Position
    126             *
    127             */
    128             float Position(void) const;
     124  /*!
     125  * \brief Position
     126  *
     127  */
     128  float Position(void) const;
    129129
    130             /*!
    131             * \brief Speed
    132             *
    133             */
    134             float Speed(void) const;
     130  /*!
     131  * \brief Speed
     132  *
     133  */
     134  float Speed(void) const;
    135135
    136             /*!
    137             * \brief Output matrix
    138             *
    139             * \return matrix
    140             */
    141             core::cvmatrix *Matrix(void) const;
     136  /*!
     137  * \brief Output matrix
     138  *
     139  * \return matrix
     140  */
     141  core::cvmatrix *Matrix(void) const;
    142142
    143         private:
    144             /*!
    145             * \brief Update using provided datas
    146             *
    147             * Reimplemented from IODevice. Nothing to do in this IODevice.
    148             *
    149             * \param data data from the parent to process
    150             */
    151             void UpdateFrom(const core::io_data *data){};
     143private:
     144  /*!
     145  * \brief Update using provided datas
     146  *
     147  * Reimplemented from IODevice. Nothing to do in this IODevice.
     148  *
     149  * \param data data from the parent to process
     150  */
     151  void UpdateFrom(const core::io_data *data){};
    152152
    153             TrajectoryGenerator1D_impl* pimpl_;
    154     };
     153  TrajectoryGenerator1D_impl *pimpl_;
     154};
    155155} // end namespace filter
    156156} // end namespace flair
Note: See TracChangeset for help on using the changeset viewer.