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