Changeset 198 in flair-src for trunk/lib/FlairFilter
- Timestamp:
- Sep 14, 2017, 3:52:29 PM (7 years ago)
- Location:
- trunk/lib/FlairFilter/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairFilter/src/AhrsComplementaryFilter.cpp
r197 r198 20 20 #include <Imu.h> 21 21 #include <DoubleSpinBox.h> 22 #include <Vector3DSpinBox.h> 22 23 #include <GridLayout.h> 23 24 #include <ImuData.h> … … 36 37 AhrsComplementaryFilter::AhrsComplementaryFilter(const Imu* parent,string name): isInit(false), Ahrs(parent,name) { 37 38 38 39 40 41 42 43 44 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; 45 46 46 47 48 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.); 49 50 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); 57 59 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 58 63 SetIsReady(true); 59 64 } … … 82 87 //float kb[3]={0.01,0.01,0.01}; 83 88 //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(); 87 90 88 91 if(isInit==true) { -
trunk/lib/FlairFilter/src/AhrsComplementaryFilter.h
r197 r198 24 24 namespace gui { 25 25 class DoubleSpinBox; 26 class Vector3DSpinBox; 26 27 } 27 28 } … … 70 71 gui::DoubleSpinBox *kb[3]; 71 72 gui::DoubleSpinBox *km[3]; 73 gui::Vector3DSpinBox *magRef; 72 74 }; 73 75 } // end namespace filter
Note:
See TracChangeset
for help on using the changeset viewer.