MIP_SDK  latest-2-g34f3e39
MicroStrain Communications Library for embedded systems
data_sensor.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 
6 
7 
9 
10 namespace mip::metadata
11 {
12 
13 
14 template<>
15 struct MetadataFor<data_sensor::RawAccel>
16 {
18 
19  static constexpr inline ParameterInfo parameters[] = {
20  {
21  /* .name = */ "raw_accel",
22  /* .docs = */ "Native sensor counts",
24  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::raw_accel>,
25  /* .attributes = */ {true, false, false, false, false},
26  /* .count = */ 1,
27  /* .condition = */ {},
28  },
29  };
30 
31  static constexpr inline FieldInfo value = {
32  /* .name = */ "data_sensor::RawAccel",
33  /* .title = */ "raw_accel",
34  /* .docs = */ "Three element vector representing the sensed acceleration.\nThis quantity is temperature compensated and expressed in the sensor body frame.",
35  /* .parameters = */ parameters,
36  /* .descriptor = */ type::DESCRIPTOR,
37  /* .functions = */ NO_FUNCTIONS,
38  /* .response = */ nullptr,
39  };
40 };
41 
42 template<>
43 struct MetadataFor<data_sensor::RawGyro>
44 {
46 
47  static constexpr inline ParameterInfo parameters[] = {
48  {
49  /* .name = */ "raw_gyro",
50  /* .docs = */ "Native sensor counts",
52  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::raw_gyro>,
53  /* .attributes = */ {true, false, false, false, false},
54  /* .count = */ 1,
55  /* .condition = */ {},
56  },
57  };
58 
59  static constexpr inline FieldInfo value = {
60  /* .name = */ "data_sensor::RawGyro",
61  /* .title = */ "raw_gyro",
62  /* .docs = */ "Three element vector representing the sensed angular rate.\nThis quantity is temperature compensated and expressed in the sensor body frame.",
63  /* .parameters = */ parameters,
64  /* .descriptor = */ type::DESCRIPTOR,
65  /* .functions = */ NO_FUNCTIONS,
66  /* .response = */ nullptr,
67  };
68 };
69 
70 template<>
71 struct MetadataFor<data_sensor::RawMag>
72 {
74 
75  static constexpr inline ParameterInfo parameters[] = {
76  {
77  /* .name = */ "raw_mag",
78  /* .docs = */ "Native sensor counts",
80  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::raw_mag>,
81  /* .attributes = */ {true, false, false, false, false},
82  /* .count = */ 1,
83  /* .condition = */ {},
84  },
85  };
86 
87  static constexpr inline FieldInfo value = {
88  /* .name = */ "data_sensor::RawMag",
89  /* .title = */ "raw_mag",
90  /* .docs = */ "Three element vector representing the sensed magnetic field.\nThis quantity is temperature compensated and expressed in the vehicle frame.",
91  /* .parameters = */ parameters,
92  /* .descriptor = */ type::DESCRIPTOR,
93  /* .functions = */ NO_FUNCTIONS,
94  /* .response = */ nullptr,
95  };
96 };
97 
98 template<>
99 struct MetadataFor<data_sensor::RawPressure>
100 {
102 
103  static constexpr inline ParameterInfo parameters[] = {
104  {
105  /* .name = */ "raw_pressure",
106  /* .docs = */ "Native sensor counts",
107  /* .type = */ {Type::FLOAT, nullptr},
108  /* .accessor = */ nullptr, //utils::access<type, float, &type::raw_pressure>,
109  /* .attributes = */ {true, false, false, false, false},
110  /* .count = */ 1,
111  /* .condition = */ {},
112  },
113  };
114 
115  static constexpr inline FieldInfo value = {
116  /* .name = */ "data_sensor::RawPressure",
117  /* .title = */ "raw_pressure",
118  /* .docs = */ "Scalar value representing the sensed ambient pressure.\nThis quantity is temperature compensated.",
119  /* .parameters = */ parameters,
120  /* .descriptor = */ type::DESCRIPTOR,
121  /* .functions = */ NO_FUNCTIONS,
122  /* .response = */ nullptr,
123  };
124 };
125 
126 template<>
127 struct MetadataFor<data_sensor::ScaledAccel>
128 {
130 
131  static constexpr inline ParameterInfo parameters[] = {
132  {
133  /* .name = */ "scaled_accel",
134  /* .docs = */ "(x, y, z)[g]",
135  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
136  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::scaled_accel>,
137  /* .attributes = */ {true, false, false, false, false},
138  /* .count = */ 1,
139  /* .condition = */ {},
140  },
141  };
142 
143  static constexpr inline FieldInfo value = {
144  /* .name = */ "data_sensor::ScaledAccel",
145  /* .title = */ "scaled_accel",
146  /* .docs = */ "3-element vector representing the sensed acceleration.\nThis quantity is temperature compensated and expressed in the vehicle frame.",
147  /* .parameters = */ parameters,
148  /* .descriptor = */ type::DESCRIPTOR,
149  /* .functions = */ NO_FUNCTIONS,
150  /* .response = */ nullptr,
151  };
152 };
153 
154 template<>
155 struct MetadataFor<data_sensor::ScaledGyro>
156 {
158 
159  static constexpr inline ParameterInfo parameters[] = {
160  {
161  /* .name = */ "scaled_gyro",
162  /* .docs = */ "(x, y, z) [radians/second]",
163  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
164  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::scaled_gyro>,
165  /* .attributes = */ {true, false, false, false, false},
166  /* .count = */ 1,
167  /* .condition = */ {},
168  },
169  };
170 
171  static constexpr inline FieldInfo value = {
172  /* .name = */ "data_sensor::ScaledGyro",
173  /* .title = */ "scaled_gyro",
174  /* .docs = */ "3-element vector representing the sensed angular rate.\nThis quantity is temperature compensated and expressed in the vehicle frame.",
175  /* .parameters = */ parameters,
176  /* .descriptor = */ type::DESCRIPTOR,
177  /* .functions = */ NO_FUNCTIONS,
178  /* .response = */ nullptr,
179  };
180 };
181 
182 template<>
183 struct MetadataFor<data_sensor::ScaledMag>
184 {
186 
187  static constexpr inline ParameterInfo parameters[] = {
188  {
189  /* .name = */ "scaled_mag",
190  /* .docs = */ "(x, y, z) [Gauss]",
191  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
192  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::scaled_mag>,
193  /* .attributes = */ {true, false, false, false, false},
194  /* .count = */ 1,
195  /* .condition = */ {},
196  },
197  };
198 
199  static constexpr inline FieldInfo value = {
200  /* .name = */ "data_sensor::ScaledMag",
201  /* .title = */ "scaled_mag",
202  /* .docs = */ "3-element vector representing the sensed magnetic field.\nThis quantity is temperature compensated and expressed in the vehicle frame.",
203  /* .parameters = */ parameters,
204  /* .descriptor = */ type::DESCRIPTOR,
205  /* .functions = */ NO_FUNCTIONS,
206  /* .response = */ nullptr,
207  };
208 };
209 
210 template<>
211 struct MetadataFor<data_sensor::ScaledPressure>
212 {
214 
215  static constexpr inline ParameterInfo parameters[] = {
216  {
217  /* .name = */ "scaled_pressure",
218  /* .docs = */ "[mBar]",
219  /* .type = */ {Type::FLOAT, nullptr},
220  /* .accessor = */ nullptr, //utils::access<type, float, &type::scaled_pressure>,
221  /* .attributes = */ {true, false, false, false, false},
222  /* .count = */ 1,
223  /* .condition = */ {},
224  },
225  };
226 
227  static constexpr inline FieldInfo value = {
228  /* .name = */ "data_sensor::ScaledPressure",
229  /* .title = */ "scaled_pressure",
230  /* .docs = */ "Scalar value representing the sensed ambient pressure.",
231  /* .parameters = */ parameters,
232  /* .descriptor = */ type::DESCRIPTOR,
233  /* .functions = */ NO_FUNCTIONS,
234  /* .response = */ nullptr,
235  };
236 };
237 
238 template<>
239 struct MetadataFor<data_sensor::DeltaTheta>
240 {
242 
243  static constexpr inline ParameterInfo parameters[] = {
244  {
245  /* .name = */ "delta_theta",
246  /* .docs = */ "(x, y, z) [radians]",
247  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
248  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::delta_theta>,
249  /* .attributes = */ {true, false, false, false, false},
250  /* .count = */ 1,
251  /* .condition = */ {},
252  },
253  };
254 
255  static constexpr inline FieldInfo value = {
256  /* .name = */ "data_sensor::DeltaTheta",
257  /* .title = */ "delta_theta",
258  /* .docs = */ "3-element vector representing the time integral of angular rate.\nThis quantity is the integral of sensed angular rate over the period set by the IMU message format. It is expressed in the vehicle frame.",
259  /* .parameters = */ parameters,
260  /* .descriptor = */ type::DESCRIPTOR,
261  /* .functions = */ NO_FUNCTIONS,
262  /* .response = */ nullptr,
263  };
264 };
265 
266 template<>
267 struct MetadataFor<data_sensor::DeltaVelocity>
268 {
270 
271  static constexpr inline ParameterInfo parameters[] = {
272  {
273  /* .name = */ "delta_velocity",
274  /* .docs = */ "(x, y, z) [g*sec]",
275  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
276  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::delta_velocity>,
277  /* .attributes = */ {true, false, false, false, false},
278  /* .count = */ 1,
279  /* .condition = */ {},
280  },
281  };
282 
283  static constexpr inline FieldInfo value = {
284  /* .name = */ "data_sensor::DeltaVelocity",
285  /* .title = */ "delta_velocity",
286  /* .docs = */ "3-element vector representing the time integral of acceleration.\nThis quantity is the integral of sensed acceleration over the period set by the IMU message format. It is expressed in the vehicle frame.",
287  /* .parameters = */ parameters,
288  /* .descriptor = */ type::DESCRIPTOR,
289  /* .functions = */ NO_FUNCTIONS,
290  /* .response = */ nullptr,
291  };
292 };
293 
294 template<>
295 struct MetadataFor<data_sensor::CompOrientationMatrix>
296 {
298 
299  static constexpr inline ParameterInfo parameters[] = {
300  {
301  /* .name = */ "m",
302  /* .docs = */ "Matrix elements in row-major order.",
303  /* .type = */ {Type::STRUCT, &MetadataFor<Matrix3f>::value},
304  /* .accessor = */ nullptr, //utils::access<type, Matrix3f, &type::m>,
305  /* .attributes = */ {true, false, false, false, false},
306  /* .count = */ 1,
307  /* .condition = */ {},
308  },
309  };
310 
311  static constexpr inline FieldInfo value = {
312  /* .name = */ "data_sensor::CompOrientationMatrix",
313  /* .title = */ "Complementary Filter Orientation Matrix",
314  /* .docs = */ "3x3 Direction Cosine Matrix EQSTART M_{ned}^{veh} EQEND describing the orientation of the device with respect to the NED local-level frame.\nThis matrix satisfies the following relationship:\n\nEQSTART v^{veh} = M_{ned}^{veh} v^{ned} EQEND<br/>\n\nWhere:<br/>\n\nEQSTART v^{ned} EQEND is a 3-element vector expressed in the NED frame. <br/>\nEQSTART v^{veh} EQEND is the same 3-element vector expressed in the vehicle frame. <br/>\n<br/>\nThe matrix elements are stored is row-major order: EQSTART M = \\begin{bmatrix} M_{11}, M_{12}, M_{13}, M_{21}, M_{22}, M_{23}, M_{31}, M_{32}, M_{33} \\end{bmatrix} EQEND",
315  /* .parameters = */ parameters,
316  /* .descriptor = */ type::DESCRIPTOR,
317  /* .functions = */ NO_FUNCTIONS,
318  /* .response = */ nullptr,
319  };
320 };
321 
322 template<>
323 struct MetadataFor<data_sensor::CompQuaternion>
324 {
326 
327  static constexpr inline ParameterInfo parameters[] = {
328  {
329  /* .name = */ "q",
330  /* .docs = */ "Quaternion elements EQSTART q = (q_w, q_x, q_y, q_z) EQEND",
331  /* .type = */ {Type::STRUCT, &MetadataFor<Quatf>::value},
332  /* .accessor = */ nullptr, //utils::access<type, Quatf, &type::q>,
333  /* .attributes = */ {true, false, false, false, false},
334  /* .count = */ 1,
335  /* .condition = */ {},
336  },
337  };
338 
339  static constexpr inline FieldInfo value = {
340  /* .name = */ "data_sensor::CompQuaternion",
341  /* .title = */ "Complementary Filter Quaternion",
342  /* .docs = */ "4x1 vector representation of the quaternion describing the orientation of the device with respect to the NED local-level frame.\nThis quaternion satisfies the following relationship:\n\nEQSTART p^{veh} = q^{-1} p^{ned} q EQEND<br/>\n\nWhere:<br/>\nEQSTART q = (q_w, q_x, q_y, q_z) EQEND is the quaternion describing the rotation. <br/>\nEQSTART p^ned = (0, v^{ned}_x, v^{ned}_y, v^{ned}_z) EQEND and EQSTART v^{ned} EQEND is a 3-element vector expressed in the NED frame.<br/>\nEQSTART p^veh = (0, v^{veh}_x, v^{veh}_y, v^{veh}_z) EQEND and EQSTART v^{veh} EQEND is a 3-element vector expressed in the vehicle frame.<br/>",
343  /* .parameters = */ parameters,
344  /* .descriptor = */ type::DESCRIPTOR,
345  /* .functions = */ NO_FUNCTIONS,
346  /* .response = */ nullptr,
347  };
348 };
349 
350 template<>
351 struct MetadataFor<data_sensor::CompEulerAngles>
352 {
354 
355  static constexpr inline ParameterInfo parameters[] = {
356  {
357  /* .name = */ "roll",
358  /* .docs = */ "[radians]",
359  /* .type = */ {Type::FLOAT, nullptr},
360  /* .accessor = */ nullptr, //utils::access<type, float, &type::roll>,
361  /* .attributes = */ {true, false, false, false, false},
362  /* .count = */ 1,
363  /* .condition = */ {},
364  },
365  {
366  /* .name = */ "pitch",
367  /* .docs = */ "[radians]",
368  /* .type = */ {Type::FLOAT, nullptr},
369  /* .accessor = */ nullptr, //utils::access<type, float, &type::pitch>,
370  /* .attributes = */ {true, false, false, false, false},
371  /* .count = */ 1,
372  /* .condition = */ {},
373  },
374  {
375  /* .name = */ "yaw",
376  /* .docs = */ "[radians]",
377  /* .type = */ {Type::FLOAT, nullptr},
378  /* .accessor = */ nullptr, //utils::access<type, float, &type::yaw>,
379  /* .attributes = */ {true, false, false, false, false},
380  /* .count = */ 1,
381  /* .condition = */ {},
382  },
383  };
384 
385  static constexpr inline FieldInfo value = {
386  /* .name = */ "data_sensor::CompEulerAngles",
387  /* .title = */ "Complementary Filter Euler Angles",
388  /* .docs = */ "Euler angles describing the orientation of the device with respect to the NED local-level frame.\nThe Euler angles are reported in 3-2-1 (Yaw-Pitch-Roll, AKA Aircraft) order.",
389  /* .parameters = */ parameters,
390  /* .descriptor = */ type::DESCRIPTOR,
391  /* .functions = */ NO_FUNCTIONS,
392  /* .response = */ nullptr,
393  };
394 };
395 
396 template<>
397 struct MetadataFor<data_sensor::CompOrientationUpdateMatrix>
398 {
400 
401  static constexpr inline ParameterInfo parameters[] = {
402  {
403  /* .name = */ "m",
404  /* .docs = */ "",
405  /* .type = */ {Type::STRUCT, &MetadataFor<Matrix3f>::value},
406  /* .accessor = */ nullptr, //utils::access<type, Matrix3f, &type::m>,
407  /* .attributes = */ {true, false, false, false, false},
408  /* .count = */ 1,
409  /* .condition = */ {},
410  },
411  };
412 
413  static constexpr inline FieldInfo value = {
414  /* .name = */ "data_sensor::CompOrientationUpdateMatrix",
415  /* .title = */ "Complementary Filter Orientation Update Matrix",
416  /* .docs = */ "DEPRECATED!",
417  /* .parameters = */ parameters,
418  /* .descriptor = */ type::DESCRIPTOR,
419  /* .functions = */ NO_FUNCTIONS,
420  /* .response = */ nullptr,
421  };
422 };
423 
424 template<>
425 struct MetadataFor<data_sensor::OrientationRawTemp>
426 {
428 
429  static constexpr inline ParameterInfo parameters[] = {
430  {
431  /* .name = */ "raw_temp",
432  /* .docs = */ "",
433  /* .type = */ {Type::U16, nullptr},
434  /* .accessor = */ nullptr, //utils::access<type, uint16_t, &type::raw_temp>,
435  /* .attributes = */ {true, false, false, false, false},
436  /* .count = */ 4,
437  /* .condition = */ {},
438  },
439  };
440 
441  static constexpr inline FieldInfo value = {
442  /* .name = */ "data_sensor::OrientationRawTemp",
443  /* .title = */ "orientation_raw_temp",
444  /* .docs = */ "DEPRECATED!",
445  /* .parameters = */ parameters,
446  /* .descriptor = */ type::DESCRIPTOR,
447  /* .functions = */ NO_FUNCTIONS,
448  /* .response = */ nullptr,
449  };
450 };
451 
452 template<>
453 struct MetadataFor<data_sensor::InternalTimestamp>
454 {
456 
457  static constexpr inline ParameterInfo parameters[] = {
458  {
459  /* .name = */ "counts",
460  /* .docs = */ "",
461  /* .type = */ {Type::U32, nullptr},
462  /* .accessor = */ nullptr, //utils::access<type, uint32_t, &type::counts>,
463  /* .attributes = */ {true, false, false, false, false},
464  /* .count = */ 1,
465  /* .condition = */ {},
466  },
467  };
468 
469  static constexpr inline FieldInfo value = {
470  /* .name = */ "data_sensor::InternalTimestamp",
471  /* .title = */ "internal_timestamp",
472  /* .docs = */ "DEPRECATED!",
473  /* .parameters = */ parameters,
474  /* .descriptor = */ type::DESCRIPTOR,
475  /* .functions = */ NO_FUNCTIONS,
476  /* .response = */ nullptr,
477  };
478 };
479 
480 template<>
481 struct MetadataFor<data_sensor::PpsTimestamp>
482 {
484 
485  static constexpr inline ParameterInfo parameters[] = {
486  {
487  /* .name = */ "seconds",
488  /* .docs = */ "",
489  /* .type = */ {Type::U32, nullptr},
490  /* .accessor = */ nullptr, //utils::access<type, uint32_t, &type::seconds>,
491  /* .attributes = */ {true, false, false, false, false},
492  /* .count = */ 1,
493  /* .condition = */ {},
494  },
495  {
496  /* .name = */ "useconds",
497  /* .docs = */ "",
498  /* .type = */ {Type::U32, nullptr},
499  /* .accessor = */ nullptr, //utils::access<type, uint32_t, &type::useconds>,
500  /* .attributes = */ {true, false, false, false, false},
501  /* .count = */ 1,
502  /* .condition = */ {},
503  },
504  };
505 
506  static constexpr inline FieldInfo value = {
507  /* .name = */ "data_sensor::PpsTimestamp",
508  /* .title = */ "PPS Timestamp",
509  /* .docs = */ "DEPRECATED!",
510  /* .parameters = */ parameters,
511  /* .descriptor = */ type::DESCRIPTOR,
512  /* .functions = */ NO_FUNCTIONS,
513  /* .response = */ nullptr,
514  };
515 };
516 
517 template<>
518 struct MetadataFor<data_sensor::GpsTimestamp::ValidFlags>
519 {
521 
522  static constexpr inline BitfieldInfo::Entry entries[] = {
523  { uint32_t(1), "pps_valid", "True when the PPS signal is present." },
524  { uint32_t(2), "time_refresh", "Toggles each time the time is updated via internal GPS or the GPS Time Update command (0x01, 0x72)." },
525  { uint32_t(4), "time_initialized", "True if the time has ever been set." },
526  { uint32_t(8), "tow_valid", "True if the time of week is valid." },
527  { uint32_t(16), "week_number_valid", "True if the week number is valid." },
528  };
529 
530  static constexpr inline BitfieldInfo value = {
531  /* .name = */ "ValidFlags",
532  /* .docs = */ "",
533  /* .type = */ Type::U16,
534  /* .entries = */ entries,
535  };
536 
537 };
538 
539 template<>
540 struct MetadataFor<data_sensor::GpsTimestamp>
541 {
543 
544  static constexpr inline ParameterInfo parameters[] = {
545  {
546  /* .name = */ "tow",
547  /* .docs = */ "GPS Time of Week [seconds]",
548  /* .type = */ {Type::DOUBLE, nullptr},
549  /* .accessor = */ nullptr, //utils::access<type, double, &type::tow>,
550  /* .attributes = */ {true, false, false, false, false},
551  /* .count = */ 1,
552  /* .condition = */ {},
553  },
554  {
555  /* .name = */ "week_number",
556  /* .docs = */ "GPS Week Number since 1980 [weeks]",
557  /* .type = */ {Type::U16, nullptr},
558  /* .accessor = */ nullptr, //utils::access<type, uint16_t, &type::week_number>,
559  /* .attributes = */ {true, false, false, false, false},
560  /* .count = */ 1,
561  /* .condition = */ {},
562  },
563  {
564  /* .name = */ "valid_flags",
565  /* .docs = */ "",
567  /* .accessor = */ nullptr, //utils::access<type, data_sensor::GpsTimestamp::ValidFlags, &type::valid_flags>,
568  /* .attributes = */ {true, false, false, false, false},
569  /* .count = */ 1,
570  /* .condition = */ {},
571  },
572  };
573 
574  static constexpr inline FieldInfo value = {
575  /* .name = */ "data_sensor::GpsTimestamp",
576  /* .title = */ "gps_timestamp",
577  /* .docs = */ "GPS timestamp of the SENSOR data\n\nShould the PPS become unavailable, the device will revert to its internal clock, which will cause the reported time to drift from true GPS time.\nUpon recovering from a PPS outage, the user should expect a jump in the reported GPS time due to the accumulation of internal clock error.\nIf synchronization to an external clock or onboard GNSS receiver (for products that have one) is disabled, this time is equivalent to internal system time.\n\nNote: this data field may be deprecated in the future. The more flexible shared data field (0x80, 0xD3) should be used instead.",
578  /* .parameters = */ parameters,
579  /* .descriptor = */ type::DESCRIPTOR,
580  /* .functions = */ NO_FUNCTIONS,
581  /* .response = */ nullptr,
582  };
583 };
584 
585 template<>
586 struct MetadataFor<data_sensor::TemperatureAbs>
587 {
589 
590  static constexpr inline ParameterInfo parameters[] = {
591  {
592  /* .name = */ "min_temp",
593  /* .docs = */ "[degC]",
594  /* .type = */ {Type::FLOAT, nullptr},
595  /* .accessor = */ nullptr, //utils::access<type, float, &type::min_temp>,
596  /* .attributes = */ {true, false, false, false, false},
597  /* .count = */ 1,
598  /* .condition = */ {},
599  },
600  {
601  /* .name = */ "max_temp",
602  /* .docs = */ "[degC]",
603  /* .type = */ {Type::FLOAT, nullptr},
604  /* .accessor = */ nullptr, //utils::access<type, float, &type::max_temp>,
605  /* .attributes = */ {true, false, false, false, false},
606  /* .count = */ 1,
607  /* .condition = */ {},
608  },
609  {
610  /* .name = */ "mean_temp",
611  /* .docs = */ "[degC]",
612  /* .type = */ {Type::FLOAT, nullptr},
613  /* .accessor = */ nullptr, //utils::access<type, float, &type::mean_temp>,
614  /* .attributes = */ {true, false, false, false, false},
615  /* .count = */ 1,
616  /* .condition = */ {},
617  },
618  };
619 
620  static constexpr inline FieldInfo value = {
621  /* .name = */ "data_sensor::TemperatureAbs",
622  /* .title = */ "Temperature Statistics",
623  /* .docs = */ "SENSOR reported temperature statistics\n\nTemperature may originate from the MEMS sensors, or be calculated in combination with board temperature sensors.\nAll quantities are calculated with respect to the last power on or reset, whichever is later.\n",
624  /* .parameters = */ parameters,
625  /* .descriptor = */ type::DESCRIPTOR,
626  /* .functions = */ NO_FUNCTIONS,
627  /* .response = */ nullptr,
628  };
629 };
630 
631 template<>
632 struct MetadataFor<data_sensor::UpVector>
633 {
635 
636  static constexpr inline ParameterInfo parameters[] = {
637  {
638  /* .name = */ "up",
639  /* .docs = */ "[Gs]",
640  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
641  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::up>,
642  /* .attributes = */ {true, false, false, false, false},
643  /* .count = */ 1,
644  /* .condition = */ {},
645  },
646  };
647 
648  static constexpr inline FieldInfo value = {
649  /* .name = */ "data_sensor::UpVector",
650  /* .title = */ "up_vector",
651  /* .docs = */ "Gyro-stabilized 3-element vector representing the complementary filter's estimated vertical direction.\nThis quantity is expressed in the vehicle frame.\n\nThis quantity is sensitive to non-gravitational accelerations, which may cause notable deviations from the true vertical direction.\n\nFor legacy reasons, this vector is the inverse of the gravity vector.\n",
652  /* .parameters = */ parameters,
653  /* .descriptor = */ type::DESCRIPTOR,
654  /* .functions = */ NO_FUNCTIONS,
655  /* .response = */ nullptr,
656  };
657 };
658 
659 template<>
660 struct MetadataFor<data_sensor::NorthVector>
661 {
663 
664  static constexpr inline ParameterInfo parameters[] = {
665  {
666  /* .name = */ "north",
667  /* .docs = */ "[Gauss]",
668  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
669  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::north>,
670  /* .attributes = */ {true, false, false, false, false},
671  /* .count = */ 1,
672  /* .condition = */ {},
673  },
674  };
675 
676  static constexpr inline FieldInfo value = {
677  /* .name = */ "data_sensor::NorthVector",
678  /* .title = */ "north_vector",
679  /* .docs = */ "Gyro-stabilized 3-element vector representing the complementary filter's estimate of magnetic north.\nThis quantity is expressed in the vehicle frame.\n\nThis quantity is sensitive to local magnetic field perturbations, which may cause notable deviations from true magnetic north.",
680  /* .parameters = */ parameters,
681  /* .descriptor = */ type::DESCRIPTOR,
682  /* .functions = */ NO_FUNCTIONS,
683  /* .response = */ nullptr,
684  };
685 };
686 
687 template<>
688 struct MetadataFor<data_sensor::OverrangeStatus::Status>
689 {
691 
692  static constexpr inline BitfieldInfo::Entry entries[] = {
693  { uint32_t(1), "accel_x", "" },
694  { uint32_t(2), "accel_y", "" },
695  { uint32_t(4), "accel_z", "" },
696  { uint32_t(16), "gyro_x", "" },
697  { uint32_t(32), "gyro_y", "" },
698  { uint32_t(64), "gyro_z", "" },
699  { uint32_t(256), "mag_x", "" },
700  { uint32_t(512), "mag_y", "" },
701  { uint32_t(1024), "mag_z", "" },
702  { uint32_t(4096), "press", "" },
703  };
704 
705  static constexpr inline BitfieldInfo value = {
706  /* .name = */ "Status",
707  /* .docs = */ "",
708  /* .type = */ Type::U16,
709  /* .entries = */ entries,
710  };
711 
712 };
713 
714 template<>
715 struct MetadataFor<data_sensor::OverrangeStatus>
716 {
718 
719  static constexpr inline ParameterInfo parameters[] = {
720  {
721  /* .name = */ "status",
722  /* .docs = */ "",
724  /* .accessor = */ nullptr, //utils::access<type, data_sensor::OverrangeStatus::Status, &type::status>,
725  /* .attributes = */ {true, false, false, false, false},
726  /* .count = */ 1,
727  /* .condition = */ {},
728  },
729  };
730 
731  static constexpr inline FieldInfo value = {
732  /* .name = */ "data_sensor::OverrangeStatus",
733  /* .title = */ "overrange_status",
734  /* .docs = */ "",
735  /* .parameters = */ parameters,
736  /* .descriptor = */ type::DESCRIPTOR,
737  /* .functions = */ NO_FUNCTIONS,
738  /* .response = */ nullptr,
739  };
740 };
741 
742 template<>
743 struct MetadataFor<data_sensor::OdometerData>
744 {
746 
747  static constexpr inline ParameterInfo parameters[] = {
748  {
749  /* .name = */ "speed",
750  /* .docs = */ "Average speed over the time interval [m/s]. Can be negative for quadrature encoders.",
751  /* .type = */ {Type::FLOAT, nullptr},
752  /* .accessor = */ nullptr, //utils::access<type, float, &type::speed>,
753  /* .attributes = */ {true, false, false, false, false},
754  /* .count = */ 1,
755  /* .condition = */ {},
756  },
757  {
758  /* .name = */ "uncertainty",
759  /* .docs = */ "Uncertainty of velocity [m/s].",
760  /* .type = */ {Type::FLOAT, nullptr},
761  /* .accessor = */ nullptr, //utils::access<type, float, &type::uncertainty>,
762  /* .attributes = */ {true, false, false, false, false},
763  /* .count = */ 1,
764  /* .condition = */ {},
765  },
766  {
767  /* .name = */ "valid_flags",
768  /* .docs = */ "If odometer is configured, bit 0 will be set to 1.",
769  /* .type = */ {Type::U16, nullptr},
770  /* .accessor = */ nullptr, //utils::access<type, uint16_t, &type::valid_flags>,
771  /* .attributes = */ {true, false, false, false, false},
772  /* .count = */ 1,
773  /* .condition = */ {},
774  },
775  };
776 
777  static constexpr inline FieldInfo value = {
778  /* .name = */ "data_sensor::OdometerData",
779  /* .title = */ "odometer_data",
780  /* .docs = */ "",
781  /* .parameters = */ parameters,
782  /* .descriptor = */ type::DESCRIPTOR,
783  /* .functions = */ NO_FUNCTIONS,
784  /* .response = */ nullptr,
785  };
786 };
787 
788 
789 static constexpr inline const FieldInfo* DATA_SENSOR_FIELDS[] = {
813 };
814 
815 static constexpr DescriptorSetInfo DATA_SENSOR = {
816  /*.descriptor =*/ mip::data_sensor::DESCRIPTOR_SET,
817  /*.name =*/ "Sensor Data",
818  /*.fields =*/ DATA_SENSOR_FIELDS,
819 };
820 
821 } // namespace mip::metadata
822 
mip::metadata::MetadataFor< data_sensor::RawGyro >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:59
mip::data_sensor::OrientationRawTemp
Definition: data_sensor.hpp:625
mip::data_sensor::OdometerData
Definition: data_sensor.hpp:1030
mip::metadata::BitfieldInfo
Definition: mip_structures.hpp:91
mip::metadata
Definition: commands_3dm.hpp:10
mip::metadata::MetadataFor< data_sensor::ScaledAccel >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:143
mip::data_sensor::RawGyro
Definition: data_sensor.hpp:116
mip::metadata::MetadataFor< data_sensor::ScaledGyro >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:171
mip::metadata::MetadataFor< data_sensor::RawPressure >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:115
mip::data_sensor::ScaledAccel
Definition: data_sensor.hpp:230
mip::metadata::MetadataFor< data_sensor::CompQuaternion >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:339
mip::data_sensor::CompEulerAngles
Definition: data_sensor.hpp:549
mip::metadata::MetadataFor< data_sensor::TemperatureAbs >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:620
mip::data_sensor::ScaledGyro
Definition: data_sensor.hpp:268
mip::metadata::Type::U16
@ U16
mip::metadata::MetadataFor
Definition: mip_metadata.hpp:15
mip::data_sensor::InternalTimestamp
Definition: data_sensor.hpp:662
mip::metadata::MetadataFor< data_sensor::ScaledMag >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:199
mip::metadata::Type::STRUCT
@ STRUCT
mip::data_sensor::RawAccel
Definition: data_sensor.hpp:78
mip::metadata::MetadataFor< data_sensor::NorthVector >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:676
mip::data_sensor::OverrangeStatus::Status
Definition: data_sensor.hpp:945
mip::metadata::MetadataFor< data_sensor::CompEulerAngles >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:385
mip::data_sensor::PpsTimestamp
Definition: data_sensor.hpp:699
mip::data_sensor::ScaledPressure
Definition: data_sensor.hpp:343
mip::metadata::Type::DOUBLE
@ DOUBLE
mip::metadata::ParameterInfo
Definition: mip_structures.hpp:161
mip::metadata::EnumInfo::Entry
Definition: mip_structures.hpp:67
mip::data_sensor::OverrangeStatus
Definition: data_sensor.hpp:943
mip::data_sensor::GpsTimestamp::ValidFlags
Definition: data_sensor.hpp:745
mip_metadata.hpp
mip::data_sensor::CompOrientationMatrix
Definition: data_sensor.hpp:466
mip::data_sensor::RawMag
Definition: data_sensor.hpp:154
mip::data_sensor::DESCRIPTOR_SET
@ DESCRIPTOR_SET
Definition: data_sensor.hpp:31
mip::data_sensor::ScaledMag
Definition: data_sensor.hpp:306
mip::metadata::MetadataFor< data_sensor::InternalTimestamp >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:469
mip::metadata::Type::FLOAT
@ FLOAT
mip::data_sensor::UpVector
Definition: data_sensor.hpp:867
mip::metadata::MetadataFor< data_sensor::CompOrientationUpdateMatrix >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:413
mip::metadata::MetadataFor< data_sensor::RawMag >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:87
mip::data_sensor::CompOrientationUpdateMatrix
Definition: data_sensor.hpp:588
mip::data_sensor::RawPressure
Definition: data_sensor.hpp:192
mip::data_sensor::DeltaVelocity
Definition: data_sensor.hpp:419
mip::data_sensor::TemperatureAbs
Definition: data_sensor.hpp:822
mip::metadata::MetadataFor< data_sensor::OdometerData >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:777
mip::data_sensor::NorthVector
Definition: data_sensor.hpp:907
mip::metadata::MetadataFor< data_sensor::GpsTimestamp >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:574
mip::data_sensor::DeltaTheta
Definition: data_sensor.hpp:381
mip::metadata::FieldInfo
Definition: mip_structures.hpp:216
mip::metadata::MetadataFor< data_sensor::PpsTimestamp >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:506
mip::metadata::MetadataFor< data_sensor::DeltaTheta >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:255
mip::metadata::MetadataFor< data_sensor::CompOrientationMatrix >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:311
mip::metadata::MetadataFor< data_sensor::OverrangeStatus >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:731
mip::metadata::MetadataFor< data_sensor::RawAccel >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:31
mip::metadata::MetadataFor< data_sensor::DeltaVelocity >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:283
mip::data_sensor::GpsTimestamp
Definition: data_sensor.hpp:743
mip::metadata::Type::BITS
@ BITS
mip::metadata::MetadataFor< data_sensor::UpVector >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:648
data_sensor.hpp
mip::metadata::MetadataFor< data_sensor::ScaledPressure >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:227
mip::metadata::MetadataFor< data_sensor::OrientationRawTemp >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:441
common.hpp
mip::metadata::Type::U32
@ U32
mip::data_sensor::CompQuaternion
Definition: data_sensor.hpp:511