MIP_SDK  latest-2-g34f3e39
MicroStrain Communications Library for embedded systems
commands_aiding.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<commands_aiding::FrameConfig::Format>
16 {
18 
19  static constexpr inline EnumInfo::Entry entries[] = {
20  { uint32_t(1), "EULER", "Translation vector followed by euler angles (roll, pitch, yaw)." },
21  { uint32_t(2), "QUATERNION", "Translation vector followed by quaternion (w, x, y, z)." },
22  };
23 
24  static constexpr inline EnumInfo value = {
25  /* .name = */ "Format",
26  /* .docs = */ "",
27  /* .type = */ Type::U8,
28  /* .entries = */ entries,
29  };
30 
31 };
32 
33 template<>
34 struct MetadataFor<commands_aiding::FrameConfig::Rotation>
35 {
37 
38  static constexpr inline ParameterInfo parameters[] = {
39  {
40  /* .name = */ "euler",
41  /* .docs = */ "Rotation represented as euler angles in RPY format [rad]. Range +/- pi.",
43  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::euler>,
44  /* .attributes = */ NO_FUNCTIONS,
45  /* .count = */ 1,
46  /* .condition = */ {ParameterInfo::Condition::Type::ENUM, microstrain::Index(1) /* format */, static_cast<uint16_t>(commands_aiding::FrameConfig::Format::EULER)} /* format == EULER */,
47  },
48  {
49  /* .name = */ "quaternion",
50  /* .docs = */ "Rotation represented as a quaternion in WXYZ format.",
51  /* .type = */ {Type::STRUCT, &MetadataFor<Quatf>::value},
52  /* .accessor = */ nullptr, //utils::access<type, Quatf, &type::quaternion>,
53  /* .attributes = */ NO_FUNCTIONS,
54  /* .count = */ 1,
55  /* .condition = */ {ParameterInfo::Condition::Type::ENUM, microstrain::Index(1) /* format */, static_cast<uint16_t>(commands_aiding::FrameConfig::Format::QUATERNION)} /* format == QUATERNION */,
56  },
57  };
58 
59  static constexpr inline StructInfo value = {
60  /* .name = */ "Rotation",
61  /* .title = */ "Rotation",
62  /* .docs = */ "",
63  /* .parameters = */ parameters,
64  };
65 };
66 
67 template<>
68 struct MetadataFor<commands_aiding::FrameConfig::Response>
69 {
71 
72  static constexpr inline ParameterInfo parameters[] = {
73  {
74  /* .name = */ "frame_id",
75  /* .docs = */ "Reference frame number. Limit 4.",
76  /* .type = */ {Type::U8, nullptr},
77  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::frame_id>,
78  /* .attributes = */ {true, true, true, true, true, /*echo*/true},
79  /* .count = */ 1,
80  /* .condition = */ {},
81  },
82  {
83  /* .name = */ "format",
84  /* .docs = */ "Format of the transformation.",
86  /* .accessor = */ nullptr, //utils::access<type, commands_aiding::FrameConfig::Format, &type::format>,
87  /* .attributes = */ {true, true, false, false, false, /*echo*/true},
88  /* .count = */ 1,
89  /* .condition = */ {},
90  },
91  {
92  /* .name = */ "tracking_enabled",
93  /* .docs = */ "If enabled, the Kalman filter will track errors.",
94  /* .type = */ {Type::BOOL, nullptr},
95  /* .accessor = */ nullptr, //utils::access<type, bool, &type::tracking_enabled>,
96  /* .attributes = */ {true, false, false, false, false},
97  /* .count = */ 1,
98  /* .condition = */ {},
99  },
100  {
101  /* .name = */ "translation",
102  /* .docs = */ "Translation X, Y, and Z.",
103  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
104  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::translation>,
105  /* .attributes = */ {true, false, false, false, false},
106  /* .count = */ 1,
107  /* .condition = */ {},
108  },
109  {
110  /* .name = */ "rotation",
111  /* .docs = */ "Rotation as specified by format.",
113  /* .accessor = */ nullptr, //utils::access<type, commands_aiding::FrameConfig::Rotation, &type::rotation>,
114  /* .attributes = */ {true, false, false, false, false},
115  /* .count = */ 1,
116  /* .condition = */ {},
117  },
118  };
119 
120  static constexpr inline FieldInfo value = {
121  /* .name = */ "commands_aiding::FrameConfig::Response",
122  /* .title = */ "response",
123  /* .docs = */ "",
124  /* .parameters = */ parameters,
125  /* .descriptor = */ type::DESCRIPTOR,
126  /* .functions = */ NO_FUNCTIONS,
127  /* .response = */ nullptr,
128  };
129 };
130 
131 template<>
132 struct MetadataFor<commands_aiding::FrameConfig>
133 {
135 
136  static constexpr inline ParameterInfo parameters[] = {
137  FUNCTION_SELECTOR_PARAM,
138  {
139  /* .name = */ "frame_id",
140  /* .docs = */ "Reference frame number. Limit 4.",
141  /* .type = */ {Type::U8, nullptr},
142  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::frame_id>,
143  /* .attributes = */ {true, true, true, true, true, /*echo*/true},
144  /* .count = */ 1,
145  /* .condition = */ {},
146  },
147  {
148  /* .name = */ "format",
149  /* .docs = */ "Format of the transformation.",
151  /* .accessor = */ nullptr, //utils::access<type, commands_aiding::FrameConfig::Format, &type::format>,
152  /* .attributes = */ {true, true, false, false, false, /*echo*/true},
153  /* .count = */ 1,
154  /* .condition = */ {},
155  },
156  {
157  /* .name = */ "tracking_enabled",
158  /* .docs = */ "If enabled, the Kalman filter will track errors.",
159  /* .type = */ {Type::BOOL, nullptr},
160  /* .accessor = */ nullptr, //utils::access<type, bool, &type::tracking_enabled>,
161  /* .attributes = */ {true, false, false, false, false},
162  /* .count = */ 1,
163  /* .condition = */ {},
164  },
165  {
166  /* .name = */ "translation",
167  /* .docs = */ "Translation X, Y, and Z.",
168  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
169  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::translation>,
170  /* .attributes = */ {true, false, false, false, false},
171  /* .count = */ 1,
172  /* .condition = */ {},
173  },
174  {
175  /* .name = */ "rotation",
176  /* .docs = */ "Rotation as specified by format.",
178  /* .accessor = */ nullptr, //utils::access<type, commands_aiding::FrameConfig::Rotation, &type::rotation>,
179  /* .attributes = */ {true, false, false, false, false},
180  /* .count = */ 1,
181  /* .condition = */ {},
182  },
183  };
184 
185  static constexpr inline FieldInfo value = {
186  /* .name = */ "commands_aiding::FrameConfig",
187  /* .title = */ "Frame Configuration",
188  /* .docs = */ "Defines an aiding frame associated with a specific sensor frame ID.\nThe frame ID used in this command should mirror the frame ID used in the aiding command\n(if that aiding measurement is measured in this reference frame).\n\nThis transform satisfies the following relationship:\n\nEQSTART p^{veh} = R p^{sensor_frame} + t EQEND<br/>\n\nWhere:<br/>\nEQSTART R EQEND is rotation matrix defined by the rotation component and EQSTART t EQEND is the translation vector<br/><br/>\nEQSTART p^{sensor_frame} EQEND is a 3-element position vector expressed in the external sensor frame<br/>\nEQSTART p^{veh} EQEND is a 3-element position vector expressed in the vehicle frame<br/>\n\nRotation can be defined using Euler angles OR quaternions. If Format selector is set to Euler Angles, the fourth element\nin the rotation vector is ignored and should be set to 0.\n\nWhen the tracking_enabled flag is 1, the Kalman filter will track errors in the provided frame definition; when 0, no errors are tracked.\n\nExample: GNSS antenna lever arm\n\nFrame ID: 1\nFormat: 1 (Euler)\nTranslation: [0,1,] (GNSS with a 1 meter Y offset in the vehicle frame)\nRotation: [0,0,0,0] (Rotational component is not relevant for GNSS measurements, set to zero)\n",
189  /* .parameters = */ parameters,
190  /* .descriptor = */ type::DESCRIPTOR,
191  /* .functions = */ {true, true, true, true, true},
192  /* .response = */ &MetadataFor<type::Response>::value,
193  };
194 };
195 
196 template<>
197 struct MetadataFor<commands_aiding::EchoControl::Mode>
198 {
200 
201  static constexpr inline EnumInfo::Entry entries[] = {
202  { uint32_t(0), "SUPPRESS_ACK", "Suppresses the usual command ack field for aiding messages." },
203  { uint32_t(1), "STANDARD", "Normal ack/nack behavior." },
204  { uint32_t(2), "RESPONSE", "Echo the data back as a response." },
205  };
206 
207  static constexpr inline EnumInfo value = {
208  /* .name = */ "Mode",
209  /* .docs = */ "",
210  /* .type = */ Type::U8,
211  /* .entries = */ entries,
212  };
213 
214 };
215 
216 template<>
217 struct MetadataFor<commands_aiding::EchoControl::Response>
218 {
220 
221  static constexpr inline ParameterInfo parameters[] = {
222  {
223  /* .name = */ "mode",
224  /* .docs = */ "Controls data echoing.",
226  /* .accessor = */ nullptr, //utils::access<type, commands_aiding::EchoControl::Mode, &type::mode>,
227  /* .attributes = */ {true, false, false, false, false},
228  /* .count = */ 1,
229  /* .condition = */ {},
230  },
231  };
232 
233  static constexpr inline FieldInfo value = {
234  /* .name = */ "commands_aiding::EchoControl::Response",
235  /* .title = */ "response",
236  /* .docs = */ "",
237  /* .parameters = */ parameters,
238  /* .descriptor = */ type::DESCRIPTOR,
239  /* .functions = */ NO_FUNCTIONS,
240  /* .response = */ nullptr,
241  };
242 };
243 
244 template<>
245 struct MetadataFor<commands_aiding::EchoControl>
246 {
248 
249  static constexpr inline ParameterInfo parameters[] = {
250  FUNCTION_SELECTOR_PARAM,
251  {
252  /* .name = */ "mode",
253  /* .docs = */ "Controls data echoing.",
255  /* .accessor = */ nullptr, //utils::access<type, commands_aiding::EchoControl::Mode, &type::mode>,
256  /* .attributes = */ {true, false, false, false, false},
257  /* .count = */ 1,
258  /* .condition = */ {},
259  },
260  };
261 
262  static constexpr inline FieldInfo value = {
263  /* .name = */ "commands_aiding::EchoControl",
264  /* .title = */ "Aiding Command Echo Control",
265  /* .docs = */ "Controls command response behavior to external aiding commands",
266  /* .parameters = */ parameters,
267  /* .descriptor = */ type::DESCRIPTOR,
268  /* .functions = */ {true, true, true, true, true},
269  /* .response = */ &MetadataFor<type::Response>::value,
270  };
271 };
272 
273 template<>
274 struct MetadataFor<commands_aiding::Time::Timebase>
275 {
277 
278  static constexpr inline EnumInfo::Entry entries[] = {
279  { uint32_t(1), "INTERNAL_REFERENCE", "Timestamp provided is with respect to internal clock." },
280  { uint32_t(2), "EXTERNAL_TIME", "Timestamp provided is with respect to external clock, synced by PPS source." },
281  { uint32_t(3), "TIME_OF_ARRIVAL", "Timestamp provided is a fixed latency relative to time of message arrival." },
282  };
283 
284  static constexpr inline EnumInfo value = {
285  /* .name = */ "Timebase",
286  /* .docs = */ "",
287  /* .type = */ Type::U8,
288  /* .entries = */ entries,
289  };
290 
291 };
292 
293 template<>
294 struct MetadataFor<commands_aiding::Time>
295 {
297 
298  static constexpr inline ParameterInfo parameters[] = {
299  {
300  /* .name = */ "timebase",
301  /* .docs = */ "Timebase reference, e.g. internal, external, GPS, UTC, etc.",
303  /* .accessor = */ nullptr, //utils::access<type, commands_aiding::Time::Timebase, &type::timebase>,
304  /* .attributes = */ NO_FUNCTIONS,
305  /* .count = */ 1,
306  /* .condition = */ {},
307  },
308  {
309  /* .name = */ "reserved",
310  /* .docs = */ "Reserved, set to 0x01.",
311  /* .type = */ {Type::U8, nullptr},
312  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::reserved>,
313  /* .attributes = */ NO_FUNCTIONS,
314  /* .count = */ 1,
315  /* .condition = */ {},
316  },
317  {
318  /* .name = */ "nanoseconds",
319  /* .docs = */ "Nanoseconds since the timebase epoch.",
320  /* .type = */ {Type::U64, nullptr},
321  /* .accessor = */ nullptr, //utils::access<type, uint64_t, &type::nanoseconds>,
322  /* .attributes = */ NO_FUNCTIONS,
323  /* .count = */ 1,
324  /* .condition = */ {},
325  },
326  };
327 
328  static constexpr inline StructInfo value = {
329  /* .name = */ "Time",
330  /* .title = */ "Time",
331  /* .docs = */ "",
332  /* .parameters = */ parameters,
333  };
334 };
335 
336 template<>
337 struct MetadataFor<commands_aiding::PosEcef::ValidFlags>
338 {
340 
341  static constexpr inline BitfieldInfo::Entry entries[] = {
342  { uint32_t(1), "X", "" },
343  { uint32_t(2), "Y", "" },
344  { uint32_t(4), "Z", "" },
345  };
346 
347  static constexpr inline BitfieldInfo value = {
348  /* .name = */ "ValidFlags",
349  /* .docs = */ "",
350  /* .type = */ Type::U16,
351  /* .entries = */ entries,
352  };
353 
354 };
355 
356 template<>
357 struct MetadataFor<commands_aiding::PosEcef>
358 {
360 
361  static constexpr inline ParameterInfo parameters[] = {
362  {
363  /* .name = */ "time",
364  /* .docs = */ "Timestamp of the measurement.",
366  /* .accessor = */ nullptr, //utils::access<type, commands_aiding::Time, &type::time>,
367  /* .attributes = */ {true, false, false, false, false},
368  /* .count = */ 1,
369  /* .condition = */ {},
370  },
371  {
372  /* .name = */ "frame_id",
373  /* .docs = */ "Source ID for this estimate (source_id == 0 indicates this sensor, source_id > 0 indicates an external estimate).",
374  /* .type = */ {Type::U8, nullptr},
375  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::frame_id>,
376  /* .attributes = */ {true, false, false, false, false},
377  /* .count = */ 1,
378  /* .condition = */ {},
379  },
380  {
381  /* .name = */ "position",
382  /* .docs = */ "ECEF position [m].",
383  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3d>::value},
384  /* .accessor = */ nullptr, //utils::access<type, Vector3d, &type::position>,
385  /* .attributes = */ {true, false, false, false, false},
386  /* .count = */ 1,
387  /* .condition = */ {},
388  },
389  {
390  /* .name = */ "uncertainty",
391  /* .docs = */ "ECEF position uncertainty [m]. Cannot be 0 unless the corresponding valid flags are 0.",
392  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
393  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::uncertainty>,
394  /* .attributes = */ {true, false, false, false, false},
395  /* .count = */ 1,
396  /* .condition = */ {},
397  },
398  {
399  /* .name = */ "valid_flags",
400  /* .docs = */ "Valid flags. Axes with 0 will be completely ignored.",
402  /* .accessor = */ nullptr, //utils::access<type, commands_aiding::PosEcef::ValidFlags, &type::valid_flags>,
403  /* .attributes = */ {true, false, false, false, false},
404  /* .count = */ 1,
405  /* .condition = */ {},
406  },
407  };
408 
409  static constexpr inline FieldInfo value = {
410  /* .name = */ "commands_aiding::PosEcef",
411  /* .title = */ "ECEF Position",
412  /* .docs = */ "Cartesian vector position aiding command. Coordinates are given in the WGS84 ECEF system.",
413  /* .parameters = */ parameters,
414  /* .descriptor = */ type::DESCRIPTOR,
415  /* .functions = */ NO_FUNCTIONS,
416  /* .response = */ nullptr,
417  };
418 };
419 
420 template<>
421 struct MetadataFor<commands_aiding::PosLlh::ValidFlags>
422 {
424 
425  static constexpr inline BitfieldInfo::Entry entries[] = {
426  { uint32_t(1), "Latitude", "" },
427  { uint32_t(2), "Longitude", "" },
428  { uint32_t(4), "Height", "" },
429  };
430 
431  static constexpr inline BitfieldInfo value = {
432  /* .name = */ "ValidFlags",
433  /* .docs = */ "",
434  /* .type = */ Type::U16,
435  /* .entries = */ entries,
436  };
437 
438 };
439 
440 template<>
441 struct MetadataFor<commands_aiding::PosLlh>
442 {
444 
445  static constexpr inline ParameterInfo parameters[] = {
446  {
447  /* .name = */ "time",
448  /* .docs = */ "Timestamp of the measurement.",
450  /* .accessor = */ nullptr, //utils::access<type, commands_aiding::Time, &type::time>,
451  /* .attributes = */ {true, false, false, false, false},
452  /* .count = */ 1,
453  /* .condition = */ {},
454  },
455  {
456  /* .name = */ "frame_id",
457  /* .docs = */ "Source ID for this estimate (source_id == 0 indicates this sensor, source_id > 0 indicates an external estimate).",
458  /* .type = */ {Type::U8, nullptr},
459  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::frame_id>,
460  /* .attributes = */ {true, false, false, false, false},
461  /* .count = */ 1,
462  /* .condition = */ {},
463  },
464  {
465  /* .name = */ "latitude",
466  /* .docs = */ "[deg]",
467  /* .type = */ {Type::DOUBLE, nullptr},
468  /* .accessor = */ nullptr, //utils::access<type, double, &type::latitude>,
469  /* .attributes = */ {true, false, false, false, false},
470  /* .count = */ 1,
471  /* .condition = */ {},
472  },
473  {
474  /* .name = */ "longitude",
475  /* .docs = */ "[deg]",
476  /* .type = */ {Type::DOUBLE, nullptr},
477  /* .accessor = */ nullptr, //utils::access<type, double, &type::longitude>,
478  /* .attributes = */ {true, false, false, false, false},
479  /* .count = */ 1,
480  /* .condition = */ {},
481  },
482  {
483  /* .name = */ "height",
484  /* .docs = */ "[m]",
485  /* .type = */ {Type::DOUBLE, nullptr},
486  /* .accessor = */ nullptr, //utils::access<type, double, &type::height>,
487  /* .attributes = */ {true, false, false, false, false},
488  /* .count = */ 1,
489  /* .condition = */ {},
490  },
491  {
492  /* .name = */ "uncertainty",
493  /* .docs = */ "NED position uncertainty. Cannot be 0 unless the corresponding valid flags are 0.",
494  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
495  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::uncertainty>,
496  /* .attributes = */ {true, false, false, false, false},
497  /* .count = */ 1,
498  /* .condition = */ {},
499  },
500  {
501  /* .name = */ "valid_flags",
502  /* .docs = */ "Valid flags. Axes with 0 will be completely ignored.",
504  /* .accessor = */ nullptr, //utils::access<type, commands_aiding::PosLlh::ValidFlags, &type::valid_flags>,
505  /* .attributes = */ {true, false, false, false, false},
506  /* .count = */ 1,
507  /* .condition = */ {},
508  },
509  };
510 
511  static constexpr inline FieldInfo value = {
512  /* .name = */ "commands_aiding::PosLlh",
513  /* .title = */ "LLH Position",
514  /* .docs = */ "Geodetic position aiding command.\nCoordinates are given in WGS84 geodetic latitude, longitude, and height above the ellipsoid.\nUncertainty is given in NED coordinates, which are parallel to incremental changes in latitude, longitude, and height.",
515  /* .parameters = */ parameters,
516  /* .descriptor = */ type::DESCRIPTOR,
517  /* .functions = */ NO_FUNCTIONS,
518  /* .response = */ nullptr,
519  };
520 };
521 
522 template<>
523 struct MetadataFor<commands_aiding::HeightAboveEllipsoid>
524 {
526 
527  static constexpr inline ParameterInfo parameters[] = {
528  {
529  /* .name = */ "time",
530  /* .docs = */ "Timestamp of the measurement.",
532  /* .accessor = */ nullptr, //utils::access<type, commands_aiding::Time, &type::time>,
533  /* .attributes = */ {true, false, false, false, false},
534  /* .count = */ 1,
535  /* .condition = */ {},
536  },
537  {
538  /* .name = */ "frame_id",
539  /* .docs = */ "Source ID for this estimate (source_id == 0 indicates this sensor, source_id > 0 indicates an external estimate).",
540  /* .type = */ {Type::U8, nullptr},
541  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::frame_id>,
542  /* .attributes = */ {true, false, false, false, false},
543  /* .count = */ 1,
544  /* .condition = */ {},
545  },
546  {
547  /* .name = */ "height",
548  /* .docs = */ "[m]",
549  /* .type = */ {Type::FLOAT, nullptr},
550  /* .accessor = */ nullptr, //utils::access<type, float, &type::height>,
551  /* .attributes = */ {true, false, false, false, false},
552  /* .count = */ 1,
553  /* .condition = */ {},
554  },
555  {
556  /* .name = */ "uncertainty",
557  /* .docs = */ "[m]",
558  /* .type = */ {Type::FLOAT, nullptr},
559  /* .accessor = */ nullptr, //utils::access<type, float, &type::uncertainty>,
560  /* .attributes = */ {true, false, false, false, false},
561  /* .count = */ 1,
562  /* .condition = */ {},
563  },
564  {
565  /* .name = */ "valid_flags",
566  /* .docs = */ "",
567  /* .type = */ {Type::U16, nullptr},
568  /* .accessor = */ nullptr, //utils::access<type, uint16_t, &type::valid_flags>,
569  /* .attributes = */ {true, false, false, false, false},
570  /* .count = */ 1,
571  /* .condition = */ {},
572  },
573  };
574 
575  static constexpr inline FieldInfo value = {
576  /* .name = */ "commands_aiding::HeightAboveEllipsoid",
577  /* .title = */ "Height Above Ellipsoid",
578  /* .docs = */ "Estimated value of the height above ellipsoid.",
579  /* .parameters = */ parameters,
580  /* .descriptor = */ type::DESCRIPTOR,
581  /* .functions = */ NO_FUNCTIONS,
582  /* .response = */ nullptr,
583  };
584 };
585 
586 template<>
587 struct MetadataFor<commands_aiding::VelEcef::ValidFlags>
588 {
590 
591  static constexpr inline BitfieldInfo::Entry entries[] = {
592  { uint32_t(1), "X", "" },
593  { uint32_t(2), "Y", "" },
594  { uint32_t(4), "Z", "" },
595  };
596 
597  static constexpr inline BitfieldInfo value = {
598  /* .name = */ "ValidFlags",
599  /* .docs = */ "",
600  /* .type = */ Type::U16,
601  /* .entries = */ entries,
602  };
603 
604 };
605 
606 template<>
607 struct MetadataFor<commands_aiding::VelEcef>
608 {
610 
611  static constexpr inline ParameterInfo parameters[] = {
612  {
613  /* .name = */ "time",
614  /* .docs = */ "Timestamp of the measurement.",
616  /* .accessor = */ nullptr, //utils::access<type, commands_aiding::Time, &type::time>,
617  /* .attributes = */ {true, false, false, false, false},
618  /* .count = */ 1,
619  /* .condition = */ {},
620  },
621  {
622  /* .name = */ "frame_id",
623  /* .docs = */ "Source ID for this estimate (source_id == 0 indicates this sensor, source_id > 0 indicates an external estimate).",
624  /* .type = */ {Type::U8, nullptr},
625  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::frame_id>,
626  /* .attributes = */ {true, false, false, false, false},
627  /* .count = */ 1,
628  /* .condition = */ {},
629  },
630  {
631  /* .name = */ "velocity",
632  /* .docs = */ "ECEF velocity [m/s].",
633  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
634  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::velocity>,
635  /* .attributes = */ {true, false, false, false, false},
636  /* .count = */ 1,
637  /* .condition = */ {},
638  },
639  {
640  /* .name = */ "uncertainty",
641  /* .docs = */ "ECEF velocity uncertainty [m/s]. Cannot be 0 unless the corresponding valid flags are 0.",
642  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
643  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::uncertainty>,
644  /* .attributes = */ {true, false, false, false, false},
645  /* .count = */ 1,
646  /* .condition = */ {},
647  },
648  {
649  /* .name = */ "valid_flags",
650  /* .docs = */ "Valid flags. Axes with 0 will be completely ignored.",
652  /* .accessor = */ nullptr, //utils::access<type, commands_aiding::VelEcef::ValidFlags, &type::valid_flags>,
653  /* .attributes = */ {true, false, false, false, false},
654  /* .count = */ 1,
655  /* .condition = */ {},
656  },
657  };
658 
659  static constexpr inline FieldInfo value = {
660  /* .name = */ "commands_aiding::VelEcef",
661  /* .title = */ "ECEF Velocity",
662  /* .docs = */ "ECEF velocity aiding command. Coordinates are given in the WGS84 ECEF frame.",
663  /* .parameters = */ parameters,
664  /* .descriptor = */ type::DESCRIPTOR,
665  /* .functions = */ NO_FUNCTIONS,
666  /* .response = */ nullptr,
667  };
668 };
669 
670 template<>
671 struct MetadataFor<commands_aiding::VelNed::ValidFlags>
672 {
674 
675  static constexpr inline BitfieldInfo::Entry entries[] = {
676  { uint32_t(1), "X", "" },
677  { uint32_t(2), "Y", "" },
678  { uint32_t(4), "Z", "" },
679  };
680 
681  static constexpr inline BitfieldInfo value = {
682  /* .name = */ "ValidFlags",
683  /* .docs = */ "",
684  /* .type = */ Type::U16,
685  /* .entries = */ entries,
686  };
687 
688 };
689 
690 template<>
691 struct MetadataFor<commands_aiding::VelNed>
692 {
694 
695  static constexpr inline ParameterInfo parameters[] = {
696  {
697  /* .name = */ "time",
698  /* .docs = */ "Timestamp of the measurement.",
700  /* .accessor = */ nullptr, //utils::access<type, commands_aiding::Time, &type::time>,
701  /* .attributes = */ {true, false, false, false, false},
702  /* .count = */ 1,
703  /* .condition = */ {},
704  },
705  {
706  /* .name = */ "frame_id",
707  /* .docs = */ "Source ID for this estimate (source_id == 0 indicates this sensor, source_id > 0 indicates an external estimate).",
708  /* .type = */ {Type::U8, nullptr},
709  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::frame_id>,
710  /* .attributes = */ {true, false, false, false, false},
711  /* .count = */ 1,
712  /* .condition = */ {},
713  },
714  {
715  /* .name = */ "velocity",
716  /* .docs = */ "NED velocity [m/s].",
717  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
718  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::velocity>,
719  /* .attributes = */ {true, false, false, false, false},
720  /* .count = */ 1,
721  /* .condition = */ {},
722  },
723  {
724  /* .name = */ "uncertainty",
725  /* .docs = */ "NED velocity uncertainty [m/s]. Cannot be 0 unless the corresponding valid flags are 0.",
726  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
727  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::uncertainty>,
728  /* .attributes = */ {true, false, false, false, false},
729  /* .count = */ 1,
730  /* .condition = */ {},
731  },
732  {
733  /* .name = */ "valid_flags",
734  /* .docs = */ "Valid flags. Axes with 0 will be completely ignored.",
736  /* .accessor = */ nullptr, //utils::access<type, commands_aiding::VelNed::ValidFlags, &type::valid_flags>,
737  /* .attributes = */ {true, false, false, false, false},
738  /* .count = */ 1,
739  /* .condition = */ {},
740  },
741  };
742 
743  static constexpr inline FieldInfo value = {
744  /* .name = */ "commands_aiding::VelNed",
745  /* .title = */ "NED Velocity",
746  /* .docs = */ "NED velocity aiding command. Coordinates are given in the local North-East-Down frame.",
747  /* .parameters = */ parameters,
748  /* .descriptor = */ type::DESCRIPTOR,
749  /* .functions = */ NO_FUNCTIONS,
750  /* .response = */ nullptr,
751  };
752 };
753 
754 template<>
755 struct MetadataFor<commands_aiding::VelBodyFrame::ValidFlags>
756 {
758 
759  static constexpr inline BitfieldInfo::Entry entries[] = {
760  { uint32_t(1), "X", "" },
761  { uint32_t(2), "Y", "" },
762  { uint32_t(4), "Z", "" },
763  };
764 
765  static constexpr inline BitfieldInfo value = {
766  /* .name = */ "ValidFlags",
767  /* .docs = */ "",
768  /* .type = */ Type::U16,
769  /* .entries = */ entries,
770  };
771 
772 };
773 
774 template<>
775 struct MetadataFor<commands_aiding::VelBodyFrame>
776 {
778 
779  static constexpr inline ParameterInfo parameters[] = {
780  {
781  /* .name = */ "time",
782  /* .docs = */ "Timestamp of the measurement.",
784  /* .accessor = */ nullptr, //utils::access<type, commands_aiding::Time, &type::time>,
785  /* .attributes = */ {true, false, false, false, false},
786  /* .count = */ 1,
787  /* .condition = */ {},
788  },
789  {
790  /* .name = */ "frame_id",
791  /* .docs = */ "Source ID for this estimate (source_id == 0 indicates this sensor, source_id > 0 indicates an external estimate).",
792  /* .type = */ {Type::U8, nullptr},
793  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::frame_id>,
794  /* .attributes = */ {true, false, false, false, false},
795  /* .count = */ 1,
796  /* .condition = */ {},
797  },
798  {
799  /* .name = */ "velocity",
800  /* .docs = */ "[m/s]",
801  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
802  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::velocity>,
803  /* .attributes = */ {true, false, false, false, false},
804  /* .count = */ 1,
805  /* .condition = */ {},
806  },
807  {
808  /* .name = */ "uncertainty",
809  /* .docs = */ "[m/s] 1-sigma uncertainty. Cannot be 0 unless the corresponding valid flags are 0.",
810  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
811  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::uncertainty>,
812  /* .attributes = */ {true, false, false, false, false},
813  /* .count = */ 1,
814  /* .condition = */ {},
815  },
816  {
817  /* .name = */ "valid_flags",
818  /* .docs = */ "Valid flags. Axes with 0 will be completely ignored.",
820  /* .accessor = */ nullptr, //utils::access<type, commands_aiding::VelBodyFrame::ValidFlags, &type::valid_flags>,
821  /* .attributes = */ {true, false, false, false, false},
822  /* .count = */ 1,
823  /* .condition = */ {},
824  },
825  };
826 
827  static constexpr inline FieldInfo value = {
828  /* .name = */ "commands_aiding::VelBodyFrame",
829  /* .title = */ "Body Frame Velocity",
830  /* .docs = */ "Estimated of velocity of the vehicle in the frame associated with the given sensor ID, relative to the vehicle frame.",
831  /* .parameters = */ parameters,
832  /* .descriptor = */ type::DESCRIPTOR,
833  /* .functions = */ NO_FUNCTIONS,
834  /* .response = */ nullptr,
835  };
836 };
837 
838 template<>
839 struct MetadataFor<commands_aiding::HeadingTrue>
840 {
842 
843  static constexpr inline ParameterInfo parameters[] = {
844  {
845  /* .name = */ "time",
846  /* .docs = */ "Timestamp of the measurement.",
848  /* .accessor = */ nullptr, //utils::access<type, commands_aiding::Time, &type::time>,
849  /* .attributes = */ {true, false, false, false, false},
850  /* .count = */ 1,
851  /* .condition = */ {},
852  },
853  {
854  /* .name = */ "frame_id",
855  /* .docs = */ "Source ID for this estimate (source_id == 0 indicates this sensor, source_id > 0 indicates an external estimate).",
856  /* .type = */ {Type::U8, nullptr},
857  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::frame_id>,
858  /* .attributes = */ {true, false, false, false, false},
859  /* .count = */ 1,
860  /* .condition = */ {},
861  },
862  {
863  /* .name = */ "heading",
864  /* .docs = */ "Heading [radians]. Range +/- Pi.",
865  /* .type = */ {Type::FLOAT, nullptr},
866  /* .accessor = */ nullptr, //utils::access<type, float, &type::heading>,
867  /* .attributes = */ {true, false, false, false, false},
868  /* .count = */ 1,
869  /* .condition = */ {},
870  },
871  {
872  /* .name = */ "uncertainty",
873  /* .docs = */ "Cannot be 0 unless the valid flags are 0.",
874  /* .type = */ {Type::FLOAT, nullptr},
875  /* .accessor = */ nullptr, //utils::access<type, float, &type::uncertainty>,
876  /* .attributes = */ {true, false, false, false, false},
877  /* .count = */ 1,
878  /* .condition = */ {},
879  },
880  {
881  /* .name = */ "valid_flags",
882  /* .docs = */ "",
883  /* .type = */ {Type::U16, nullptr},
884  /* .accessor = */ nullptr, //utils::access<type, uint16_t, &type::valid_flags>,
885  /* .attributes = */ {true, false, false, false, false},
886  /* .count = */ 1,
887  /* .condition = */ {},
888  },
889  };
890 
891  static constexpr inline FieldInfo value = {
892  /* .name = */ "commands_aiding::HeadingTrue",
893  /* .title = */ "True Heading",
894  /* .docs = */ "",
895  /* .parameters = */ parameters,
896  /* .descriptor = */ type::DESCRIPTOR,
897  /* .functions = */ NO_FUNCTIONS,
898  /* .response = */ nullptr,
899  };
900 };
901 
902 template<>
903 struct MetadataFor<commands_aiding::MagneticField::ValidFlags>
904 {
906 
907  static constexpr inline BitfieldInfo::Entry entries[] = {
908  { uint32_t(1), "X", "" },
909  { uint32_t(2), "Y", "" },
910  { uint32_t(4), "Z", "" },
911  };
912 
913  static constexpr inline BitfieldInfo value = {
914  /* .name = */ "ValidFlags",
915  /* .docs = */ "",
916  /* .type = */ Type::U16,
917  /* .entries = */ entries,
918  };
919 
920 };
921 
922 template<>
923 struct MetadataFor<commands_aiding::MagneticField>
924 {
926 
927  static constexpr inline ParameterInfo parameters[] = {
928  {
929  /* .name = */ "time",
930  /* .docs = */ "Timestamp of the measurement.",
932  /* .accessor = */ nullptr, //utils::access<type, commands_aiding::Time, &type::time>,
933  /* .attributes = */ {true, false, false, false, false},
934  /* .count = */ 1,
935  /* .condition = */ {},
936  },
937  {
938  /* .name = */ "frame_id",
939  /* .docs = */ "Source ID for this estimate (source_id == 0 indicates this sensor, source_id > 0 indicates an external estimate).",
940  /* .type = */ {Type::U8, nullptr},
941  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::frame_id>,
942  /* .attributes = */ {true, false, false, false, false},
943  /* .count = */ 1,
944  /* .condition = */ {},
945  },
946  {
947  /* .name = */ "magnetic_field",
948  /* .docs = */ "[G]",
949  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
950  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::magnetic_field>,
951  /* .attributes = */ {true, false, false, false, false},
952  /* .count = */ 1,
953  /* .condition = */ {},
954  },
955  {
956  /* .name = */ "uncertainty",
957  /* .docs = */ "[G] 1-sigma uncertainty. Cannot be 0 unless the corresponding valid flags are 0.",
958  /* .type = */ {Type::STRUCT, &MetadataFor<Vector3f>::value},
959  /* .accessor = */ nullptr, //utils::access<type, Vector3f, &type::uncertainty>,
960  /* .attributes = */ {true, false, false, false, false},
961  /* .count = */ 1,
962  /* .condition = */ {},
963  },
964  {
965  /* .name = */ "valid_flags",
966  /* .docs = */ "Valid flags. Axes with 0 will be completely ignored.",
968  /* .accessor = */ nullptr, //utils::access<type, commands_aiding::MagneticField::ValidFlags, &type::valid_flags>,
969  /* .attributes = */ {true, false, false, false, false},
970  /* .count = */ 1,
971  /* .condition = */ {},
972  },
973  };
974 
975  static constexpr inline FieldInfo value = {
976  /* .name = */ "commands_aiding::MagneticField",
977  /* .title = */ "Magnetic Field",
978  /* .docs = */ "Estimate of magnetic field in the frame associated with the given sensor ID.",
979  /* .parameters = */ parameters,
980  /* .descriptor = */ type::DESCRIPTOR,
981  /* .functions = */ NO_FUNCTIONS,
982  /* .response = */ nullptr,
983  };
984 };
985 
986 template<>
987 struct MetadataFor<commands_aiding::Pressure>
988 {
990 
991  static constexpr inline ParameterInfo parameters[] = {
992  {
993  /* .name = */ "time",
994  /* .docs = */ "Timestamp of the measurement.",
996  /* .accessor = */ nullptr, //utils::access<type, commands_aiding::Time, &type::time>,
997  /* .attributes = */ {true, false, false, false, false},
998  /* .count = */ 1,
999  /* .condition = */ {},
1000  },
1001  {
1002  /* .name = */ "frame_id",
1003  /* .docs = */ "Source ID for this estimate (source_id == 0 indicates this sensor, source_id > 0 indicates an external estimate).",
1004  /* .type = */ {Type::U8, nullptr},
1005  /* .accessor = */ nullptr, //utils::access<type, uint8_t, &type::frame_id>,
1006  /* .attributes = */ {true, false, false, false, false},
1007  /* .count = */ 1,
1008  /* .condition = */ {},
1009  },
1010  {
1011  /* .name = */ "pressure",
1012  /* .docs = */ "[mbar]",
1013  /* .type = */ {Type::FLOAT, nullptr},
1014  /* .accessor = */ nullptr, //utils::access<type, float, &type::pressure>,
1015  /* .attributes = */ {true, false, false, false, false},
1016  /* .count = */ 1,
1017  /* .condition = */ {},
1018  },
1019  {
1020  /* .name = */ "uncertainty",
1021  /* .docs = */ "[mbar] 1-sigma uncertainty. Cannot be 0 unless the valid flags are 0.",
1022  /* .type = */ {Type::FLOAT, nullptr},
1023  /* .accessor = */ nullptr, //utils::access<type, float, &type::uncertainty>,
1024  /* .attributes = */ {true, false, false, false, false},
1025  /* .count = */ 1,
1026  /* .condition = */ {},
1027  },
1028  {
1029  /* .name = */ "valid_flags",
1030  /* .docs = */ "",
1031  /* .type = */ {Type::U16, nullptr},
1032  /* .accessor = */ nullptr, //utils::access<type, uint16_t, &type::valid_flags>,
1033  /* .attributes = */ {true, false, false, false, false},
1034  /* .count = */ 1,
1035  /* .condition = */ {},
1036  },
1037  };
1038 
1039  static constexpr inline FieldInfo value = {
1040  /* .name = */ "commands_aiding::Pressure",
1041  /* .title = */ "Pressure",
1042  /* .docs = */ "Estimated value of air pressure.",
1043  /* .parameters = */ parameters,
1044  /* .descriptor = */ type::DESCRIPTOR,
1045  /* .functions = */ NO_FUNCTIONS,
1046  /* .response = */ nullptr,
1047  };
1048 };
1049 
1050 
1051 static constexpr inline const FieldInfo* COMMANDS_AIDING_FIELDS[] = {
1065 };
1066 
1067 static constexpr DescriptorSetInfo COMMANDS_AIDING = {
1068  /*.descriptor =*/ mip::commands_aiding::DESCRIPTOR_SET,
1069  /*.name =*/ "Aiding Commands",
1070  /*.fields =*/ COMMANDS_AIDING_FIELDS,
1071 };
1072 
1073 } // namespace mip::metadata
1074 
mip::commands_aiding::PosEcef::ValidFlags
Definition: commands_aiding.hpp:301
mip::metadata::MetadataFor< commands_aiding::EchoControl::Response >::value
static constexpr FieldInfo value
Definition: commands_aiding.hpp:233
mip::metadata::MetadataFor< commands_aiding::FrameConfig >::value
static constexpr FieldInfo value
Definition: commands_aiding.hpp:185
mip::metadata::Type::ENUM
@ ENUM
mip::commands_aiding::FrameConfig::Rotation
Definition: commands_aiding.hpp:122
mip::commands_aiding::DESCRIPTOR_SET
@ DESCRIPTOR_SET
Definition: commands_aiding.hpp:31
mip::commands_aiding::HeightAboveEllipsoid
Definition: commands_aiding.hpp:449
mip::metadata::BitfieldInfo
Definition: mip_structures.hpp:91
mip::metadata
Definition: commands_3dm.hpp:10
mip::commands_aiding::EchoControl
Definition: commands_aiding.hpp:214
mip::commands_aiding::PosLlh::ValidFlags
Definition: commands_aiding.hpp:376
mip::commands_aiding::MagneticField::ValidFlags
Definition: commands_aiding.hpp:755
mip::commands_aiding::VelBodyFrame
Definition: commands_aiding.hpp:638
mip::metadata::MetadataFor< commands_aiding::VelEcef >::value
static constexpr FieldInfo value
Definition: commands_aiding.hpp:659
mip::commands_aiding::FrameConfig::Response
Definition: commands_aiding.hpp:167
mip::metadata::MetadataFor< commands_aiding::PosEcef >::value
static constexpr FieldInfo value
Definition: commands_aiding.hpp:409
mip::metadata::Type::U16
@ U16
mip::metadata::MetadataFor
Definition: mip_metadata.hpp:15
mip::metadata::MetadataFor< commands_aiding::VelNed >::value
static constexpr FieldInfo value
Definition: commands_aiding.hpp:743
mip::metadata::Type::STRUCT
@ STRUCT
mip::commands_aiding::HeadingTrue
Definition: commands_aiding.hpp:710
mip::commands_aiding::FrameConfig::Format
Format
Definition: commands_aiding.hpp:116
mip::metadata::Type::DOUBLE
@ DOUBLE
mip::metadata::ParameterInfo
Definition: mip_structures.hpp:161
mip::metadata::EnumInfo::Entry
Definition: mip_structures.hpp:67
mip::metadata::Type::UNION
@ UNION
mip_metadata.hpp
mip::metadata::MetadataFor< commands_aiding::FrameConfig::Response >::value
static constexpr FieldInfo value
Definition: commands_aiding.hpp:120
mip::commands_aiding::Time
Definition: commands_aiding.hpp:60
mip::commands_aiding::FrameConfig::Format::EULER
@ EULER
Translation vector followed by euler angles (roll, pitch, yaw).
mip::commands_aiding::EchoControl::Response
Definition: commands_aiding.hpp:256
mip::commands_aiding::Pressure
Definition: commands_aiding.hpp:826
mip::metadata::Type::FLOAT
@ FLOAT
mip::commands_aiding::Time::Timebase
Timebase
Definition: commands_aiding.hpp:62
mip::metadata::MetadataFor< commands_aiding::EchoControl >::value
static constexpr FieldInfo value
Definition: commands_aiding.hpp:262
mip::commands_aiding::MagneticField
Definition: commands_aiding.hpp:753
mip::metadata::Type::U64
@ U64
mip::commands_aiding::FrameConfig
Definition: commands_aiding.hpp:114
mip::metadata::Type::BOOL
@ BOOL
microstrain::Index
Represents an index ranging from 0..N excluding N.
Definition: index.hpp:28
mip::metadata::FieldInfo
Definition: mip_structures.hpp:216
mip::metadata::Type::U8
@ U8
mip::commands_aiding::VelBodyFrame::ValidFlags
Definition: commands_aiding.hpp:640
mip::metadata::ParameterInfo::Condition::Type::ENUM
@ ENUM
Enum value selector (e.g. for parameters in unions)
mip::commands_aiding::FrameConfig::Format::QUATERNION
@ QUATERNION
Translation vector followed by quaternion (w, x, y, z).
mip::metadata::MetadataFor< commands_aiding::VelBodyFrame >::value
static constexpr FieldInfo value
Definition: commands_aiding.hpp:827
mip::commands_aiding::VelNed::ValidFlags
Definition: commands_aiding.hpp:567
mip::commands_aiding::PosLlh
Definition: commands_aiding.hpp:374
mip::commands_aiding::VelEcef
Definition: commands_aiding.hpp:492
mip::commands_aiding::PosEcef
Definition: commands_aiding.hpp:299
mip::metadata::EnumInfo
Definition: mip_structures.hpp:65
mip::commands_aiding::EchoControl::Mode
Mode
Definition: commands_aiding.hpp:216
commands_aiding.hpp
mip::metadata::MetadataFor< commands_aiding::Pressure >::value
static constexpr FieldInfo value
Definition: commands_aiding.hpp:1039
mip::commands_aiding::VelNed
Definition: commands_aiding.hpp:565
mip::metadata::MetadataFor< commands_aiding::HeadingTrue >::value
static constexpr FieldInfo value
Definition: commands_aiding.hpp:891
mip::metadata::MetadataFor< commands_aiding::HeightAboveEllipsoid >::value
static constexpr FieldInfo value
Definition: commands_aiding.hpp:575
mip::metadata::Type::BITS
@ BITS
mip::metadata::StructInfo
Definition: mip_structures.hpp:205
mip::commands_aiding::VelEcef::ValidFlags
Definition: commands_aiding.hpp:494
common.hpp
mip::metadata::MetadataFor< commands_aiding::PosLlh >::value
static constexpr FieldInfo value
Definition: commands_aiding.hpp:511
mip::metadata::MetadataFor< commands_aiding::MagneticField >::value
static constexpr FieldInfo value
Definition: commands_aiding.hpp:975