source: flair-src/trunk/lib/FlairFilter/src/Gx3_25_ahrs.cpp@ 268

Last change on this file since 268 was 268, checked in by Sanahuja Guillaume, 3 years ago

add defines for architectures to speed up compile time

File size: 1.4 KB
RevLine 
[10]1// %flair:license{
[15]2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
[10]4// %flair:license}
[7]5// created: 2013/01/16
6// filename: Gx3_25_ahrs.cpp
7//
8// author: Guillaume Sanahuja
9// Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11// version: $Id: $
12//
13// purpose: class for 3dmgx3-25 ahrs
14//
15//
16/*********************************************************************/
[268]17#ifdef ARMV7A
[7]18
19#include "Gx3_25_ahrs.h"
20#include <AhrsData.h>
[99]21#include <OneAxisRotation.h>
[7]22
23using std::string;
24using namespace flair::core;
25using namespace flair::sensor;
26
[15]27namespace flair {
28namespace filter {
[7]29
[137]30Gx3_25_ahrs::Gx3_25_ahrs(string name,
[15]31 SerialPort *serialport, Gx3_25_imu::Command_t command,
32 uint8_t priority)
[186]33 : Ahrs(new Gx3_25_imu( "imu", serialport, command, priority), name) {
[7]34
[157]35 SetIsReady(true);
36}
37
[15]38Gx3_25_ahrs::~Gx3_25_ahrs() {}
[7]39
[173]40// datas outputed from Gx3_25_imu are AhrsData!
[7]41void Gx3_25_ahrs::UpdateFrom(const io_data *data) {
[15]42 AhrsData *input = (AhrsData *)data;
43 AhrsData *output;
44 GetDatas(&output);
[7]45
[15]46 Quaternion quaternion;
[167]47 Vector3Df filteredAngRates;
[15]48 input->GetQuaternionAndAngularRates(quaternion, filteredAngRates);
49 output->SetQuaternionAndAngularRates(quaternion, filteredAngRates);
50 output->SetDataTime(input->DataTime());
[7]51
[15]52 ProcessUpdate(output);
[7]53}
54
55} // end namespace filter
56} // end namespace flair
[268]57
58#endif
Note: See TracBrowser for help on using the repository browser.