MIP_SDK  v3.0.0
MicroStrain Communications Library for embedded systems
data_sensor.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 
6 
8 
9 namespace mip::metadata
10 {
11 
12 
13 template<>
14 struct MetadataFor<data_sensor::RawAccel>
15 {
17 
18  static constexpr inline ParameterInfo parameters[] = {
19  {
20  /* .name = */ "raw_accel",
21  /* .docs = */ "Native sensor counts",
23  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::raw_accel>,
24  /* .attributes = */ {true, false, false, false, false},
25  /* .count = */ 1,
26  /* .condition = */ {},
27  },
28  };
29 
30  static constexpr inline FieldInfo value = {
31  /* .name = */ "data_sensor::RawAccel",
32  /* .title = */ "raw_accel",
33  /* .docs = */ "Three element vector representing the sensed acceleration.\nThis quantity is temperature compensated and expressed in the sensor body frame.",
34  /* .parameters = */ parameters,
35  /* .descriptor = */ type::DESCRIPTOR,
36  /* .functions = */ NO_FUNCTIONS,
37  /* .proprietary = */ false,
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  /* .proprietary = */ false,
67  /* .response = */ nullptr,
68  };
69 };
70 
71 template<>
72 struct MetadataFor<data_sensor::RawMag>
73 {
75 
76  static constexpr inline ParameterInfo parameters[] = {
77  {
78  /* .name = */ "raw_mag",
79  /* .docs = */ "Native sensor counts",
81  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::raw_mag>,
82  /* .attributes = */ {true, false, false, false, false},
83  /* .count = */ 1,
84  /* .condition = */ {},
85  },
86  };
87 
88  static constexpr inline FieldInfo value = {
89  /* .name = */ "data_sensor::RawMag",
90  /* .title = */ "raw_mag",
91  /* .docs = */ "Three element vector representing the sensed magnetic field.\nThis quantity is temperature compensated and expressed in the vehicle frame.",
92  /* .parameters = */ parameters,
93  /* .descriptor = */ type::DESCRIPTOR,
94  /* .functions = */ NO_FUNCTIONS,
95  /* .proprietary = */ false,
96  /* .response = */ nullptr,
97  };
98 };
99 
100 template<>
101 struct MetadataFor<data_sensor::RawPressure>
102 {
104 
105  static constexpr inline ParameterInfo parameters[] = {
106  {
107  /* .name = */ "raw_pressure",
108  /* .docs = */ "Native sensor counts",
109  /* .type = */ {Type::FLOAT, nullptr},
110  /* .accessor = */ nullptr, //utils::access<type, float, &type::raw_pressure>,
111  /* .attributes = */ {true, false, false, false, false},
112  /* .count = */ 1,
113  /* .condition = */ {},
114  },
115  };
116 
117  static constexpr inline FieldInfo value = {
118  /* .name = */ "data_sensor::RawPressure",
119  /* .title = */ "raw_pressure",
120  /* .docs = */ "Scalar value representing the sensed ambient pressure.\nThis quantity is temperature compensated.",
121  /* .parameters = */ parameters,
122  /* .descriptor = */ type::DESCRIPTOR,
123  /* .functions = */ NO_FUNCTIONS,
124  /* .proprietary = */ false,
125  /* .response = */ nullptr,
126  };
127 };
128 
129 template<>
130 struct MetadataFor<data_sensor::ScaledAccel>
131 {
133 
134  static constexpr inline ParameterInfo parameters[] = {
135  {
136  /* .name = */ "scaled_accel",
137  /* .docs = */ "(x, y, z)[g]",
138  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
139  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::scaled_accel>,
140  /* .attributes = */ {true, false, false, false, false},
141  /* .count = */ 1,
142  /* .condition = */ {},
143  },
144  };
145 
146  static constexpr inline FieldInfo value = {
147  /* .name = */ "data_sensor::ScaledAccel",
148  /* .title = */ "scaled_accel",
149  /* .docs = */ "3-element vector representing the sensed acceleration.\nThis quantity is temperature compensated and expressed in the vehicle frame.",
150  /* .parameters = */ parameters,
151  /* .descriptor = */ type::DESCRIPTOR,
152  /* .functions = */ NO_FUNCTIONS,
153  /* .proprietary = */ false,
154  /* .response = */ nullptr,
155  };
156 };
157 
158 template<>
159 struct MetadataFor<data_sensor::ScaledGyro>
160 {
162 
163  static constexpr inline ParameterInfo parameters[] = {
164  {
165  /* .name = */ "scaled_gyro",
166  /* .docs = */ "(x, y, z) [radians/second]",
167  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
168  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::scaled_gyro>,
169  /* .attributes = */ {true, false, false, false, false},
170  /* .count = */ 1,
171  /* .condition = */ {},
172  },
173  };
174 
175  static constexpr inline FieldInfo value = {
176  /* .name = */ "data_sensor::ScaledGyro",
177  /* .title = */ "scaled_gyro",
178  /* .docs = */ "3-element vector representing the sensed angular rate.\nThis quantity is temperature compensated and expressed in the vehicle frame.",
179  /* .parameters = */ parameters,
180  /* .descriptor = */ type::DESCRIPTOR,
181  /* .functions = */ NO_FUNCTIONS,
182  /* .proprietary = */ false,
183  /* .response = */ nullptr,
184  };
185 };
186 
187 template<>
188 struct MetadataFor<data_sensor::ScaledMag>
189 {
191 
192  static constexpr inline ParameterInfo parameters[] = {
193  {
194  /* .name = */ "scaled_mag",
195  /* .docs = */ "(x, y, z) [Gauss]",
196  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
197  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::scaled_mag>,
198  /* .attributes = */ {true, false, false, false, false},
199  /* .count = */ 1,
200  /* .condition = */ {},
201  },
202  };
203 
204  static constexpr inline FieldInfo value = {
205  /* .name = */ "data_sensor::ScaledMag",
206  /* .title = */ "scaled_mag",
207  /* .docs = */ "3-element vector representing the sensed magnetic field.\nThis quantity is temperature compensated and expressed in the vehicle frame.",
208  /* .parameters = */ parameters,
209  /* .descriptor = */ type::DESCRIPTOR,
210  /* .functions = */ NO_FUNCTIONS,
211  /* .proprietary = */ false,
212  /* .response = */ nullptr,
213  };
214 };
215 
216 template<>
217 struct MetadataFor<data_sensor::ScaledPressure>
218 {
220 
221  static constexpr inline ParameterInfo parameters[] = {
222  {
223  /* .name = */ "scaled_pressure",
224  /* .docs = */ "[mBar]",
225  /* .type = */ {Type::FLOAT, nullptr},
226  /* .accessor = */ nullptr, //utils::access<type, float, &type::scaled_pressure>,
227  /* .attributes = */ {true, false, false, false, false},
228  /* .count = */ 1,
229  /* .condition = */ {},
230  },
231  };
232 
233  static constexpr inline FieldInfo value = {
234  /* .name = */ "data_sensor::ScaledPressure",
235  /* .title = */ "scaled_pressure",
236  /* .docs = */ "Scalar value representing the sensed ambient pressure.",
237  /* .parameters = */ parameters,
238  /* .descriptor = */ type::DESCRIPTOR,
239  /* .functions = */ NO_FUNCTIONS,
240  /* .proprietary = */ false,
241  /* .response = */ nullptr,
242  };
243 };
244 
245 template<>
246 struct MetadataFor<data_sensor::DeltaTheta>
247 {
249 
250  static constexpr inline ParameterInfo parameters[] = {
251  {
252  /* .name = */ "delta_theta",
253  /* .docs = */ "(x, y, z) [radians]",
254  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
255  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::delta_theta>,
256  /* .attributes = */ {true, false, false, false, false},
257  /* .count = */ 1,
258  /* .condition = */ {},
259  },
260  };
261 
262  static constexpr inline FieldInfo value = {
263  /* .name = */ "data_sensor::DeltaTheta",
264  /* .title = */ "delta_theta",
265  /* .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.",
266  /* .parameters = */ parameters,
267  /* .descriptor = */ type::DESCRIPTOR,
268  /* .functions = */ NO_FUNCTIONS,
269  /* .proprietary = */ false,
270  /* .response = */ nullptr,
271  };
272 };
273 
274 template<>
275 struct MetadataFor<data_sensor::DeltaVelocity>
276 {
278 
279  static constexpr inline ParameterInfo parameters[] = {
280  {
281  /* .name = */ "delta_velocity",
282  /* .docs = */ "(x, y, z) [g*sec]",
283  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
284  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::delta_velocity>,
285  /* .attributes = */ {true, false, false, false, false},
286  /* .count = */ 1,
287  /* .condition = */ {},
288  },
289  };
290 
291  static constexpr inline FieldInfo value = {
292  /* .name = */ "data_sensor::DeltaVelocity",
293  /* .title = */ "delta_velocity",
294  /* .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.",
295  /* .parameters = */ parameters,
296  /* .descriptor = */ type::DESCRIPTOR,
297  /* .functions = */ NO_FUNCTIONS,
298  /* .proprietary = */ false,
299  /* .response = */ nullptr,
300  };
301 };
302 
303 template<>
304 struct MetadataFor<data_sensor::CompOrientationMatrix>
305 {
307 
308  static constexpr inline ParameterInfo parameters[] = {
309  {
310  /* .name = */ "m",
311  /* .docs = */ "Matrix elements in row-major order.",
312  /* .type = */ {Type::STRUCT, &MetadataFor<Matrix3f>::value},
313  /* .accessor = */ nullptr, //utils::access<type, Matrix3f, &type::m>,
314  /* .attributes = */ {true, false, false, false, false},
315  /* .count = */ 1,
316  /* .condition = */ {},
317  },
318  };
319 
320  static constexpr inline FieldInfo value = {
321  /* .name = */ "data_sensor::CompOrientationMatrix",
322  /* .title = */ "Complementary Filter Orientation Matrix",
323  /* .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",
324  /* .parameters = */ parameters,
325  /* .descriptor = */ type::DESCRIPTOR,
326  /* .functions = */ NO_FUNCTIONS,
327  /* .proprietary = */ false,
328  /* .response = */ nullptr,
329  };
330 };
331 
332 template<>
333 struct MetadataFor<data_sensor::CompQuaternion>
334 {
336 
337  static constexpr inline ParameterInfo parameters[] = {
338  {
339  /* .name = */ "q",
340  /* .docs = */ "Quaternion elements EQSTART q = (q_w, q_x, q_y, q_z) EQEND",
341  /* .type = */ {Type::STRUCT, &MetadataFor<Quatf>::value},
342  /* .accessor = */ nullptr, //utils::access<type, Quatf, &type::q>,
343  /* .attributes = */ {true, false, false, false, false},
344  /* .count = */ 1,
345  /* .condition = */ {},
346  },
347  };
348 
349  static constexpr inline FieldInfo value = {
350  /* .name = */ "data_sensor::CompQuaternion",
351  /* .title = */ "Complementary Filter Quaternion",
352  /* .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/>",
353  /* .parameters = */ parameters,
354  /* .descriptor = */ type::DESCRIPTOR,
355  /* .functions = */ NO_FUNCTIONS,
356  /* .proprietary = */ false,
357  /* .response = */ nullptr,
358  };
359 };
360 
361 template<>
362 struct MetadataFor<data_sensor::CompEulerAngles>
363 {
365 
366  static constexpr inline ParameterInfo parameters[] = {
367  {
368  /* .name = */ "roll",
369  /* .docs = */ "[radians]",
370  /* .type = */ {Type::FLOAT, nullptr},
371  /* .accessor = */ nullptr, //utils::access<type, float, &type::roll>,
372  /* .attributes = */ {true, false, false, false, false},
373  /* .count = */ 1,
374  /* .condition = */ {},
375  },
376  {
377  /* .name = */ "pitch",
378  /* .docs = */ "[radians]",
379  /* .type = */ {Type::FLOAT, nullptr},
380  /* .accessor = */ nullptr, //utils::access<type, float, &type::pitch>,
381  /* .attributes = */ {true, false, false, false, false},
382  /* .count = */ 1,
383  /* .condition = */ {},
384  },
385  {
386  /* .name = */ "yaw",
387  /* .docs = */ "[radians]",
388  /* .type = */ {Type::FLOAT, nullptr},
389  /* .accessor = */ nullptr, //utils::access<type, float, &type::yaw>,
390  /* .attributes = */ {true, false, false, false, false},
391  /* .count = */ 1,
392  /* .condition = */ {},
393  },
394  };
395 
396  static constexpr inline FieldInfo value = {
397  /* .name = */ "data_sensor::CompEulerAngles",
398  /* .title = */ "Complementary Filter Euler Angles",
399  /* .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.",
400  /* .parameters = */ parameters,
401  /* .descriptor = */ type::DESCRIPTOR,
402  /* .functions = */ NO_FUNCTIONS,
403  /* .proprietary = */ false,
404  /* .response = */ nullptr,
405  };
406 };
407 
408 template<>
409 struct MetadataFor<data_sensor::CompOrientationUpdateMatrix>
410 {
412 
413  static constexpr inline ParameterInfo parameters[] = {
414  {
415  /* .name = */ "m",
416  /* .docs = */ "",
417  /* .type = */ {Type::STRUCT, &MetadataFor<Matrix3f>::value},
418  /* .accessor = */ nullptr, //utils::access<type, Matrix3f, &type::m>,
419  /* .attributes = */ {true, false, false, false, false},
420  /* .count = */ 1,
421  /* .condition = */ {},
422  },
423  };
424 
425  static constexpr inline FieldInfo value = {
426  /* .name = */ "data_sensor::CompOrientationUpdateMatrix",
427  /* .title = */ "Complementary Filter Orientation Update Matrix",
428  /* .docs = */ "DEPRECATED!",
429  /* .parameters = */ parameters,
430  /* .descriptor = */ type::DESCRIPTOR,
431  /* .functions = */ NO_FUNCTIONS,
432  /* .proprietary = */ false,
433  /* .response = */ nullptr,
434  };
435 };
436 
437 template<>
438 struct MetadataFor<data_sensor::OrientationRawTemp>
439 {
441 
442  static constexpr inline ParameterInfo parameters[] = {
443  {
444  /* .name = */ "raw_temp",
445  /* .docs = */ "",
446  /* .type = */ {Type::U16, nullptr},
447  /* .accessor = */ nullptr, //utils::access<type, uint16_t, &type::raw_temp>,
448  /* .attributes = */ {true, false, false, false, false},
449  /* .count = */ 4,
450  /* .condition = */ {},
451  },
452  };
453 
454  static constexpr inline FieldInfo value = {
455  /* .name = */ "data_sensor::OrientationRawTemp",
456  /* .title = */ "orientation_raw_temp",
457  /* .docs = */ "DEPRECATED!",
458  /* .parameters = */ parameters,
459  /* .descriptor = */ type::DESCRIPTOR,
460  /* .functions = */ NO_FUNCTIONS,
461  /* .proprietary = */ false,
462  /* .response = */ nullptr,
463  };
464 };
465 
466 template<>
467 struct MetadataFor<data_sensor::InternalTimestamp>
468 {
470 
471  static constexpr inline ParameterInfo parameters[] = {
472  {
473  /* .name = */ "counts",
474  /* .docs = */ "",
475  /* .type = */ {Type::U32, nullptr},
476  /* .accessor = */ nullptr, //utils::access<type, uint32_t, &type::counts>,
477  /* .attributes = */ {true, false, false, false, false},
478  /* .count = */ 1,
479  /* .condition = */ {},
480  },
481  };
482 
483  static constexpr inline FieldInfo value = {
484  /* .name = */ "data_sensor::InternalTimestamp",
485  /* .title = */ "internal_timestamp",
486  /* .docs = */ "DEPRECATED!",
487  /* .parameters = */ parameters,
488  /* .descriptor = */ type::DESCRIPTOR,
489  /* .functions = */ NO_FUNCTIONS,
490  /* .proprietary = */ false,
491  /* .response = */ nullptr,
492  };
493 };
494 
495 template<>
496 struct MetadataFor<data_sensor::PpsTimestamp>
497 {
499 
500  static constexpr inline ParameterInfo parameters[] = {
501  {
502  /* .name = */ "seconds",
503  /* .docs = */ "",
504  /* .type = */ {Type::U32, nullptr},
505  /* .accessor = */ nullptr, //utils::access<type, uint32_t, &type::seconds>,
506  /* .attributes = */ {true, false, false, false, false},
507  /* .count = */ 1,
508  /* .condition = */ {},
509  },
510  {
511  /* .name = */ "useconds",
512  /* .docs = */ "",
513  /* .type = */ {Type::U32, nullptr},
514  /* .accessor = */ nullptr, //utils::access<type, uint32_t, &type::useconds>,
515  /* .attributes = */ {true, false, false, false, false},
516  /* .count = */ 1,
517  /* .condition = */ {},
518  },
519  };
520 
521  static constexpr inline FieldInfo value = {
522  /* .name = */ "data_sensor::PpsTimestamp",
523  /* .title = */ "PPS Timestamp",
524  /* .docs = */ "DEPRECATED!",
525  /* .parameters = */ parameters,
526  /* .descriptor = */ type::DESCRIPTOR,
527  /* .functions = */ NO_FUNCTIONS,
528  /* .proprietary = */ false,
529  /* .response = */ nullptr,
530  };
531 };
532 
533 template<>
534 struct MetadataFor<data_sensor::GpsTimestamp::ValidFlags>
535 {
537 
538  static constexpr inline BitfieldInfo::Entry entries[] = {
539  { uint32_t(1), "pps_valid", "True when the PPS signal is present." },
540  { uint32_t(2), "time_refresh", "Toggles each time the time is updated via internal GPS or the GPS Time Update command (0x01, 0x72)." },
541  { uint32_t(4), "time_initialized", "True if the time has ever been set." },
542  { uint32_t(8), "tow_valid", "True if the time of week is valid." },
543  { uint32_t(16), "week_number_valid", "True if the week number is valid." },
544  };
545 
546  static constexpr inline BitfieldInfo value = {
547  /* .name = */ "ValidFlags",
548  /* .docs = */ "",
549  /* .type = */ Type::U16,
550  /* .entries = */ entries,
551  };
552 
553 };
554 
555 template<>
556 struct MetadataFor<data_sensor::GpsTimestamp>
557 {
559 
560  static constexpr inline ParameterInfo parameters[] = {
561  {
562  /* .name = */ "tow",
563  /* .docs = */ "GPS Time of Week [seconds]",
564  /* .type = */ {Type::DOUBLE, nullptr},
565  /* .accessor = */ nullptr, //utils::access<type, double, &type::tow>,
566  /* .attributes = */ {true, false, false, false, false},
567  /* .count = */ 1,
568  /* .condition = */ {},
569  },
570  {
571  /* .name = */ "week_number",
572  /* .docs = */ "GPS Week Number since 1980 [weeks]",
573  /* .type = */ {Type::U16, nullptr},
574  /* .accessor = */ nullptr, //utils::access<type, uint16_t, &type::week_number>,
575  /* .attributes = */ {true, false, false, false, false},
576  /* .count = */ 1,
577  /* .condition = */ {},
578  },
579  {
580  /* .name = */ "valid_flags",
581  /* .docs = */ "",
583  /* .accessor = */ nullptr, //utils::access<type, data_sensor::GpsTimestamp::ValidFlags, &type::valid_flags>,
584  /* .attributes = */ {true, false, false, false, false},
585  /* .count = */ 1,
586  /* .condition = */ {},
587  },
588  };
589 
590  static constexpr inline FieldInfo value = {
591  /* .name = */ "data_sensor::GpsTimestamp",
592  /* .title = */ "gps_timestamp",
593  /* .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.",
594  /* .parameters = */ parameters,
595  /* .descriptor = */ type::DESCRIPTOR,
596  /* .functions = */ NO_FUNCTIONS,
597  /* .proprietary = */ false,
598  /* .response = */ nullptr,
599  };
600 };
601 
602 template<>
603 struct MetadataFor<data_sensor::TemperatureAbs>
604 {
606 
607  static constexpr inline ParameterInfo parameters[] = {
608  {
609  /* .name = */ "min_temp",
610  /* .docs = */ "[degC]",
611  /* .type = */ {Type::FLOAT, nullptr},
612  /* .accessor = */ nullptr, //utils::access<type, float, &type::min_temp>,
613  /* .attributes = */ {true, false, false, false, false},
614  /* .count = */ 1,
615  /* .condition = */ {},
616  },
617  {
618  /* .name = */ "max_temp",
619  /* .docs = */ "[degC]",
620  /* .type = */ {Type::FLOAT, nullptr},
621  /* .accessor = */ nullptr, //utils::access<type, float, &type::max_temp>,
622  /* .attributes = */ {true, false, false, false, false},
623  /* .count = */ 1,
624  /* .condition = */ {},
625  },
626  {
627  /* .name = */ "mean_temp",
628  /* .docs = */ "[degC]",
629  /* .type = */ {Type::FLOAT, nullptr},
630  /* .accessor = */ nullptr, //utils::access<type, float, &type::mean_temp>,
631  /* .attributes = */ {true, false, false, false, false},
632  /* .count = */ 1,
633  /* .condition = */ {},
634  },
635  };
636 
637  static constexpr inline FieldInfo value = {
638  /* .name = */ "data_sensor::TemperatureAbs",
639  /* .title = */ "Temperature Statistics",
640  /* .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",
641  /* .parameters = */ parameters,
642  /* .descriptor = */ type::DESCRIPTOR,
643  /* .functions = */ NO_FUNCTIONS,
644  /* .proprietary = */ false,
645  /* .response = */ nullptr,
646  };
647 };
648 
649 template<>
650 struct MetadataFor<data_sensor::UpVector>
651 {
653 
654  static constexpr inline ParameterInfo parameters[] = {
655  {
656  /* .name = */ "up",
657  /* .docs = */ "[Gs]",
658  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
659  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::up>,
660  /* .attributes = */ {true, false, false, false, false},
661  /* .count = */ 1,
662  /* .condition = */ {},
663  },
664  };
665 
666  static constexpr inline FieldInfo value = {
667  /* .name = */ "data_sensor::UpVector",
668  /* .title = */ "up_vector",
669  /* .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",
670  /* .parameters = */ parameters,
671  /* .descriptor = */ type::DESCRIPTOR,
672  /* .functions = */ NO_FUNCTIONS,
673  /* .proprietary = */ false,
674  /* .response = */ nullptr,
675  };
676 };
677 
678 template<>
679 struct MetadataFor<data_sensor::NorthVector>
680 {
682 
683  static constexpr inline ParameterInfo parameters[] = {
684  {
685  /* .name = */ "north",
686  /* .docs = */ "[Gauss]",
687  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
688  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::north>,
689  /* .attributes = */ {true, false, false, false, false},
690  /* .count = */ 1,
691  /* .condition = */ {},
692  },
693  };
694 
695  static constexpr inline FieldInfo value = {
696  /* .name = */ "data_sensor::NorthVector",
697  /* .title = */ "north_vector",
698  /* .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.",
699  /* .parameters = */ parameters,
700  /* .descriptor = */ type::DESCRIPTOR,
701  /* .functions = */ NO_FUNCTIONS,
702  /* .proprietary = */ false,
703  /* .response = */ nullptr,
704  };
705 };
706 
707 template<>
708 struct MetadataFor<data_sensor::OverrangeStatus::Status>
709 {
711 
712  static constexpr inline BitfieldInfo::Entry entries[] = {
713  { uint32_t(1), "accel_x", "" },
714  { uint32_t(2), "accel_y", "" },
715  { uint32_t(4), "accel_z", "" },
716  { uint32_t(16), "gyro_x", "" },
717  { uint32_t(32), "gyro_y", "" },
718  { uint32_t(64), "gyro_z", "" },
719  { uint32_t(256), "mag_x", "" },
720  { uint32_t(512), "mag_y", "" },
721  { uint32_t(1024), "mag_z", "" },
722  { uint32_t(4096), "press", "" },
723  };
724 
725  static constexpr inline BitfieldInfo value = {
726  /* .name = */ "Status",
727  /* .docs = */ "",
728  /* .type = */ Type::U16,
729  /* .entries = */ entries,
730  };
731 
732 };
733 
734 template<>
735 struct MetadataFor<data_sensor::OverrangeStatus>
736 {
738 
739  static constexpr inline ParameterInfo parameters[] = {
740  {
741  /* .name = */ "status",
742  /* .docs = */ "",
744  /* .accessor = */ nullptr, //utils::access<type, data_sensor::OverrangeStatus::Status, &type::status>,
745  /* .attributes = */ {true, false, false, false, false},
746  /* .count = */ 1,
747  /* .condition = */ {},
748  },
749  };
750 
751  static constexpr inline FieldInfo value = {
752  /* .name = */ "data_sensor::OverrangeStatus",
753  /* .title = */ "overrange_status",
754  /* .docs = */ "",
755  /* .parameters = */ parameters,
756  /* .descriptor = */ type::DESCRIPTOR,
757  /* .functions = */ NO_FUNCTIONS,
758  /* .proprietary = */ false,
759  /* .response = */ nullptr,
760  };
761 };
762 
763 template<>
764 struct MetadataFor<data_sensor::OdometerData>
765 {
767 
768  static constexpr inline ParameterInfo parameters[] = {
769  {
770  /* .name = */ "speed",
771  /* .docs = */ "Average speed over the time interval [m/s]. Can be negative for quadrature encoders.",
772  /* .type = */ {Type::FLOAT, nullptr},
773  /* .accessor = */ nullptr, //utils::access<type, float, &type::speed>,
774  /* .attributes = */ {true, false, false, false, false},
775  /* .count = */ 1,
776  /* .condition = */ {},
777  },
778  {
779  /* .name = */ "uncertainty",
780  /* .docs = */ "Uncertainty of velocity [m/s].",
781  /* .type = */ {Type::FLOAT, nullptr},
782  /* .accessor = */ nullptr, //utils::access<type, float, &type::uncertainty>,
783  /* .attributes = */ {true, false, false, false, false},
784  /* .count = */ 1,
785  /* .condition = */ {},
786  },
787  {
788  /* .name = */ "valid_flags",
789  /* .docs = */ "If odometer is configured, bit 0 will be set to 1.",
790  /* .type = */ {Type::U16, nullptr},
791  /* .accessor = */ nullptr, //utils::access<type, uint16_t, &type::valid_flags>,
792  /* .attributes = */ {true, false, false, false, false},
793  /* .count = */ 1,
794  /* .condition = */ {},
795  },
796  };
797 
798  static constexpr inline FieldInfo value = {
799  /* .name = */ "data_sensor::OdometerData",
800  /* .title = */ "odometer_data",
801  /* .docs = */ "",
802  /* .parameters = */ parameters,
803  /* .descriptor = */ type::DESCRIPTOR,
804  /* .functions = */ NO_FUNCTIONS,
805  /* .proprietary = */ false,
806  /* .response = */ nullptr,
807  };
808 };
809 
810 
811 static constexpr inline std::initializer_list<const FieldInfo*> DATA_SENSOR = {
835 };
836 
837 
838 } // namespace mip::metadata
839 
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:81
mip::metadata
Definition: commands_3dm.hpp:9
mip::metadata::MetadataFor< data_sensor::ScaledAccel >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:146
mip::data_sensor::RawGyro
Definition: data_sensor.hpp:116
mip::metadata::MetadataFor< data_sensor::ScaledGyro >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:175
mip::metadata::MetadataFor< data_sensor::RawPressure >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:117
mip::data_sensor::ScaledAccel
Definition: data_sensor.hpp:230
mip::metadata::MetadataFor< data_sensor::CompQuaternion >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:349
mip::data_sensor::CompEulerAngles
Definition: data_sensor.hpp:549
mip::metadata::MetadataFor< data_sensor::TemperatureAbs >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:637
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:204
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:695
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:396
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:127
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::ScaledMag
Definition: data_sensor.hpp:306
mip::metadata::MetadataFor< data_sensor::InternalTimestamp >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:483
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:425
mip::metadata::MetadataFor< data_sensor::RawMag >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:88
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:798
mip::data_sensor::NorthVector
Definition: data_sensor.hpp:907
mip::metadata::MetadataFor< data_sensor::GpsTimestamp >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:590
mip::data_sensor::DeltaTheta
Definition: data_sensor.hpp:381
mip::metadata::FieldInfo
Definition: mip_structures.hpp:182
mip::metadata::MetadataFor< data_sensor::PpsTimestamp >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:521
mip::metadata::MetadataFor< data_sensor::DeltaTheta >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:262
mip::metadata::MetadataFor< data_sensor::CompOrientationMatrix >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:320
mip::metadata::MetadataFor< data_sensor::OverrangeStatus >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:751
mip::metadata::MetadataFor< data_sensor::RawAccel >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:30
mip::metadata::MetadataFor< data_sensor::DeltaVelocity >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:291
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:666
data_sensor.hpp
mip::metadata::MetadataFor< data_sensor::ScaledPressure >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:233
mip::metadata::MetadataFor< data_sensor::OrientationRawTemp >::value
static constexpr FieldInfo value
Definition: data_sensor.hpp:454
common.hpp
mip::metadata::Type::U32
@ U32
mip::data_sensor::CompQuaternion
Definition: data_sensor.hpp:511