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

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

add defines for architectures to speed up compile time

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