CAN_comm.h
Go to the documentation of this file.
1 /*
2 MIT LICENSE
3 
4 Copyright 2014-2019 Inertial Sense, Inc. - http://inertialsense.com
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions :
7 
8 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 
10 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT, IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 */
12 
13 #ifndef CAN_COMM_H_
14 #define CAN_COMM_H_
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 
21 
22 /*GMT information*/
23 typedef struct PACKED
24 {
26  uint32_t week; //4 bytes
27 
29  float timeOfWeekMs; //4 bytes
30 
31 } is_can_time;
32 
33 /*Status Information*/
34 typedef struct PACKED
35 {
37  uint32_t insStatus; //4 bytes
38 
40  uint32_t hdwStatus; //4 bytes
41 
43 
44 /*Euler Angles*/
45 typedef struct PACKED
46 {
48  int16_t theta1; //2 bytes (4 decimal places precision)
49  int16_t theta2; //2 bytes
50  int16_t theta3; //2 bytes
51  //int16_t reserved;
53 
54 /*Quaternion*/
55 typedef struct PACKED
56 {
58  int16_t qn2b1; //2 bytes (4 decimal places precision)
59  int16_t qn2b2; //2 bytes
60  int16_t qn2b3; //2 bytes
61  int16_t qn2b4; //2 bytes
63 
64 /*Quaternion*/
65 typedef struct PACKED
66 {
68  int16_t qe2b1; //2 bytes (4 decimal places precision)
69  int16_t qe2b2; //2 bytes
70  int16_t qe2b3; //2 bytes
71  int16_t qe2b4; //2 bytes
73 
74 /*velocity in body frame*/
75 typedef struct PACKED
76 {
78  int16_t uvw1; //2 bytes (2 decimal places precision, max absolute value 327.67)
79  int16_t uvw2; //2 bytes
80  int16_t uvw3; //2 bytes
81 } is_can_uvw;
82 
84 typedef struct PACKED
85 {
87  int16_t ve1; //2 bytes (2 decimal places precision, max absolute value 327.67)
88  int16_t ve2; //2 bytes
89  int16_t ve3; //2 bytes
90 
91 } is_can_ve;
92 
94 typedef struct PACKED
95 {
97  double lat; //8 bytes (more than 8 decimal places precision)
98 
100 
102 typedef struct PACKED
103 {
105  double lon; //8 bytes (more than 8 decimal places precision)
107 
109 typedef struct PACKED
110 {
112  float alt; //4 bytes (more than 8 decimal places precision)
114  uint32_t status;
116 
118 typedef struct PACKED
119 {
121  float ned1; //4 bytes
123  float ned2; //4 bytes
124 
126 
128 typedef struct PACKED
129 {
131  float ned3; //4 bytes
133  uint32_t insStatus; //4 bytes
134 
135 } is_can_down;
136 
138 typedef struct PACKED
139 {
141  double ecef1; //8 bytes
142 
143 } is_can_ecef_x;
144 
146 typedef struct PACKED
147 {
149  double ecef2; //8 bytes
150 
151 } is_can_ecef_y;
152 
154 typedef struct PACKED
155 {
157  double ecef3; //8 bytes
158 
159 } is_can_ecef_z;
160 
162 typedef struct PACKED
163 {
165  float msl; //4 bytes
166 } is_can_msl;
167 
169 typedef struct PACKED
170 {
171  int16_t theta0; //2 bytes (scaled by 1000 3 decimal places precision)
172  int16_t vel0; //2 bytes (scaled by 100 2 decimal places precision)
174  uint16_t dt; //2 bytes
176 
178 typedef struct PACKED
179 {
180  int16_t theta1; //2 bytes (scaled by 1000 3 decimal places precision)
181  int16_t vel1; //2 bytes (scaled by 100 2 decimal places precision)
183  uint16_t dt; //2 bytes
184 
186 
188 typedef struct PACKED
189 {
190  int16_t theta2; //2 bytes (scaled by 1000 3 decimal places precision)
191  int16_t vel2; //2 bytes (scaled by 100 2 decimal places precision)
193  uint16_t dt; //2 bytes
195 
196 typedef struct PACKED
197 {
198  int16_t theta0; //2 bytes (scaled by 1000 3 decimal places precision)
199  int16_t vel0; //2 bytes (scaled by 100 2 decimal places precision)
201  uint32_t status; //4 bytes
203 
204 typedef struct PACKED
205 {
206  int16_t theta1; //2 bytes (scaled by 1000 3 decimal places precision)
207  int16_t vel1; //2 bytes (scaled by 100 2 decimal places precision)
209  uint32_t status; //4 bytes
210 
212 
213 typedef struct PACKED
214 {
215  int16_t theta2; //2 bytes (scaled by 1000 3 decimal places precision)
216  int16_t vel2; //2 bytes (scaled by 100 2 decimal places precision)
218  uint32_t status; //4 bytes
220 
221 typedef struct PACKED
222 {
224  uint32_t status; //4 bytes
226  uint32_t cnoMean; //4 byte
228 
229 typedef struct PACKED
230 {
232  uint8_t arRatio; //1 byte
234  uint8_t differentialAge; //1 byte
236  float distanceToBase; //4 bytes
238  int16_t headingToBase; //2 bytes (scaled by 1000 3 decimal places precision)
240 
241 typedef struct PACKED
242 {
244  int16_t insRoll; //2 bytes (scaled by 10000 4 decimal places precision)
245  int16_t pImu1; //2 bytes (scaled by 1000 3 decimal places precision)
246  int16_t pImu2; //2 bytes (scaled by 1000 3 decimal places precision)
247 
249 
250 typedef union PACKED
251 {
278 
279 
280 POP_PACK
281 
282 #ifdef __cplusplus
283 }
284 #endif
285 
286 #endif // CAN_COMM_H_
float ned2
Definition: CAN_comm.h:123
is_can_ecef_y ecefy
Definition: CAN_comm.h:265
float ned3
Definition: CAN_comm.h:131
is_can_ve ve
Definition: CAN_comm.h:258
struct PACKED is_can_north_east
uint8_t arRatio
Definition: CAN_comm.h:232
is_can_gps1_rtk_rel rtkrel
Definition: CAN_comm.h:275
struct PACKED is_can_ins_lat
int16_t qe2b4
Definition: CAN_comm.h:71
struct PACKED is_can_ecef_x
int16_t qn2b3
Definition: CAN_comm.h:60
is_can_uvw uvw
Definition: CAN_comm.h:257
is_can_ins_lat lat
Definition: CAN_comm.h:259
float msl
Definition: CAN_comm.h:165
int16_t vel0
Definition: CAN_comm.h:172
double ecef3
Definition: CAN_comm.h:157
int16_t qn2b1
Definition: CAN_comm.h:58
struct PACKED is_can_msl
int16_t theta0
Definition: CAN_comm.h:171
union PACKED is_can_payload
float timeOfWeekMs
Definition: CAN_comm.h:29
struct PACKED is_can_ins_lon
double lat
Definition: CAN_comm.h:97
is_can_ecef_z ecefz
Definition: CAN_comm.h:266
struct PACKED is_can_gps1_rtk_rel
is_can_dual_imu_rz dimurz
Definition: CAN_comm.h:273
#define PUSH_PACK_1
Definition: ISConstants.h:231
float ned1
Definition: CAN_comm.h:121
int16_t ve1
Definition: CAN_comm.h:87
int16_t uvw3
Definition: CAN_comm.h:80
int16_t qe2b2
Definition: CAN_comm.h:69
struct PACKED is_can_ins_alt
is_can_msl msl
Definition: CAN_comm.h:267
struct PACKED is_can_roll_rollRate
struct PACKED is_can_preint_imu_rz
uint32_t week
Definition: CAN_comm.h:26
struct PACKED is_can_ecef_z
int16_t theta1
Definition: CAN_comm.h:48
int16_t vel2
Definition: CAN_comm.h:191
double ecef1
Definition: CAN_comm.h:141
double ecef2
Definition: CAN_comm.h:149
struct PACKED is_can_uvw
struct PACKED is_can_ins_quatn2b
struct PACKED is_can_ins_quate2b
is_can_ins_euler euler
Definition: CAN_comm.h:254
int16_t qe2b1
Definition: CAN_comm.h:68
uint32_t hdwStatus
Definition: CAN_comm.h:40
int16_t qn2b2
Definition: CAN_comm.h:59
uint32_t cnoMean
Definition: CAN_comm.h:226
int16_t theta3
Definition: CAN_comm.h:50
struct PACKED is_can_ins_status
PUSH_PACK_1 struct PACKED is_can_time
is_can_dual_imu_px dimupx
Definition: CAN_comm.h:271
int16_t headingToBase
Definition: CAN_comm.h:238
double lon
Definition: CAN_comm.h:105
int16_t uvw1
Definition: CAN_comm.h:78
int16_t qn2b4
Definition: CAN_comm.h:61
int16_t theta2
Definition: CAN_comm.h:49
is_can_ecef_x ecefx
Definition: CAN_comm.h:264
int16_t ve3
Definition: CAN_comm.h:89
uint32_t status
Definition: CAN_comm.h:114
is_can_dual_imu_qy dimuqy
Definition: CAN_comm.h:272
float alt
Definition: CAN_comm.h:112
struct PACKED is_can_preint_imu_px
is_can_roll_rollRate rollrollrate
Definition: CAN_comm.h:276
struct PACKED is_can_ve
int16_t insRoll
Definition: CAN_comm.h:244
int16_t vel1
Definition: CAN_comm.h:181
uint16_t dt
Definition: CAN_comm.h:174
uint32_t insStatus
Definition: CAN_comm.h:37
is_can_ins_lon lon
Definition: CAN_comm.h:260
int16_t pImu2
Definition: CAN_comm.h:246
is_can_preint_imu_qy pimuqy
Definition: CAN_comm.h:269
is_can_ins_quate2b quate2b
Definition: CAN_comm.h:256
#define POP_PACK
Definition: ISConstants.h:234
is_can_gps1_pos_status gpspos
Definition: CAN_comm.h:274
struct PACKED is_can_dual_imu_rz
is_can_down down
Definition: CAN_comm.h:263
is_can_north_east ne
Definition: CAN_comm.h:262
struct PACKED is_can_gps1_pos_status
is_can_ins_status insstatus
Definition: CAN_comm.h:253
struct PACKED is_can_dual_imu_qy
struct PACKED is_can_down
is_can_ins_alt alt
Definition: CAN_comm.h:261
struct PACKED is_can_dual_imu_px
is_can_ins_quatn2b quatn2b
Definition: CAN_comm.h:255
struct PACKED is_can_preint_imu_qy
int16_t ve2
Definition: CAN_comm.h:88
struct PACKED is_can_ecef_y
is_can_time time
Definition: CAN_comm.h:252
int16_t qe2b3
Definition: CAN_comm.h:70
uint8_t differentialAge
Definition: CAN_comm.h:234
float distanceToBase
Definition: CAN_comm.h:236
int16_t pImu1
Definition: CAN_comm.h:245
is_can_preint_imu_rz pimurz
Definition: CAN_comm.h:270
is_can_preint_imu_px pimupx
Definition: CAN_comm.h:268
struct PACKED is_can_ins_euler
int16_t uvw2
Definition: CAN_comm.h:79


inertial_sense_ros
Author(s):
autogenerated on Sun Feb 28 2021 03:17:08