IMUState.h
Go to the documentation of this file.
1
/*
2
* IMUState.h
3
*
4
* Created on: Mar 16, 2014
5
* Author: Dr.-Ing. David Israel González Aguirre
6
* Mail: david.gonzalez@kit.edu
7
*/
8
9
#pragma once
10
11
#include "
Includes.h
"
12
13
namespace
IMU
14
{
15
struct
IMUState
16
{
17
inline
IMUState
() :
18
m_ControlData
(),
m_PhysicalData
()
19
{
20
}
21
22
struct
ControlData
23
{
24
ControlData
() :
25
m_PreviousSampleCount
(-1),
m_CurrentSampleCount
(0),
m_MessageCounter
(0),
m_IsConsecutive
(false)
26
{
27
memset(&
m_TimeStamp
, 0,
sizeof
(timeval));
28
}
29
30
long
m_PreviousSampleCount
;
31
unsigned
short
m_CurrentSampleCount
;
32
long
m_MessageCounter
;
33
bool
m_IsConsecutive
;
34
timeval
m_TimeStamp
;
35
};
36
37
struct
PhysicalData
38
{
39
PhysicalData
() :
40
m_AccelerationMagnitud
(0.0f)
41
{
42
memset(
m_Acceleration
, 0,
sizeof
(
float
) * 3);
43
memset(
m_GyroscopeRotation
, 0,
sizeof
(
float
) * 3);
44
memset(
m_MagneticRotation
, 0,
sizeof
(
float
) * 3);
45
memset(
m_QuaternionRotation
, 0,
sizeof
(
float
) * 4);
46
}
47
48
float
m_Acceleration
[3];
49
float
m_AccelerationMagnitud
;
50
float
m_GyroscopeRotation
[3];
51
float
m_MagneticRotation
[3];
52
float
m_QuaternionRotation
[4];
53
54
inline
void
UpdateAccelerationMagnitud
()
55
{
56
m_AccelerationMagnitud
=
std::sqrt
(
m_Acceleration
[0] *
m_Acceleration
[0] +
m_Acceleration
[1] *
m_Acceleration
[1] +
m_Acceleration
[2] *
m_Acceleration
[2]);
57
}
58
};
59
60
ControlData
m_ControlData
;
61
PhysicalData
m_PhysicalData
;
62
};
63
}
64
GfxTL::sqrt
VectorXD< D, T > sqrt(const VectorXD< D, T > &a)
Definition:
VectorXD.h:662
IMU::IMUState::PhysicalData::m_MagneticRotation
float m_MagneticRotation[3]
Definition:
IMUState.h:51
IMU::IMUState::ControlData::ControlData
ControlData()
Definition:
IMUState.h:24
IMU::IMUState::ControlData::m_TimeStamp
timeval m_TimeStamp
Definition:
IMUState.h:34
IMU::IMUState::m_PhysicalData
PhysicalData m_PhysicalData
Definition:
IMUState.h:61
IMU::IMUState::ControlData::m_PreviousSampleCount
long m_PreviousSampleCount
Definition:
IMUState.h:30
Includes.h
IMU::IMUState::ControlData::m_MessageCounter
long m_MessageCounter
Definition:
IMUState.h:32
IMU::IMUState
Definition:
IMUState.h:15
IMU
Definition:
IIMUEventDispatcher.cpp:12
IMU::IMUState::PhysicalData::PhysicalData
PhysicalData()
Definition:
IMUState.h:39
IMU::IMUState::PhysicalData::m_QuaternionRotation
float m_QuaternionRotation[4]
Definition:
IMUState.h:52
IMU::IMUState::PhysicalData::m_AccelerationMagnitud
float m_AccelerationMagnitud
Definition:
IMUState.h:49
IMU::IMUState::PhysicalData::m_GyroscopeRotation
float m_GyroscopeRotation[3]
Definition:
IMUState.h:50
IMU::IMUState::PhysicalData::m_Acceleration
float m_Acceleration[3]
Definition:
IMUState.h:48
IMU::IMUState::ControlData::m_IsConsecutive
bool m_IsConsecutive
Definition:
IMUState.h:33
IMU::IMUState::ControlData
Definition:
IMUState.h:22
IMU::IMUState::PhysicalData::UpdateAccelerationMagnitud
void UpdateAccelerationMagnitud()
Definition:
IMUState.h:54
IMU::IMUState::m_ControlData
ControlData m_ControlData
Definition:
IMUState.h:60
IMU::IMUState::ControlData::m_CurrentSampleCount
unsigned short m_CurrentSampleCount
Definition:
IMUState.h:31
IMU::IMUState::PhysicalData
Definition:
IMUState.h:37
IMU::IMUState::IMUState
IMUState()
Definition:
IMUState.h:17
RobotAPI
drivers
XsensIMU
IMU
IMUState.h
Generated on Sat Oct 12 2024 09:14:07 for armarx_documentation by
1.8.17