xssnapshot.h
Go to the documentation of this file.
1 
2 // Copyright (c) 2003-2021 Xsens Technologies B.V. or subsidiaries worldwide.
3 // All rights reserved.
4 //
5 // Redistribution and use in source and binary forms, with or without modification,
6 // are permitted provided that the following conditions are met:
7 //
8 // 1. Redistributions of source code must retain the above copyright notice,
9 // this list of conditions, and the following disclaimer.
10 //
11 // 2. Redistributions in binary form must reproduce the above copyright notice,
12 // this list of conditions, and the following disclaimer in the documentation
13 // and/or other materials provided with the distribution.
14 //
15 // 3. Neither the names of the copyright holders nor the names of their contributors
16 // may be used to endorse or promote products derived from this software without
17 // specific prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
20 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
22 // THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
24 // OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR
26 // TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.THE LAWS OF THE NETHERLANDS
28 // SHALL BE EXCLUSIVELY APPLICABLE AND ANY DISPUTES SHALL BE FINALLY SETTLED UNDER THE RULES
29 // OF ARBITRATION OF THE INTERNATIONAL CHAMBER OF COMMERCE IN THE HAGUE BY ONE OR MORE
30 // ARBITRATORS APPOINTED IN ACCORDANCE WITH SAID RULES.
31 //
32 
33 
34 // Copyright (c) 2003-2021 Xsens Technologies B.V. or subsidiaries worldwide.
35 // All rights reserved.
36 //
37 // Redistribution and use in source and binary forms, with or without modification,
38 // are permitted provided that the following conditions are met:
39 //
40 // 1. Redistributions of source code must retain the above copyright notice,
41 // this list of conditions, and the following disclaimer.
42 //
43 // 2. Redistributions in binary form must reproduce the above copyright notice,
44 // this list of conditions, and the following disclaimer in the documentation
45 // and/or other materials provided with the distribution.
46 //
47 // 3. Neither the names of the copyright holders nor the names of their contributors
48 // may be used to endorse or promote products derived from this software without
49 // specific prior written permission.
50 //
51 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
52 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
53 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
54 // THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
55 // SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
56 // OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
57 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR
58 // TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
59 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.THE LAWS OF THE NETHERLANDS
60 // SHALL BE EXCLUSIVELY APPLICABLE AND ANY DISPUTES SHALL BE FINALLY SETTLED UNDER THE RULES
61 // OF ARBITRATION OF THE INTERNATIONAL CHAMBER OF COMMERCE IN THE HAGUE BY ONE OR MORE
62 // ARBITRATORS APPOINTED IN ACCORDANCE WITH SAID RULES.
63 //
64 
65 #ifndef XSSNAPSHOT_H
66 #define XSSNAPSHOT_H
67 
68 #include "xstypesconfig.h"
69 #include "xsdeviceid.h"
70 
71 struct XsSnapshot;
72 
73 #ifdef __cplusplus
74 extern "C" {
75 #endif
76 #ifndef __cplusplus
77 #define XSSNAPSHOT_INITIALIZER { XSDEVICEID_INITIALIZER, 0, 0, 0,0,0,0, 0,0,0, 0,0,0, 0, 0, 0, 0 }
78 #endif
79 
80 XSTYPES_DLL_API void XsSnapshot_construct(struct XsSnapshot* thisPtr);
81 XSTYPES_DLL_API void XsSnapshot_destruct(struct XsSnapshot* thisPtr);
82 
83 #ifdef __cplusplus
84 } // extern "C"
85 #endif
86 
88 {
89  ST_Awinda = 0, //
91 };
95 struct XsSnapshot
96 {
99  uint64_t m_timestamp;
101  int64_t m_iV[3];
104  uint16_t m_status;
108 #ifdef __cplusplus
109 
110  inline bool operator == (const XsSnapshot& other) const
111  {
112  if (m_frameNumber != other.m_frameNumber ||
113  m_baro != other.m_baro ||
114  m_status != other.m_status ||
117  m_type != other.m_type)
118  return false;
119 
120  for (int i = 0; i < 3; ++i)
121  {
122  if (m_iQ[i] != other.m_iQ[i] ||
123  m_iV[i] != other.m_iV[i] ||
124  m_mag[i] != other.m_mag[i])
125  return false;
126  }
127  if (m_type == ST_Full)
128  {
129  if (m_iQ[3] != other.m_iQ[3] || m_timestamp != other.m_timestamp)
130  return false;
131  }
132  return true;
133  }
134 #endif
135 };
136 typedef struct XsSnapshot XsSnapshot;
137 
140 {
141  FSFL_ClipAccX = 0x0001,
142  FSFL_ClipAccY = 0x0002,
143  FSFL_ClipAccZ = 0x0004,
145  FSFL_ClipGyrX = 0x0008,
146  FSFL_ClipGyrY = 0x0010,
147  FSFL_ClipGyrZ = 0x0020,
149  FSFL_ClipMagX = 0x0040,
150  FSFL_ClipMagY = 0x0080,
151  FSFL_ClipMagZ = 0x0100,
153  FSFL_MagIsNew = 0x0200,
154  FSFL_BaroIsNew = 0x0400,
156 };
158 
159 
160 
161 #define FSFL_ClipAccShift 0
162 #define FSFL_ClipGyrShift 04
163 #define FSFL_ClipMagshift 6
164 #define FSFL_RotationShift 11
165 
166 #endif
FSFL_ClipAccZ
@ FSFL_ClipAccZ
Definition: xssnapshot.h:143
ST_Awinda
@ ST_Awinda
Definition: xssnapshot.h:89
XsSnapshot::m_mag
int32_t m_mag[3]
The magnetic field.
Definition: xssnapshot.h:102
FSFL_BaroIsNew
@ FSFL_BaroIsNew
Definition: xssnapshot.h:154
XsSnapshot::XsSnapshot_destruct
void XsSnapshot_destruct(XsSnapshot *thisPtr)
Destruct an XsSnapshot object.
Definition: xssnapshot.c:86
XsSnapshot::m_type
SnapshotType m_type
The type of the snapshot (Awinda, Full)
Definition: xssnapshot.h:107
XsSnapshot::m_iV
int64_t m_iV[3]
The integrated velocity.
Definition: xssnapshot.h:101
ST_Full
@ ST_Full
Definition: xssnapshot.h:90
XsSnapshot::m_gyrClippingCounter
uint8_t m_gyrClippingCounter
The clipping event counter for the Gyr.
Definition: xssnapshot.h:106
FSFL_ClipGyrMask
@ FSFL_ClipGyrMask
Definition: xssnapshot.h:148
XsSnapshot::m_deviceId
XsDeviceId m_deviceId
The ID of the device that created the data.
Definition: xssnapshot.h:97
FSFL_ClipAccMask
@ FSFL_ClipAccMask
Definition: xssnapshot.h:144
FSFL_ClipMagZ
@ FSFL_ClipMagZ
Definition: xssnapshot.h:151
XsSnapshot::m_timestamp
uint64_t m_timestamp
The timestamp.
Definition: xssnapshot.h:99
FSFL_ClipAccX
@ FSFL_ClipAccX
Definition: xssnapshot.h:141
FSFL_RotationMask
@ FSFL_RotationMask
Definition: xssnapshot.h:155
FSFL_ClipGyrX
@ FSFL_ClipGyrX
Definition: xssnapshot.h:145
FSFL_ClipGyrZ
@ FSFL_ClipGyrZ
Definition: xssnapshot.h:147
operator==
bool operator==(const XsFilterProfile &lhs, const XsFilterProfile &rhs)
Returns true if lhs has the same type as rhs.
Definition: scenariomatchpred.h:81
uint32_t
unsigned int uint32_t
Definition: pstdint.h:485
FSFL_MagIsNew
@ FSFL_MagIsNew
Definition: xssnapshot.h:153
XsSnapshot::m_status
uint16_t m_status
The clipping flags of the latest interval
Definition: xssnapshot.h:104
SnapshotType
SnapshotType
Definition: xssnapshot.h:87
FSFL_ClipAccY
@ FSFL_ClipAccY
Definition: xssnapshot.h:142
XsSnapshot::XsSnapshot_construct
void XsSnapshot_construct(XsSnapshot *thisPtr)
Construct an XsSnapshot object.
Definition: xssnapshot.c:78
xsdeviceid.h
xstypesconfig.h
XsDeviceId
Contains an Xsens device ID and provides operations for determining the type of device.
Definition: xsdeviceid.h:192
XsSnapshot
A container for Snapshot data.
Definition: xssnapshot.h:95
FSFL_ClipGyrY
@ FSFL_ClipGyrY
Definition: xssnapshot.h:146
SnapshotStatusFlag
SnapshotStatusFlag
Status flag definitions for XsSnapshot status field.
Definition: xssnapshot.h:139
XSTYPES_DLL_API
#define XSTYPES_DLL_API
Definition: xstypesconfig.h:65
int32_t
signed int int32_t
Definition: pstdint.h:515
XsSnapshot::m_iQ
int32_t m_iQ[4]
The integrated orientation.
Definition: xssnapshot.h:100
FSFL_ClipMagY
@ FSFL_ClipMagY
Definition: xssnapshot.h:150
XsSnapshot::m_baro
int32_t m_baro
The barometric pressure.
Definition: xssnapshot.h:103
XsSnapshot::m_accClippingCounter
uint8_t m_accClippingCounter
The clipping event counter for the Acc.
Definition: xssnapshot.h:105
FSFL_ClipMagMask
@ FSFL_ClipMagMask
Definition: xssnapshot.h:152
XsSnapshot::m_frameNumber
uint32_t m_frameNumber
The frame.
Definition: xssnapshot.h:98
FSFL_ClipMagX
@ FSFL_ClipMagX
Definition: xssnapshot.h:149


xsens_mti_driver
Author(s):
autogenerated on Sun Sep 3 2023 02:43:20