Changeset 167 in flair-src for trunk/lib/FlairFilter


Ignore:
Timestamp:
Apr 12, 2017, 1:59:38 PM (5 years ago)
Author:
Sanahuja Guillaume
Message:

modifs pour template vectors

Location:
trunk/lib/FlairFilter/src
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairFilter/src/Ahrs.h

    r51 r167  
    1919namespace flair {
    2020  namespace core {
    21     class Euler;
    22     class Vector3D;
    23     class ImuData;
    24     class Quaternion;
    2521    class AhrsData;
    2622  }
  • trunk/lib/FlairFilter/src/AhrsComplementaryFilter.cpp

    r157 r167  
    6464    AhrsData* ahrsData;
    6565    GetDatas(&ahrsData);
    66     Vector3D rawAcc,rawMag,rawGyr;
     66    Vector3Df rawAcc,rawMag,rawGyr;
    6767    input->GetRawAccMagAndGyr(rawAcc,rawMag,rawGyr);
    6868
     
    7070    previous_time=data->DataTime();
    7171
    72     Vector3D aBar,aHat,aTilde;
    73     Vector3D mBar,mHat,mTilde;
    74     Vector3D alpha,dBHat,omegaHat;
     72    Vector3Df aBar,aHat,aTilde;
     73    Vector3Df mBar,mHat,mTilde;
     74    Vector3Df alpha,dBHat,omegaHat;
    7575    Quaternion dQHat;
    7676
  • trunk/lib/FlairFilter/src/AhrsComplementaryFilter.h

    r24 r167  
    6666            bool isInit;
    6767            core::Quaternion QHat;
    68             core::Vector3D BHat;
     68            core::Vector3Df BHat;
    6969            gui::DoubleSpinBox *ka[3];
    7070            gui::DoubleSpinBox *kb[3];
  • trunk/lib/FlairFilter/src/AhrsKalman_impl.cpp

    r18 r167  
    8686    ImuData *input=(ImuData*)data;
    8787    float delta_t;
    88     Vector3D rawAcc,rawMag,rawGyr;
     88    Vector3Df rawAcc,rawMag,rawGyr;
    8989
    9090    input->GetRawAccMagAndGyr(rawAcc,rawMag,rawGyr);
     
    115115
    116116        ahrsData->SetQuaternionAndAngularRates(euler.ToQuaternion(),
    117                                                rawGyr-Vector3D(ars_roll.x_bias,ars_pitch.x_bias,0));
     117                                               rawGyr-Vector3Df(ars_roll.x_bias,ars_pitch.x_bias,0));
    118118    } else {
    119119        is_init=true;
  • trunk/lib/FlairFilter/src/Gx3_25_ahrs.cpp

    r157 r167  
    4444
    4545  Quaternion quaternion;
    46   Vector3D filteredAngRates;
     46  Vector3Df filteredAngRates;
    4747  input->GetQuaternionAndAngularRates(quaternion, filteredAngRates);
    4848  GetImu()->GetOneAxisRotation()->ComputeRotation(quaternion);
  • trunk/lib/FlairFilter/src/JoyReference_impl.cpp

    r148 r167  
    168168  input->GetMutex();
    169169
    170   Vector3D theta_xy(
     170  Vector3Df theta_xy(
    171171      -Euler::ToRadian(input->ValueNoMutex(0, 0) * deb_roll->Value()),
    172172      -Euler::ToRadian(input->ValueNoMutex(1, 0) * deb_pitch->Value()), 0);
    173   Vector3D e_bar = theta_xy;
     173  Vector3Df e_bar = theta_xy;
    174174  e_bar.Normalize();
    175175  Quaternion q_xy(cos(theta_xy.GetNorm() / 2.0f),
     
    192192  input->ReleaseMutex();
    193193
    194   ahrsData->SetQuaternionAndAngularRates(q_ref, Vector3D(0, 0, wz_ref));
     194  ahrsData->SetQuaternionAndAngularRates(q_ref, Vector3Df(0, 0, wz_ref));
    195195
    196196  // ouput quaternion for control law
  • trunk/lib/FlairFilter/src/SimuAhrs.cpp

    r158 r167  
    4242
    4343  Quaternion quaternion;
    44   Vector3D filteredAngRates;
     44  Vector3Df filteredAngRates;
    4545  input->GetQuaternionAndAngularRates(quaternion, filteredAngRates);
    4646  output->SetQuaternionAndAngularRates(quaternion, filteredAngRates);
  • trunk/lib/FlairFilter/src/TrajectoryGenerator2DCircle.cpp

    r157 r167  
    4848}
    4949
    50 void TrajectoryGenerator2DCircle::StartTraj(const Vector2D &start_pos,
     50void TrajectoryGenerator2DCircle::StartTraj(const Vector2Df &start_pos,
    5151                                            float nb_lap) {
    5252  pimpl_->StartTraj(start_pos, nb_lap);
     
    5757void TrajectoryGenerator2DCircle::StopTraj(void) { pimpl_->is_running = false; }
    5858
    59 void TrajectoryGenerator2DCircle::GetPosition(Vector2D &point) const {
     59void TrajectoryGenerator2DCircle::GetPosition(Vector2Df &point) const {
    6060  point.x = pimpl_->output->Value(0, 0);
    6161  point.y = pimpl_->output->Value(0, 1);
    6262}
    6363
    64 void TrajectoryGenerator2DCircle::SetCenter(const Vector2D &value) {
     64void TrajectoryGenerator2DCircle::SetCenter(const Vector2Df &value) {
    6565  pimpl_->pos_off = value;
    6666}
    6767
    68 void TrajectoryGenerator2DCircle::GetSpeed(Vector2D &point) const {
     68void TrajectoryGenerator2DCircle::GetSpeed(Vector2Df &point) const {
    6969  point.x = pimpl_->output->Value(1, 0);
    7070  point.y = pimpl_->output->Value(1, 1);
    7171}
    7272
    73 void TrajectoryGenerator2DCircle::SetCenterSpeed(const Vector2D &value) {
     73void TrajectoryGenerator2DCircle::SetCenterSpeed(const Vector2Df &value) {
    7474  pimpl_->vel_off = value;
    7575}
  • trunk/lib/FlairFilter/src/TrajectoryGenerator2DCircle.h

    r15 r167  
    1515
    1616#include <IODevice.h>
     17#include <Vector2D.h>
    1718
    1819namespace flair {
    1920namespace core {
    2021class cvmatrix;
    21 class Vector2D;
    2222}
    2323namespace gui {
     
    7272  * \param nb_lap number of laps, -1 for infinite
    7373  */
    74   void StartTraj(const core::Vector2D &start_pos, float nb_lap = -1);
     74  void StartTraj(const core::Vector2Df &start_pos, float nb_lap = -1);
    7575
    7676  /*!
     
    9393  * \param value center position
    9494  */
    95   void SetCenter(const core::Vector2D &value);
     95  void SetCenter(const core::Vector2Df &value);
    9696
    9797  /*!
     
    100100  * \param value center speed
    101101  */
    102   void SetCenterSpeed(const core::Vector2D &value);
     102  void SetCenterSpeed(const core::Vector2Df &value);
    103103
    104104  /*!
     
    117117  * \param point returned position
    118118  */
    119   void GetPosition(core::Vector2D &point) const;
     119  void GetPosition(core::Vector2Df &point) const;
    120120
    121121  /*!
     
    124124  * \param point returned speed
    125125  */
    126   void GetSpeed(core::Vector2D &point) const;
     126  void GetSpeed(core::Vector2Df &point) const;
    127127
    128128  /*!
  • trunk/lib/FlairFilter/src/TrajectoryGenerator2DCircle_impl.cpp

    r148 r167  
    6464}
    6565
    66 void TrajectoryGenerator2DCircle_impl::StartTraj(const Vector2D &start_pos,
     66void TrajectoryGenerator2DCircle_impl::StartTraj(const Vector2Df &start_pos,
    6767                                                 float nb_lap) {
    6868  is_running = true;
     
    8989  float A = acceleration->Value();
    9090  float R = rayon->Value();
    91   Vector2D v;
     91  Vector2Df v;
    9292
    9393  if (V < 0)
  • trunk/lib/FlairFilter/src/unexported/TrajectoryGenerator2DCircle_impl.h

    r15 r167  
    4343  ~TrajectoryGenerator2DCircle_impl();
    4444  void Update(flair::core::Time time);
    45   void StartTraj(const flair::core::Vector2D &start_pos, float nb_lap);
     45  void StartTraj(const flair::core::Vector2Df &start_pos, float nb_lap);
    4646  void FinishTraj(void);
    4747  bool is_running;
    4848  flair::core::cvmatrix *output;
    49   flair::core::Vector2D pos_off, vel_off;
     49  flair::core::Vector2Df pos_off, vel_off;
    5050
    5151private:
     
    5353  float CurrentTime, FinishTime;
    5454  bool first_update, is_finishing;
    55   flair::core::Vector2D pos;
     55  flair::core::Vector2Df pos;
    5656  float angle_off;
    5757  flair::gui::DoubleSpinBox *T, *veloctity, *acceleration, *rayon;
Note: See TracChangeset for help on using the changeset viewer.