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


Ignore:
Timestamp:
09/14/17 15:52:29 (7 years ago)
Author:
Sanahuja Guillaume
Message:

modifs imu

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

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairFilter/src/AhrsComplementaryFilter.cpp

    r197 r198  
    2020#include <Imu.h>
    2121#include <DoubleSpinBox.h>
     22#include <Vector3DSpinBox.h>
    2223#include <GridLayout.h>
    2324#include <ImuData.h>
     
    3637AhrsComplementaryFilter::AhrsComplementaryFilter(const Imu* parent,string name): isInit(false), Ahrs(parent,name) {
    3738
    38     QHat.q0=1;
    39     QHat.q1=0;
    40     QHat.q2=0;
    41     QHat.q3=0;
    42     BHat.x=0;
    43     BHat.y=0;
    44     BHat.z=0;
     39  QHat.q0=1;
     40  QHat.q1=0;
     41  QHat.q2=0;
     42  QHat.q3=0;
     43  BHat.x=0;
     44  BHat.y=0;
     45  BHat.z=0;
    4546
    46     ka[0]=new DoubleSpinBox(parent->GetLayout()->NewRow(),"ka[0]:",0.,10,0.1,2,0.5);
    47     ka[1]=new DoubleSpinBox(parent->GetLayout()->LastRowLastCol(),"ka[1]:",0.,10,0.1,2,0.5);
    48     ka[2]=new DoubleSpinBox(parent->GetLayout()->LastRowLastCol(),"ka[2]:",0.,10.,0.1,2,0.);
     47  ka[0]=new DoubleSpinBox(parent->GetLayout()->NewRow(),"ka[0]:",0.,10,0.1,2,0.5);
     48  ka[1]=new DoubleSpinBox(parent->GetLayout()->LastRowLastCol(),"ka[1]:",0.,10,0.1,2,0.5);
     49  ka[2]=new DoubleSpinBox(parent->GetLayout()->LastRowLastCol(),"ka[2]:",0.,10.,0.1,2,0.);
    4950
    50     kb[0]=new DoubleSpinBox(parent->GetLayout()->NewRow(),"kb[0]:",0.,10,0.1,2,0.01);
    51     kb[1]=new DoubleSpinBox(parent->GetLayout()->LastRowLastCol(),"kb[1]:",0.,10,0.1,2,0.01);
    52     kb[2]=new DoubleSpinBox(parent->GetLayout()->LastRowLastCol(),"kb[2]:",0.,10,0.1,2,0.01);
    53    
    54     km[0]=new DoubleSpinBox(parent->GetLayout()->NewRow(),"km[0]:",0.,10,0.1,2,0.01);
    55     km[1]=new DoubleSpinBox(parent->GetLayout()->LastRowLastCol(),"km[1]:",0.,10,0.1,2,0.01);
    56     km[2]=new DoubleSpinBox(parent->GetLayout()->LastRowLastCol(),"km[2]:",0.,10,0.1,2,0.01);
     51  kb[0]=new DoubleSpinBox(parent->GetLayout()->NewRow(),"kb[0]:",0.,10,0.1,2,0.01);
     52  kb[1]=new DoubleSpinBox(parent->GetLayout()->LastRowLastCol(),"kb[1]:",0.,10,0.1,2,0.01);
     53  kb[2]=new DoubleSpinBox(parent->GetLayout()->LastRowLastCol(),"kb[2]:",0.,10,0.1,2,0.01);
     54
     55  //put km to [0,0,0] to disable magnetometers
     56  km[0]=new DoubleSpinBox(parent->GetLayout()->NewRow(),"km[0]:",0.,50,0.1,2,0.01);
     57  km[1]=new DoubleSpinBox(parent->GetLayout()->LastRowLastCol(),"km[1]:",0.,50,0.1,2,0.01);
     58  km[2]=new DoubleSpinBox(parent->GetLayout()->LastRowLastCol(),"km[2]:",0.,50,0.1,2,0.01);
    5759 
     60  magRef=new Vector3DSpinBox(parent->GetLayout()->NewRow(),"ref magnetic field (uT)",
     61                                 0, 100, 1,
     62                                 3,Vector3Df(20.5324,.2367,43.6682)); //Compiegne, France
    5863  SetIsReady(true);
    5964}
     
    8287    //float kb[3]={0.01,0.01,0.01};
    8388    //float k_m[3]= {0,0,0};
    84 magRef.x=20.8296;
    85 magRef.y=.2095;
    86 magRef.z=43.3333;
     89    magRef=this->magRef->Value();
    8790
    8891    if(isInit==true) {
  • trunk/lib/FlairFilter/src/AhrsComplementaryFilter.h

    r197 r198  
    2424    namespace gui {
    2525        class DoubleSpinBox;
     26        class Vector3DSpinBox;
    2627    }
    2728}
     
    7071            gui::DoubleSpinBox *kb[3];
    7172            gui::DoubleSpinBox *km[3];
     73            gui::Vector3DSpinBox *magRef;
    7274    };
    7375} // end namespace filter
Note: See TracChangeset for help on using the changeset viewer.