Last change
on this file since 197 was 167, checked in by Sanahuja Guillaume, 7 years ago |
modifs pour template vectors
|
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 |
|
---|
18 | #include "SimuAhrs.h"
|
---|
19 | #include "SimuImu.h"
|
---|
20 | #include <AhrsData.h>
|
---|
21 |
|
---|
22 | using std::string;
|
---|
23 | using namespace flair::core;
|
---|
24 | using namespace flair::sensor;
|
---|
25 |
|
---|
26 | namespace flair {
|
---|
27 | namespace filter {
|
---|
28 |
|
---|
29 | SimuAhrs::SimuAhrs(string name, uint32_t modelId,uint32_t deviceId,
|
---|
30 | uint8_t priority)
|
---|
31 | : Ahrs(new SimuImu(name, modelId,deviceId, priority), name) {
|
---|
32 | SetIsReady(true);
|
---|
33 | }
|
---|
34 |
|
---|
35 | SimuAhrs::~SimuAhrs() {}
|
---|
36 |
|
---|
37 | // datas from SimuImu are AhrsData!
|
---|
38 | void SimuAhrs::UpdateFrom(const io_data *data) {
|
---|
39 | AhrsData *input = (AhrsData *)data;
|
---|
40 | AhrsData *output;
|
---|
41 | GetDatas(&output);
|
---|
42 |
|
---|
43 | Quaternion quaternion;
|
---|
44 | Vector3Df filteredAngRates;
|
---|
45 | input->GetQuaternionAndAngularRates(quaternion, filteredAngRates);
|
---|
46 | output->SetQuaternionAndAngularRates(quaternion, filteredAngRates);
|
---|
47 | output->SetDataTime(input->DataTime());
|
---|
48 |
|
---|
49 | ProcessUpdate(output);
|
---|
50 | }
|
---|
51 |
|
---|
52 | } // end namespace filter
|
---|
53 | } // end namespace flair
|
---|
Note:
See
TracBrowser
for help on using the repository browser.