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