Changeset 15 in flair-src for trunk/lib/FlairFilter/src/Gx3_25_ahrs.cpp
- Timestamp:
- Apr 8, 2016, 3:40:57 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairFilter/src/Gx3_25_ahrs.cpp
r10 r15 24 24 using namespace flair::sensor; 25 25 26 namespace flair { namespace filter { 26 namespace flair { 27 namespace filter { 27 28 28 Gx3_25_ahrs::Gx3_25_ahrs(const FrameworkManager* parent,string name,SerialPort *serialport,Gx3_25_imu::Command_t command,uint8_t priority) : Ahrs(new Gx3_25_imu(parent,name,serialport,command,priority),name) { 29 } 29 Gx3_25_ahrs::Gx3_25_ahrs(const FrameworkManager *parent, string name, 30 SerialPort *serialport, Gx3_25_imu::Command_t command, 31 uint8_t priority) 32 : Ahrs(new Gx3_25_imu(parent, name, serialport, command, priority), name) {} 30 33 31 Gx3_25_ahrs::~Gx3_25_ahrs() { 32 } 34 Gx3_25_ahrs::~Gx3_25_ahrs() {} 33 35 34 void Gx3_25_ahrs::Start(void) { 35 ((Gx3_25_imu*)GetImu())->Start(); 36 } 36 void Gx3_25_ahrs::Start(void) { ((Gx3_25_imu *)GetImu())->Start(); } 37 37 38 // datas from Gx3_25_imu are AhrsData!38 // datas from Gx3_25_imu are AhrsData! 39 39 void Gx3_25_ahrs::UpdateFrom(const io_data *data) { 40 AhrsData *input=(AhrsData*)data;41 42 40 AhrsData *input = (AhrsData *)data; 41 AhrsData *output; 42 GetDatas(&output); 43 43 44 45 46 input->GetQuaternionAndAngularRates(quaternion,filteredAngRates);47 output->SetQuaternionAndAngularRates(quaternion,filteredAngRates);48 44 Quaternion quaternion; 45 Vector3D filteredAngRates; 46 input->GetQuaternionAndAngularRates(quaternion, filteredAngRates); 47 output->SetQuaternionAndAngularRates(quaternion, filteredAngRates); 48 output->SetDataTime(input->DataTime()); 49 49 50 50 ProcessUpdate(output); 51 51 } 52 52 53 53 } // end namespace filter 54 54 } // end namespace flair 55
Note:
See TracChangeset
for help on using the changeset viewer.