• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mavlink / MAVSDK / 13298134957

13 Feb 2025 01:04AM UTC coverage: 44.549% (-0.08%) from 44.629%
13298134957

push

github

web-flow
Telemetry and TelemetryServer improvements (#2511)

* proto: update to latest main (1.2.1)

This fixes a regression with 1.2.0 regarding extra options.

* Add attitude and expanded fixed wing metrics for TelemetryServer

* Bug fix for ranges on attitude and heading messages

* Re-order FixedwingMetrics fields for backward compatibility

* PR feedback: altitude_msl -> absolute_altitude_m

* Proto update

* proto based on main

* Proto -> main

---------

Co-authored-by: Julian Oes <julian@oes.ch>
Co-authored-by: Jon Reeves <jon.reeves@elroyair.com>

0 of 53 new or added lines in 4 files covered. (0.0%)

7 existing lines in 4 files now uncovered.

14593 of 32757 relevant lines covered (44.55%)

284.58 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.92
/src/mavsdk/plugins/telemetry/telemetry.cpp
1
// WARNING: THIS FILE IS AUTOGENERATED! As such, it should not be edited.
2
// Edits need to be made to the proto files
3
// (see https://github.com/mavlink/MAVSDK-Proto/blob/master/protos/telemetry/telemetry.proto)
4

5
#include <iomanip>
6

7
#include "telemetry_impl.h"
8
#include "plugins/telemetry/telemetry.h"
9

10
namespace mavsdk {
11

12
using Position = Telemetry::Position;
13
using Heading = Telemetry::Heading;
14
using Quaternion = Telemetry::Quaternion;
15
using EulerAngle = Telemetry::EulerAngle;
16
using AngularVelocityBody = Telemetry::AngularVelocityBody;
17
using GpsInfo = Telemetry::GpsInfo;
18
using RawGps = Telemetry::RawGps;
19
using Battery = Telemetry::Battery;
20
using Health = Telemetry::Health;
21
using RcStatus = Telemetry::RcStatus;
22
using StatusText = Telemetry::StatusText;
23
using ActuatorControlTarget = Telemetry::ActuatorControlTarget;
24
using ActuatorOutputStatus = Telemetry::ActuatorOutputStatus;
25
using Covariance = Telemetry::Covariance;
26
using VelocityBody = Telemetry::VelocityBody;
27
using PositionBody = Telemetry::PositionBody;
28
using Odometry = Telemetry::Odometry;
29
using DistanceSensor = Telemetry::DistanceSensor;
30
using ScaledPressure = Telemetry::ScaledPressure;
31
using PositionNed = Telemetry::PositionNed;
32
using VelocityNed = Telemetry::VelocityNed;
33
using PositionVelocityNed = Telemetry::PositionVelocityNed;
34
using GroundTruth = Telemetry::GroundTruth;
35
using FixedwingMetrics = Telemetry::FixedwingMetrics;
36
using AccelerationFrd = Telemetry::AccelerationFrd;
37
using AngularVelocityFrd = Telemetry::AngularVelocityFrd;
38
using MagneticFieldFrd = Telemetry::MagneticFieldFrd;
39
using Imu = Telemetry::Imu;
40
using GpsGlobalOrigin = Telemetry::GpsGlobalOrigin;
41
using Altitude = Telemetry::Altitude;
42

43
Telemetry::Telemetry(System& system) : PluginBase(), _impl{std::make_unique<TelemetryImpl>(system)}
×
44
{}
×
45

46
Telemetry::Telemetry(std::shared_ptr<System> system) :
1✔
47
    PluginBase(),
48
    _impl{std::make_unique<TelemetryImpl>(system)}
1✔
49
{}
1✔
50

51
Telemetry::~Telemetry() {}
1✔
52

53
Telemetry::PositionHandle Telemetry::subscribe_position(const PositionCallback& callback)
×
54
{
55
    return _impl->subscribe_position(callback);
×
56
}
57

58
void Telemetry::unsubscribe_position(PositionHandle handle)
×
59
{
60
    _impl->unsubscribe_position(handle);
×
61
}
×
62

63
Telemetry::Position Telemetry::position() const
×
64
{
65
    return _impl->position();
×
66
}
67

68
Telemetry::HomeHandle Telemetry::subscribe_home(const HomeCallback& callback)
×
69
{
70
    return _impl->subscribe_home(callback);
×
71
}
72

73
void Telemetry::unsubscribe_home(HomeHandle handle)
×
74
{
75
    _impl->unsubscribe_home(handle);
×
76
}
×
77

78
Telemetry::Position Telemetry::home() const
×
79
{
80
    return _impl->home();
×
81
}
82

83
Telemetry::InAirHandle Telemetry::subscribe_in_air(const InAirCallback& callback)
×
84
{
85
    return _impl->subscribe_in_air(callback);
×
86
}
87

88
void Telemetry::unsubscribe_in_air(InAirHandle handle)
×
89
{
90
    _impl->unsubscribe_in_air(handle);
×
91
}
×
92

93
bool Telemetry::in_air() const
×
94
{
95
    return _impl->in_air();
×
96
}
97

98
Telemetry::LandedStateHandle Telemetry::subscribe_landed_state(const LandedStateCallback& callback)
×
99
{
100
    return _impl->subscribe_landed_state(callback);
×
101
}
102

103
void Telemetry::unsubscribe_landed_state(LandedStateHandle handle)
×
104
{
105
    _impl->unsubscribe_landed_state(handle);
×
106
}
×
107

108
Telemetry::LandedState Telemetry::landed_state() const
×
109
{
110
    return _impl->landed_state();
×
111
}
112

113
Telemetry::ArmedHandle Telemetry::subscribe_armed(const ArmedCallback& callback)
×
114
{
115
    return _impl->subscribe_armed(callback);
×
116
}
117

118
void Telemetry::unsubscribe_armed(ArmedHandle handle)
×
119
{
120
    _impl->unsubscribe_armed(handle);
×
121
}
×
122

123
bool Telemetry::armed() const
×
124
{
125
    return _impl->armed();
×
126
}
127

128
Telemetry::VtolStateHandle Telemetry::subscribe_vtol_state(const VtolStateCallback& callback)
×
129
{
130
    return _impl->subscribe_vtol_state(callback);
×
131
}
132

133
void Telemetry::unsubscribe_vtol_state(VtolStateHandle handle)
×
134
{
135
    _impl->unsubscribe_vtol_state(handle);
×
136
}
×
137

138
Telemetry::VtolState Telemetry::vtol_state() const
×
139
{
140
    return _impl->vtol_state();
×
141
}
142

143
Telemetry::AttitudeQuaternionHandle
144
Telemetry::subscribe_attitude_quaternion(const AttitudeQuaternionCallback& callback)
×
145
{
146
    return _impl->subscribe_attitude_quaternion(callback);
×
147
}
148

149
void Telemetry::unsubscribe_attitude_quaternion(AttitudeQuaternionHandle handle)
×
150
{
151
    _impl->unsubscribe_attitude_quaternion(handle);
×
152
}
×
153

154
Telemetry::Quaternion Telemetry::attitude_quaternion() const
×
155
{
156
    return _impl->attitude_quaternion();
×
157
}
158

159
Telemetry::AttitudeEulerHandle
160
Telemetry::subscribe_attitude_euler(const AttitudeEulerCallback& callback)
×
161
{
162
    return _impl->subscribe_attitude_euler(callback);
×
163
}
164

165
void Telemetry::unsubscribe_attitude_euler(AttitudeEulerHandle handle)
×
166
{
167
    _impl->unsubscribe_attitude_euler(handle);
×
168
}
×
169

170
Telemetry::EulerAngle Telemetry::attitude_euler() const
×
171
{
172
    return _impl->attitude_euler();
×
173
}
174

175
Telemetry::AttitudeAngularVelocityBodyHandle Telemetry::subscribe_attitude_angular_velocity_body(
×
176
    const AttitudeAngularVelocityBodyCallback& callback)
177
{
178
    return _impl->subscribe_attitude_angular_velocity_body(callback);
×
179
}
180

181
void Telemetry::unsubscribe_attitude_angular_velocity_body(AttitudeAngularVelocityBodyHandle handle)
×
182
{
183
    _impl->unsubscribe_attitude_angular_velocity_body(handle);
×
184
}
×
185

186
Telemetry::AngularVelocityBody Telemetry::attitude_angular_velocity_body() const
×
187
{
188
    return _impl->attitude_angular_velocity_body();
×
189
}
190

191
Telemetry::VelocityNedHandle Telemetry::subscribe_velocity_ned(const VelocityNedCallback& callback)
×
192
{
193
    return _impl->subscribe_velocity_ned(callback);
×
194
}
195

196
void Telemetry::unsubscribe_velocity_ned(VelocityNedHandle handle)
×
197
{
198
    _impl->unsubscribe_velocity_ned(handle);
×
199
}
×
200

201
Telemetry::VelocityNed Telemetry::velocity_ned() const
×
202
{
203
    return _impl->velocity_ned();
×
204
}
205

206
Telemetry::GpsInfoHandle Telemetry::subscribe_gps_info(const GpsInfoCallback& callback)
×
207
{
208
    return _impl->subscribe_gps_info(callback);
×
209
}
210

211
void Telemetry::unsubscribe_gps_info(GpsInfoHandle handle)
×
212
{
213
    _impl->unsubscribe_gps_info(handle);
×
214
}
×
215

216
Telemetry::GpsInfo Telemetry::gps_info() const
×
217
{
218
    return _impl->gps_info();
×
219
}
220

221
Telemetry::RawGpsHandle Telemetry::subscribe_raw_gps(const RawGpsCallback& callback)
×
222
{
223
    return _impl->subscribe_raw_gps(callback);
×
224
}
225

226
void Telemetry::unsubscribe_raw_gps(RawGpsHandle handle)
×
227
{
228
    _impl->unsubscribe_raw_gps(handle);
×
229
}
×
230

231
Telemetry::RawGps Telemetry::raw_gps() const
×
232
{
233
    return _impl->raw_gps();
×
234
}
235

236
Telemetry::BatteryHandle Telemetry::subscribe_battery(const BatteryCallback& callback)
×
237
{
238
    return _impl->subscribe_battery(callback);
×
239
}
240

241
void Telemetry::unsubscribe_battery(BatteryHandle handle)
×
242
{
243
    _impl->unsubscribe_battery(handle);
×
244
}
×
245

246
Telemetry::Battery Telemetry::battery() const
×
247
{
248
    return _impl->battery();
×
249
}
250

251
Telemetry::FlightModeHandle Telemetry::subscribe_flight_mode(const FlightModeCallback& callback)
×
252
{
253
    return _impl->subscribe_flight_mode(callback);
×
254
}
255

256
void Telemetry::unsubscribe_flight_mode(FlightModeHandle handle)
×
257
{
258
    _impl->unsubscribe_flight_mode(handle);
×
259
}
×
260

261
Telemetry::FlightMode Telemetry::flight_mode() const
×
262
{
263
    return _impl->flight_mode();
×
264
}
265

266
Telemetry::HealthHandle Telemetry::subscribe_health(const HealthCallback& callback)
×
267
{
268
    return _impl->subscribe_health(callback);
×
269
}
270

271
void Telemetry::unsubscribe_health(HealthHandle handle)
×
272
{
273
    _impl->unsubscribe_health(handle);
×
274
}
×
275

276
Telemetry::Health Telemetry::health() const
×
277
{
278
    return _impl->health();
×
279
}
280

281
Telemetry::RcStatusHandle Telemetry::subscribe_rc_status(const RcStatusCallback& callback)
×
282
{
283
    return _impl->subscribe_rc_status(callback);
×
284
}
285

286
void Telemetry::unsubscribe_rc_status(RcStatusHandle handle)
×
287
{
288
    _impl->unsubscribe_rc_status(handle);
×
289
}
×
290

291
Telemetry::RcStatus Telemetry::rc_status() const
×
292
{
293
    return _impl->rc_status();
×
294
}
295

296
Telemetry::StatusTextHandle Telemetry::subscribe_status_text(const StatusTextCallback& callback)
2✔
297
{
298
    return _impl->subscribe_status_text(callback);
2✔
299
}
300

301
void Telemetry::unsubscribe_status_text(StatusTextHandle handle)
1✔
302
{
303
    _impl->unsubscribe_status_text(handle);
1✔
304
}
1✔
305

306
Telemetry::StatusText Telemetry::status_text() const
×
307
{
308
    return _impl->status_text();
×
309
}
310

311
Telemetry::ActuatorControlTargetHandle
312
Telemetry::subscribe_actuator_control_target(const ActuatorControlTargetCallback& callback)
×
313
{
314
    return _impl->subscribe_actuator_control_target(callback);
×
315
}
316

317
void Telemetry::unsubscribe_actuator_control_target(ActuatorControlTargetHandle handle)
×
318
{
319
    _impl->unsubscribe_actuator_control_target(handle);
×
320
}
×
321

322
Telemetry::ActuatorControlTarget Telemetry::actuator_control_target() const
×
323
{
324
    return _impl->actuator_control_target();
×
325
}
326

327
Telemetry::ActuatorOutputStatusHandle
328
Telemetry::subscribe_actuator_output_status(const ActuatorOutputStatusCallback& callback)
×
329
{
330
    return _impl->subscribe_actuator_output_status(callback);
×
331
}
332

333
void Telemetry::unsubscribe_actuator_output_status(ActuatorOutputStatusHandle handle)
×
334
{
335
    _impl->unsubscribe_actuator_output_status(handle);
×
336
}
×
337

338
Telemetry::ActuatorOutputStatus Telemetry::actuator_output_status() const
×
339
{
340
    return _impl->actuator_output_status();
×
341
}
342

343
Telemetry::OdometryHandle Telemetry::subscribe_odometry(const OdometryCallback& callback)
×
344
{
345
    return _impl->subscribe_odometry(callback);
×
346
}
347

348
void Telemetry::unsubscribe_odometry(OdometryHandle handle)
×
349
{
350
    _impl->unsubscribe_odometry(handle);
×
351
}
×
352

353
Telemetry::Odometry Telemetry::odometry() const
×
354
{
355
    return _impl->odometry();
×
356
}
357

358
Telemetry::PositionVelocityNedHandle
359
Telemetry::subscribe_position_velocity_ned(const PositionVelocityNedCallback& callback)
×
360
{
361
    return _impl->subscribe_position_velocity_ned(callback);
×
362
}
363

364
void Telemetry::unsubscribe_position_velocity_ned(PositionVelocityNedHandle handle)
×
365
{
366
    _impl->unsubscribe_position_velocity_ned(handle);
×
367
}
×
368

369
Telemetry::PositionVelocityNed Telemetry::position_velocity_ned() const
×
370
{
371
    return _impl->position_velocity_ned();
×
372
}
373

374
Telemetry::GroundTruthHandle Telemetry::subscribe_ground_truth(const GroundTruthCallback& callback)
×
375
{
376
    return _impl->subscribe_ground_truth(callback);
×
377
}
378

379
void Telemetry::unsubscribe_ground_truth(GroundTruthHandle handle)
×
380
{
381
    _impl->unsubscribe_ground_truth(handle);
×
382
}
×
383

384
Telemetry::GroundTruth Telemetry::ground_truth() const
×
385
{
386
    return _impl->ground_truth();
×
387
}
388

389
Telemetry::FixedwingMetricsHandle
390
Telemetry::subscribe_fixedwing_metrics(const FixedwingMetricsCallback& callback)
×
391
{
392
    return _impl->subscribe_fixedwing_metrics(callback);
×
393
}
394

395
void Telemetry::unsubscribe_fixedwing_metrics(FixedwingMetricsHandle handle)
×
396
{
397
    _impl->unsubscribe_fixedwing_metrics(handle);
×
398
}
×
399

400
Telemetry::FixedwingMetrics Telemetry::fixedwing_metrics() const
×
401
{
402
    return _impl->fixedwing_metrics();
×
403
}
404

405
Telemetry::ImuHandle Telemetry::subscribe_imu(const ImuCallback& callback)
×
406
{
407
    return _impl->subscribe_imu(callback);
×
408
}
409

410
void Telemetry::unsubscribe_imu(ImuHandle handle)
×
411
{
412
    _impl->unsubscribe_imu(handle);
×
413
}
×
414

415
Telemetry::Imu Telemetry::imu() const
×
416
{
417
    return _impl->imu();
×
418
}
419

420
Telemetry::ScaledImuHandle Telemetry::subscribe_scaled_imu(const ScaledImuCallback& callback)
×
421
{
422
    return _impl->subscribe_scaled_imu(callback);
×
423
}
424

425
void Telemetry::unsubscribe_scaled_imu(ScaledImuHandle handle)
×
426
{
427
    _impl->unsubscribe_scaled_imu(handle);
×
428
}
×
429

430
Telemetry::Imu Telemetry::scaled_imu() const
×
431
{
432
    return _impl->scaled_imu();
×
433
}
434

435
Telemetry::RawImuHandle Telemetry::subscribe_raw_imu(const RawImuCallback& callback)
×
436
{
437
    return _impl->subscribe_raw_imu(callback);
×
438
}
439

440
void Telemetry::unsubscribe_raw_imu(RawImuHandle handle)
×
441
{
442
    _impl->unsubscribe_raw_imu(handle);
×
443
}
×
444

445
Telemetry::Imu Telemetry::raw_imu() const
×
446
{
447
    return _impl->raw_imu();
×
448
}
449

450
Telemetry::HealthAllOkHandle Telemetry::subscribe_health_all_ok(const HealthAllOkCallback& callback)
×
451
{
452
    return _impl->subscribe_health_all_ok(callback);
×
453
}
454

455
void Telemetry::unsubscribe_health_all_ok(HealthAllOkHandle handle)
×
456
{
457
    _impl->unsubscribe_health_all_ok(handle);
×
458
}
×
459

460
bool Telemetry::health_all_ok() const
×
461
{
462
    return _impl->health_all_ok();
×
463
}
464

465
Telemetry::UnixEpochTimeHandle
466
Telemetry::subscribe_unix_epoch_time(const UnixEpochTimeCallback& callback)
×
467
{
468
    return _impl->subscribe_unix_epoch_time(callback);
×
469
}
470

471
void Telemetry::unsubscribe_unix_epoch_time(UnixEpochTimeHandle handle)
×
472
{
473
    _impl->unsubscribe_unix_epoch_time(handle);
×
474
}
×
475

476
uint64_t Telemetry::unix_epoch_time() const
×
477
{
478
    return _impl->unix_epoch_time();
×
479
}
480

481
Telemetry::DistanceSensorHandle
482
Telemetry::subscribe_distance_sensor(const DistanceSensorCallback& callback)
×
483
{
484
    return _impl->subscribe_distance_sensor(callback);
×
485
}
486

487
void Telemetry::unsubscribe_distance_sensor(DistanceSensorHandle handle)
×
488
{
489
    _impl->unsubscribe_distance_sensor(handle);
×
490
}
×
491

492
Telemetry::DistanceSensor Telemetry::distance_sensor() const
×
493
{
494
    return _impl->distance_sensor();
×
495
}
496

497
Telemetry::ScaledPressureHandle
498
Telemetry::subscribe_scaled_pressure(const ScaledPressureCallback& callback)
×
499
{
500
    return _impl->subscribe_scaled_pressure(callback);
×
501
}
502

503
void Telemetry::unsubscribe_scaled_pressure(ScaledPressureHandle handle)
×
504
{
505
    _impl->unsubscribe_scaled_pressure(handle);
×
506
}
×
507

508
Telemetry::ScaledPressure Telemetry::scaled_pressure() const
×
509
{
510
    return _impl->scaled_pressure();
×
511
}
512

513
Telemetry::HeadingHandle Telemetry::subscribe_heading(const HeadingCallback& callback)
×
514
{
515
    return _impl->subscribe_heading(callback);
×
516
}
517

518
void Telemetry::unsubscribe_heading(HeadingHandle handle)
×
519
{
520
    _impl->unsubscribe_heading(handle);
×
521
}
×
522

523
Telemetry::Heading Telemetry::heading() const
×
524
{
525
    return _impl->heading();
×
526
}
527

528
Telemetry::AltitudeHandle Telemetry::subscribe_altitude(const AltitudeCallback& callback)
×
529
{
530
    return _impl->subscribe_altitude(callback);
×
531
}
532

533
void Telemetry::unsubscribe_altitude(AltitudeHandle handle)
×
534
{
535
    _impl->unsubscribe_altitude(handle);
×
536
}
×
537

538
Telemetry::Altitude Telemetry::altitude() const
×
539
{
540
    return _impl->altitude();
×
541
}
542

543
void Telemetry::set_rate_position_async(double rate_hz, const ResultCallback callback)
×
544
{
545
    _impl->set_rate_position_async(rate_hz, callback);
×
546
}
×
547

548
Telemetry::Result Telemetry::set_rate_position(double rate_hz) const
×
549
{
550
    return _impl->set_rate_position(rate_hz);
×
551
}
552

553
void Telemetry::set_rate_home_async(double rate_hz, const ResultCallback callback)
×
554
{
555
    _impl->set_rate_home_async(rate_hz, callback);
×
556
}
×
557

558
Telemetry::Result Telemetry::set_rate_home(double rate_hz) const
×
559
{
560
    return _impl->set_rate_home(rate_hz);
×
561
}
562

563
void Telemetry::set_rate_in_air_async(double rate_hz, const ResultCallback callback)
×
564
{
565
    _impl->set_rate_in_air_async(rate_hz, callback);
×
566
}
×
567

568
Telemetry::Result Telemetry::set_rate_in_air(double rate_hz) const
×
569
{
570
    return _impl->set_rate_in_air(rate_hz);
×
571
}
572

573
void Telemetry::set_rate_landed_state_async(double rate_hz, const ResultCallback callback)
×
574
{
575
    _impl->set_rate_landed_state_async(rate_hz, callback);
×
576
}
×
577

578
Telemetry::Result Telemetry::set_rate_landed_state(double rate_hz) const
×
579
{
580
    return _impl->set_rate_landed_state(rate_hz);
×
581
}
582

583
void Telemetry::set_rate_vtol_state_async(double rate_hz, const ResultCallback callback)
×
584
{
585
    _impl->set_rate_vtol_state_async(rate_hz, callback);
×
586
}
×
587

588
Telemetry::Result Telemetry::set_rate_vtol_state(double rate_hz) const
×
589
{
590
    return _impl->set_rate_vtol_state(rate_hz);
×
591
}
592

593
void Telemetry::set_rate_attitude_quaternion_async(double rate_hz, const ResultCallback callback)
×
594
{
595
    _impl->set_rate_attitude_quaternion_async(rate_hz, callback);
×
596
}
×
597

598
Telemetry::Result Telemetry::set_rate_attitude_quaternion(double rate_hz) const
×
599
{
600
    return _impl->set_rate_attitude_quaternion(rate_hz);
×
601
}
602

603
void Telemetry::set_rate_attitude_euler_async(double rate_hz, const ResultCallback callback)
×
604
{
605
    _impl->set_rate_attitude_euler_async(rate_hz, callback);
×
606
}
×
607

608
Telemetry::Result Telemetry::set_rate_attitude_euler(double rate_hz) const
×
609
{
610
    return _impl->set_rate_attitude_euler(rate_hz);
×
611
}
612

613
void Telemetry::set_rate_velocity_ned_async(double rate_hz, const ResultCallback callback)
×
614
{
615
    _impl->set_rate_velocity_ned_async(rate_hz, callback);
×
616
}
×
617

618
Telemetry::Result Telemetry::set_rate_velocity_ned(double rate_hz) const
×
619
{
620
    return _impl->set_rate_velocity_ned(rate_hz);
×
621
}
622

623
void Telemetry::set_rate_gps_info_async(double rate_hz, const ResultCallback callback)
×
624
{
625
    _impl->set_rate_gps_info_async(rate_hz, callback);
×
626
}
×
627

628
Telemetry::Result Telemetry::set_rate_gps_info(double rate_hz) const
×
629
{
630
    return _impl->set_rate_gps_info(rate_hz);
×
631
}
632

633
void Telemetry::set_rate_battery_async(double rate_hz, const ResultCallback callback)
×
634
{
635
    _impl->set_rate_battery_async(rate_hz, callback);
×
636
}
×
637

638
Telemetry::Result Telemetry::set_rate_battery(double rate_hz) const
×
639
{
640
    return _impl->set_rate_battery(rate_hz);
×
641
}
642

643
void Telemetry::set_rate_rc_status_async(double rate_hz, const ResultCallback callback)
×
644
{
645
    _impl->set_rate_rc_status_async(rate_hz, callback);
×
646
}
×
647

648
Telemetry::Result Telemetry::set_rate_rc_status(double rate_hz) const
×
649
{
650
    return _impl->set_rate_rc_status(rate_hz);
×
651
}
652

653
void Telemetry::set_rate_actuator_control_target_async(
×
654
    double rate_hz, const ResultCallback callback)
655
{
656
    _impl->set_rate_actuator_control_target_async(rate_hz, callback);
×
657
}
×
658

659
Telemetry::Result Telemetry::set_rate_actuator_control_target(double rate_hz) const
×
660
{
661
    return _impl->set_rate_actuator_control_target(rate_hz);
×
662
}
663

664
void Telemetry::set_rate_actuator_output_status_async(double rate_hz, const ResultCallback callback)
×
665
{
666
    _impl->set_rate_actuator_output_status_async(rate_hz, callback);
×
667
}
×
668

669
Telemetry::Result Telemetry::set_rate_actuator_output_status(double rate_hz) const
×
670
{
671
    return _impl->set_rate_actuator_output_status(rate_hz);
×
672
}
673

674
void Telemetry::set_rate_odometry_async(double rate_hz, const ResultCallback callback)
×
675
{
676
    _impl->set_rate_odometry_async(rate_hz, callback);
×
677
}
×
678

679
Telemetry::Result Telemetry::set_rate_odometry(double rate_hz) const
×
680
{
681
    return _impl->set_rate_odometry(rate_hz);
×
682
}
683

684
void Telemetry::set_rate_position_velocity_ned_async(double rate_hz, const ResultCallback callback)
×
685
{
686
    _impl->set_rate_position_velocity_ned_async(rate_hz, callback);
×
687
}
×
688

689
Telemetry::Result Telemetry::set_rate_position_velocity_ned(double rate_hz) const
×
690
{
691
    return _impl->set_rate_position_velocity_ned(rate_hz);
×
692
}
693

694
void Telemetry::set_rate_ground_truth_async(double rate_hz, const ResultCallback callback)
×
695
{
696
    _impl->set_rate_ground_truth_async(rate_hz, callback);
×
697
}
×
698

699
Telemetry::Result Telemetry::set_rate_ground_truth(double rate_hz) const
×
700
{
701
    return _impl->set_rate_ground_truth(rate_hz);
×
702
}
703

704
void Telemetry::set_rate_fixedwing_metrics_async(double rate_hz, const ResultCallback callback)
×
705
{
706
    _impl->set_rate_fixedwing_metrics_async(rate_hz, callback);
×
707
}
×
708

709
Telemetry::Result Telemetry::set_rate_fixedwing_metrics(double rate_hz) const
×
710
{
711
    return _impl->set_rate_fixedwing_metrics(rate_hz);
×
712
}
713

714
void Telemetry::set_rate_imu_async(double rate_hz, const ResultCallback callback)
×
715
{
716
    _impl->set_rate_imu_async(rate_hz, callback);
×
717
}
×
718

719
Telemetry::Result Telemetry::set_rate_imu(double rate_hz) const
×
720
{
721
    return _impl->set_rate_imu(rate_hz);
×
722
}
723

724
void Telemetry::set_rate_scaled_imu_async(double rate_hz, const ResultCallback callback)
×
725
{
726
    _impl->set_rate_scaled_imu_async(rate_hz, callback);
×
727
}
×
728

729
Telemetry::Result Telemetry::set_rate_scaled_imu(double rate_hz) const
×
730
{
731
    return _impl->set_rate_scaled_imu(rate_hz);
×
732
}
733

734
void Telemetry::set_rate_raw_imu_async(double rate_hz, const ResultCallback callback)
×
735
{
736
    _impl->set_rate_raw_imu_async(rate_hz, callback);
×
737
}
×
738

739
Telemetry::Result Telemetry::set_rate_raw_imu(double rate_hz) const
×
740
{
741
    return _impl->set_rate_raw_imu(rate_hz);
×
742
}
743

744
void Telemetry::set_rate_unix_epoch_time_async(double rate_hz, const ResultCallback callback)
×
745
{
746
    _impl->set_rate_unix_epoch_time_async(rate_hz, callback);
×
747
}
×
748

749
Telemetry::Result Telemetry::set_rate_unix_epoch_time(double rate_hz) const
×
750
{
751
    return _impl->set_rate_unix_epoch_time(rate_hz);
×
752
}
753

754
void Telemetry::set_rate_distance_sensor_async(double rate_hz, const ResultCallback callback)
×
755
{
756
    _impl->set_rate_distance_sensor_async(rate_hz, callback);
×
757
}
×
758

759
Telemetry::Result Telemetry::set_rate_distance_sensor(double rate_hz) const
×
760
{
761
    return _impl->set_rate_distance_sensor(rate_hz);
×
762
}
763

764
void Telemetry::set_rate_altitude_async(double rate_hz, const ResultCallback callback)
×
765
{
766
    _impl->set_rate_altitude_async(rate_hz, callback);
×
767
}
×
768

769
Telemetry::Result Telemetry::set_rate_altitude(double rate_hz) const
×
770
{
771
    return _impl->set_rate_altitude(rate_hz);
×
772
}
773

774
void Telemetry::get_gps_global_origin_async(const GetGpsGlobalOriginCallback callback)
×
775
{
776
    _impl->get_gps_global_origin_async(callback);
×
777
}
×
778

779
std::pair<Telemetry::Result, Telemetry::GpsGlobalOrigin> Telemetry::get_gps_global_origin() const
×
780
{
781
    return _impl->get_gps_global_origin();
×
782
}
783

784
bool operator==(const Telemetry::Position& lhs, const Telemetry::Position& rhs)
×
785
{
786
    return ((std::isnan(rhs.latitude_deg) && std::isnan(lhs.latitude_deg)) ||
×
787
            rhs.latitude_deg == lhs.latitude_deg) &&
×
788
           ((std::isnan(rhs.longitude_deg) && std::isnan(lhs.longitude_deg)) ||
×
789
            rhs.longitude_deg == lhs.longitude_deg) &&
×
790
           ((std::isnan(rhs.absolute_altitude_m) && std::isnan(lhs.absolute_altitude_m)) ||
×
791
            rhs.absolute_altitude_m == lhs.absolute_altitude_m) &&
×
792
           ((std::isnan(rhs.relative_altitude_m) && std::isnan(lhs.relative_altitude_m)) ||
×
793
            rhs.relative_altitude_m == lhs.relative_altitude_m);
×
794
}
795

796
std::ostream& operator<<(std::ostream& str, Telemetry::Position const& position)
×
797
{
798
    str << std::setprecision(15);
×
799
    str << "position:" << '\n' << "{\n";
×
800
    str << "    latitude_deg: " << position.latitude_deg << '\n';
×
801
    str << "    longitude_deg: " << position.longitude_deg << '\n';
×
802
    str << "    absolute_altitude_m: " << position.absolute_altitude_m << '\n';
×
803
    str << "    relative_altitude_m: " << position.relative_altitude_m << '\n';
×
804
    str << '}';
×
805
    return str;
×
806
}
807

808
bool operator==(const Telemetry::Heading& lhs, const Telemetry::Heading& rhs)
×
809
{
810
    return (
811
        (std::isnan(rhs.heading_deg) && std::isnan(lhs.heading_deg)) ||
×
812
        rhs.heading_deg == lhs.heading_deg);
×
813
}
814

815
std::ostream& operator<<(std::ostream& str, Telemetry::Heading const& heading)
×
816
{
817
    str << std::setprecision(15);
×
818
    str << "heading:" << '\n' << "{\n";
×
819
    str << "    heading_deg: " << heading.heading_deg << '\n';
×
820
    str << '}';
×
821
    return str;
×
822
}
823

824
bool operator==(const Telemetry::Quaternion& lhs, const Telemetry::Quaternion& rhs)
×
825
{
826
    return ((std::isnan(rhs.w) && std::isnan(lhs.w)) || rhs.w == lhs.w) &&
×
827
           ((std::isnan(rhs.x) && std::isnan(lhs.x)) || rhs.x == lhs.x) &&
×
828
           ((std::isnan(rhs.y) && std::isnan(lhs.y)) || rhs.y == lhs.y) &&
×
829
           ((std::isnan(rhs.z) && std::isnan(lhs.z)) || rhs.z == lhs.z) &&
×
830
           (rhs.timestamp_us == lhs.timestamp_us);
×
831
}
832

833
std::ostream& operator<<(std::ostream& str, Telemetry::Quaternion const& quaternion)
×
834
{
835
    str << std::setprecision(15);
×
836
    str << "quaternion:" << '\n' << "{\n";
×
837
    str << "    w: " << quaternion.w << '\n';
×
838
    str << "    x: " << quaternion.x << '\n';
×
839
    str << "    y: " << quaternion.y << '\n';
×
840
    str << "    z: " << quaternion.z << '\n';
×
841
    str << "    timestamp_us: " << quaternion.timestamp_us << '\n';
×
842
    str << '}';
×
843
    return str;
×
844
}
845

846
bool operator==(const Telemetry::EulerAngle& lhs, const Telemetry::EulerAngle& rhs)
×
847
{
848
    return ((std::isnan(rhs.roll_deg) && std::isnan(lhs.roll_deg)) ||
×
849
            rhs.roll_deg == lhs.roll_deg) &&
×
850
           ((std::isnan(rhs.pitch_deg) && std::isnan(lhs.pitch_deg)) ||
×
851
            rhs.pitch_deg == lhs.pitch_deg) &&
×
852
           ((std::isnan(rhs.yaw_deg) && std::isnan(lhs.yaw_deg)) || rhs.yaw_deg == lhs.yaw_deg) &&
×
853
           (rhs.timestamp_us == lhs.timestamp_us);
×
854
}
855

856
std::ostream& operator<<(std::ostream& str, Telemetry::EulerAngle const& euler_angle)
×
857
{
858
    str << std::setprecision(15);
×
859
    str << "euler_angle:" << '\n' << "{\n";
×
860
    str << "    roll_deg: " << euler_angle.roll_deg << '\n';
×
861
    str << "    pitch_deg: " << euler_angle.pitch_deg << '\n';
×
862
    str << "    yaw_deg: " << euler_angle.yaw_deg << '\n';
×
863
    str << "    timestamp_us: " << euler_angle.timestamp_us << '\n';
×
864
    str << '}';
×
865
    return str;
×
866
}
867

868
bool operator==(
×
869
    const Telemetry::AngularVelocityBody& lhs, const Telemetry::AngularVelocityBody& rhs)
870
{
871
    return ((std::isnan(rhs.roll_rad_s) && std::isnan(lhs.roll_rad_s)) ||
×
872
            rhs.roll_rad_s == lhs.roll_rad_s) &&
×
873
           ((std::isnan(rhs.pitch_rad_s) && std::isnan(lhs.pitch_rad_s)) ||
×
874
            rhs.pitch_rad_s == lhs.pitch_rad_s) &&
×
875
           ((std::isnan(rhs.yaw_rad_s) && std::isnan(lhs.yaw_rad_s)) ||
×
876
            rhs.yaw_rad_s == lhs.yaw_rad_s);
×
877
}
878

879
std::ostream&
880
operator<<(std::ostream& str, Telemetry::AngularVelocityBody const& angular_velocity_body)
×
881
{
882
    str << std::setprecision(15);
×
883
    str << "angular_velocity_body:" << '\n' << "{\n";
×
884
    str << "    roll_rad_s: " << angular_velocity_body.roll_rad_s << '\n';
×
885
    str << "    pitch_rad_s: " << angular_velocity_body.pitch_rad_s << '\n';
×
886
    str << "    yaw_rad_s: " << angular_velocity_body.yaw_rad_s << '\n';
×
887
    str << '}';
×
888
    return str;
×
889
}
890

891
bool operator==(const Telemetry::GpsInfo& lhs, const Telemetry::GpsInfo& rhs)
×
892
{
893
    return (rhs.num_satellites == lhs.num_satellites) && (rhs.fix_type == lhs.fix_type);
×
894
}
895

896
std::ostream& operator<<(std::ostream& str, Telemetry::GpsInfo const& gps_info)
×
897
{
898
    str << std::setprecision(15);
×
899
    str << "gps_info:" << '\n' << "{\n";
×
900
    str << "    num_satellites: " << gps_info.num_satellites << '\n';
×
901
    str << "    fix_type: " << gps_info.fix_type << '\n';
×
902
    str << '}';
×
903
    return str;
×
904
}
905

906
bool operator==(const Telemetry::RawGps& lhs, const Telemetry::RawGps& rhs)
×
907
{
908
    return (rhs.timestamp_us == lhs.timestamp_us) &&
×
909
           ((std::isnan(rhs.latitude_deg) && std::isnan(lhs.latitude_deg)) ||
×
910
            rhs.latitude_deg == lhs.latitude_deg) &&
×
911
           ((std::isnan(rhs.longitude_deg) && std::isnan(lhs.longitude_deg)) ||
×
912
            rhs.longitude_deg == lhs.longitude_deg) &&
×
913
           ((std::isnan(rhs.absolute_altitude_m) && std::isnan(lhs.absolute_altitude_m)) ||
×
914
            rhs.absolute_altitude_m == lhs.absolute_altitude_m) &&
×
915
           ((std::isnan(rhs.hdop) && std::isnan(lhs.hdop)) || rhs.hdop == lhs.hdop) &&
×
916
           ((std::isnan(rhs.vdop) && std::isnan(lhs.vdop)) || rhs.vdop == lhs.vdop) &&
×
917
           ((std::isnan(rhs.velocity_m_s) && std::isnan(lhs.velocity_m_s)) ||
×
918
            rhs.velocity_m_s == lhs.velocity_m_s) &&
×
919
           ((std::isnan(rhs.cog_deg) && std::isnan(lhs.cog_deg)) || rhs.cog_deg == lhs.cog_deg) &&
×
920
           ((std::isnan(rhs.altitude_ellipsoid_m) && std::isnan(lhs.altitude_ellipsoid_m)) ||
×
921
            rhs.altitude_ellipsoid_m == lhs.altitude_ellipsoid_m) &&
×
922
           ((std::isnan(rhs.horizontal_uncertainty_m) &&
×
923
             std::isnan(lhs.horizontal_uncertainty_m)) ||
×
924
            rhs.horizontal_uncertainty_m == lhs.horizontal_uncertainty_m) &&
×
925
           ((std::isnan(rhs.vertical_uncertainty_m) && std::isnan(lhs.vertical_uncertainty_m)) ||
×
926
            rhs.vertical_uncertainty_m == lhs.vertical_uncertainty_m) &&
×
927
           ((std::isnan(rhs.velocity_uncertainty_m_s) &&
×
928
             std::isnan(lhs.velocity_uncertainty_m_s)) ||
×
929
            rhs.velocity_uncertainty_m_s == lhs.velocity_uncertainty_m_s) &&
×
930
           ((std::isnan(rhs.heading_uncertainty_deg) && std::isnan(lhs.heading_uncertainty_deg)) ||
×
931
            rhs.heading_uncertainty_deg == lhs.heading_uncertainty_deg) &&
×
932
           ((std::isnan(rhs.yaw_deg) && std::isnan(lhs.yaw_deg)) || rhs.yaw_deg == lhs.yaw_deg);
×
933
}
934

935
std::ostream& operator<<(std::ostream& str, Telemetry::RawGps const& raw_gps)
×
936
{
937
    str << std::setprecision(15);
×
938
    str << "raw_gps:" << '\n' << "{\n";
×
939
    str << "    timestamp_us: " << raw_gps.timestamp_us << '\n';
×
940
    str << "    latitude_deg: " << raw_gps.latitude_deg << '\n';
×
941
    str << "    longitude_deg: " << raw_gps.longitude_deg << '\n';
×
942
    str << "    absolute_altitude_m: " << raw_gps.absolute_altitude_m << '\n';
×
943
    str << "    hdop: " << raw_gps.hdop << '\n';
×
944
    str << "    vdop: " << raw_gps.vdop << '\n';
×
945
    str << "    velocity_m_s: " << raw_gps.velocity_m_s << '\n';
×
946
    str << "    cog_deg: " << raw_gps.cog_deg << '\n';
×
947
    str << "    altitude_ellipsoid_m: " << raw_gps.altitude_ellipsoid_m << '\n';
×
948
    str << "    horizontal_uncertainty_m: " << raw_gps.horizontal_uncertainty_m << '\n';
×
949
    str << "    vertical_uncertainty_m: " << raw_gps.vertical_uncertainty_m << '\n';
×
950
    str << "    velocity_uncertainty_m_s: " << raw_gps.velocity_uncertainty_m_s << '\n';
×
951
    str << "    heading_uncertainty_deg: " << raw_gps.heading_uncertainty_deg << '\n';
×
952
    str << "    yaw_deg: " << raw_gps.yaw_deg << '\n';
×
953
    str << '}';
×
954
    return str;
×
955
}
956

957
bool operator==(const Telemetry::Battery& lhs, const Telemetry::Battery& rhs)
×
958
{
959
    return (rhs.id == lhs.id) &&
×
960
           ((std::isnan(rhs.temperature_degc) && std::isnan(lhs.temperature_degc)) ||
×
961
            rhs.temperature_degc == lhs.temperature_degc) &&
×
962
           ((std::isnan(rhs.voltage_v) && std::isnan(lhs.voltage_v)) ||
×
963
            rhs.voltage_v == lhs.voltage_v) &&
×
964
           ((std::isnan(rhs.current_battery_a) && std::isnan(lhs.current_battery_a)) ||
×
965
            rhs.current_battery_a == lhs.current_battery_a) &&
×
966
           ((std::isnan(rhs.capacity_consumed_ah) && std::isnan(lhs.capacity_consumed_ah)) ||
×
967
            rhs.capacity_consumed_ah == lhs.capacity_consumed_ah) &&
×
968
           ((std::isnan(rhs.remaining_percent) && std::isnan(lhs.remaining_percent)) ||
×
969
            rhs.remaining_percent == lhs.remaining_percent);
×
970
}
971

972
std::ostream& operator<<(std::ostream& str, Telemetry::Battery const& battery)
×
973
{
974
    str << std::setprecision(15);
×
975
    str << "battery:" << '\n' << "{\n";
×
976
    str << "    id: " << battery.id << '\n';
×
977
    str << "    temperature_degc: " << battery.temperature_degc << '\n';
×
978
    str << "    voltage_v: " << battery.voltage_v << '\n';
×
979
    str << "    current_battery_a: " << battery.current_battery_a << '\n';
×
980
    str << "    capacity_consumed_ah: " << battery.capacity_consumed_ah << '\n';
×
981
    str << "    remaining_percent: " << battery.remaining_percent << '\n';
×
982
    str << '}';
×
983
    return str;
×
984
}
985

986
bool operator==(const Telemetry::Health& lhs, const Telemetry::Health& rhs)
×
987
{
988
    return (rhs.is_gyrometer_calibration_ok == lhs.is_gyrometer_calibration_ok) &&
×
989
           (rhs.is_accelerometer_calibration_ok == lhs.is_accelerometer_calibration_ok) &&
×
990
           (rhs.is_magnetometer_calibration_ok == lhs.is_magnetometer_calibration_ok) &&
×
991
           (rhs.is_local_position_ok == lhs.is_local_position_ok) &&
×
992
           (rhs.is_global_position_ok == lhs.is_global_position_ok) &&
×
993
           (rhs.is_home_position_ok == lhs.is_home_position_ok) &&
×
994
           (rhs.is_armable == lhs.is_armable);
×
995
}
996

997
std::ostream& operator<<(std::ostream& str, Telemetry::Health const& health)
×
998
{
999
    str << std::setprecision(15);
×
1000
    str << "health:" << '\n' << "{\n";
×
1001
    str << "    is_gyrometer_calibration_ok: " << health.is_gyrometer_calibration_ok << '\n';
×
1002
    str << "    is_accelerometer_calibration_ok: " << health.is_accelerometer_calibration_ok
×
1003
        << '\n';
×
1004
    str << "    is_magnetometer_calibration_ok: " << health.is_magnetometer_calibration_ok << '\n';
×
1005
    str << "    is_local_position_ok: " << health.is_local_position_ok << '\n';
×
1006
    str << "    is_global_position_ok: " << health.is_global_position_ok << '\n';
×
1007
    str << "    is_home_position_ok: " << health.is_home_position_ok << '\n';
×
1008
    str << "    is_armable: " << health.is_armable << '\n';
×
1009
    str << '}';
×
1010
    return str;
×
1011
}
1012

1013
bool operator==(const Telemetry::RcStatus& lhs, const Telemetry::RcStatus& rhs)
×
1014
{
1015
    return (rhs.was_available_once == lhs.was_available_once) &&
×
1016
           (rhs.is_available == lhs.is_available) &&
×
1017
           ((std::isnan(rhs.signal_strength_percent) && std::isnan(lhs.signal_strength_percent)) ||
×
1018
            rhs.signal_strength_percent == lhs.signal_strength_percent);
×
1019
}
1020

1021
std::ostream& operator<<(std::ostream& str, Telemetry::RcStatus const& rc_status)
×
1022
{
1023
    str << std::setprecision(15);
×
1024
    str << "rc_status:" << '\n' << "{\n";
×
1025
    str << "    was_available_once: " << rc_status.was_available_once << '\n';
×
1026
    str << "    is_available: " << rc_status.is_available << '\n';
×
1027
    str << "    signal_strength_percent: " << rc_status.signal_strength_percent << '\n';
×
1028
    str << '}';
×
1029
    return str;
×
1030
}
1031

1032
bool operator==(const Telemetry::StatusText& lhs, const Telemetry::StatusText& rhs)
×
1033
{
1034
    return (rhs.type == lhs.type) && (rhs.text == lhs.text);
×
1035
}
1036

1037
std::ostream& operator<<(std::ostream& str, Telemetry::StatusText const& status_text)
×
1038
{
1039
    str << std::setprecision(15);
×
1040
    str << "status_text:" << '\n' << "{\n";
×
1041
    str << "    type: " << status_text.type << '\n';
×
1042
    str << "    text: " << status_text.text << '\n';
×
1043
    str << '}';
×
1044
    return str;
×
1045
}
1046

1047
bool operator==(
×
1048
    const Telemetry::ActuatorControlTarget& lhs, const Telemetry::ActuatorControlTarget& rhs)
1049
{
1050
    return (rhs.group == lhs.group) && (rhs.controls == lhs.controls);
×
1051
}
1052

1053
std::ostream&
1054
operator<<(std::ostream& str, Telemetry::ActuatorControlTarget const& actuator_control_target)
×
1055
{
1056
    str << std::setprecision(15);
×
1057
    str << "actuator_control_target:" << '\n' << "{\n";
×
1058
    str << "    group: " << actuator_control_target.group << '\n';
×
1059
    str << "    controls: [";
×
1060
    for (auto it = actuator_control_target.controls.begin();
×
1061
         it != actuator_control_target.controls.end();
×
1062
         ++it) {
×
1063
        str << *it;
×
1064
        str << (it + 1 != actuator_control_target.controls.end() ? ", " : "]\n");
×
1065
    }
1066
    str << '}';
×
1067
    return str;
×
1068
}
1069

1070
bool operator==(
×
1071
    const Telemetry::ActuatorOutputStatus& lhs, const Telemetry::ActuatorOutputStatus& rhs)
1072
{
1073
    return (rhs.active == lhs.active) && (rhs.actuator == lhs.actuator);
×
1074
}
1075

1076
std::ostream&
1077
operator<<(std::ostream& str, Telemetry::ActuatorOutputStatus const& actuator_output_status)
×
1078
{
1079
    str << std::setprecision(15);
×
1080
    str << "actuator_output_status:" << '\n' << "{\n";
×
1081
    str << "    active: " << actuator_output_status.active << '\n';
×
1082
    str << "    actuator: [";
×
1083
    for (auto it = actuator_output_status.actuator.begin();
×
1084
         it != actuator_output_status.actuator.end();
×
1085
         ++it) {
×
1086
        str << *it;
×
1087
        str << (it + 1 != actuator_output_status.actuator.end() ? ", " : "]\n");
×
1088
    }
1089
    str << '}';
×
1090
    return str;
×
1091
}
1092

1093
bool operator==(const Telemetry::Covariance& lhs, const Telemetry::Covariance& rhs)
×
1094
{
1095
    return (rhs.covariance_matrix == lhs.covariance_matrix);
×
1096
}
1097

1098
std::ostream& operator<<(std::ostream& str, Telemetry::Covariance const& covariance)
×
1099
{
1100
    str << std::setprecision(15);
×
1101
    str << "covariance:" << '\n' << "{\n";
×
1102
    str << "    covariance_matrix: [";
×
1103
    for (auto it = covariance.covariance_matrix.begin(); it != covariance.covariance_matrix.end();
×
1104
         ++it) {
×
1105
        str << *it;
×
1106
        str << (it + 1 != covariance.covariance_matrix.end() ? ", " : "]\n");
×
1107
    }
1108
    str << '}';
×
1109
    return str;
×
1110
}
1111

1112
bool operator==(const Telemetry::VelocityBody& lhs, const Telemetry::VelocityBody& rhs)
×
1113
{
1114
    return ((std::isnan(rhs.x_m_s) && std::isnan(lhs.x_m_s)) || rhs.x_m_s == lhs.x_m_s) &&
×
1115
           ((std::isnan(rhs.y_m_s) && std::isnan(lhs.y_m_s)) || rhs.y_m_s == lhs.y_m_s) &&
×
1116
           ((std::isnan(rhs.z_m_s) && std::isnan(lhs.z_m_s)) || rhs.z_m_s == lhs.z_m_s);
×
1117
}
1118

1119
std::ostream& operator<<(std::ostream& str, Telemetry::VelocityBody const& velocity_body)
×
1120
{
1121
    str << std::setprecision(15);
×
1122
    str << "velocity_body:" << '\n' << "{\n";
×
1123
    str << "    x_m_s: " << velocity_body.x_m_s << '\n';
×
1124
    str << "    y_m_s: " << velocity_body.y_m_s << '\n';
×
1125
    str << "    z_m_s: " << velocity_body.z_m_s << '\n';
×
1126
    str << '}';
×
1127
    return str;
×
1128
}
1129

1130
bool operator==(const Telemetry::PositionBody& lhs, const Telemetry::PositionBody& rhs)
×
1131
{
1132
    return ((std::isnan(rhs.x_m) && std::isnan(lhs.x_m)) || rhs.x_m == lhs.x_m) &&
×
1133
           ((std::isnan(rhs.y_m) && std::isnan(lhs.y_m)) || rhs.y_m == lhs.y_m) &&
×
1134
           ((std::isnan(rhs.z_m) && std::isnan(lhs.z_m)) || rhs.z_m == lhs.z_m);
×
1135
}
1136

1137
std::ostream& operator<<(std::ostream& str, Telemetry::PositionBody const& position_body)
×
1138
{
1139
    str << std::setprecision(15);
×
1140
    str << "position_body:" << '\n' << "{\n";
×
1141
    str << "    x_m: " << position_body.x_m << '\n';
×
1142
    str << "    y_m: " << position_body.y_m << '\n';
×
1143
    str << "    z_m: " << position_body.z_m << '\n';
×
1144
    str << '}';
×
1145
    return str;
×
1146
}
1147

1148
std::ostream& operator<<(std::ostream& str, Telemetry::Odometry::MavFrame const& mav_frame)
×
1149
{
1150
    switch (mav_frame) {
×
1151
        case Telemetry::Odometry::MavFrame::Undef:
×
1152
            return str << "Undef";
×
1153
        case Telemetry::Odometry::MavFrame::BodyNed:
×
1154
            return str << "Body Ned";
×
1155
        case Telemetry::Odometry::MavFrame::VisionNed:
×
1156
            return str << "Vision Ned";
×
1157
        case Telemetry::Odometry::MavFrame::EstimNed:
×
1158
            return str << "Estim Ned";
×
1159
        default:
×
1160
            return str << "Unknown";
×
1161
    }
1162
}
1163
bool operator==(const Telemetry::Odometry& lhs, const Telemetry::Odometry& rhs)
×
1164
{
1165
    return (rhs.time_usec == lhs.time_usec) && (rhs.frame_id == lhs.frame_id) &&
×
1166
           (rhs.child_frame_id == lhs.child_frame_id) && (rhs.position_body == lhs.position_body) &&
×
1167
           (rhs.q == lhs.q) && (rhs.velocity_body == lhs.velocity_body) &&
×
1168
           (rhs.angular_velocity_body == lhs.angular_velocity_body) &&
×
1169
           (rhs.pose_covariance == lhs.pose_covariance) &&
×
1170
           (rhs.velocity_covariance == lhs.velocity_covariance);
×
1171
}
1172

1173
std::ostream& operator<<(std::ostream& str, Telemetry::Odometry const& odometry)
×
1174
{
1175
    str << std::setprecision(15);
×
1176
    str << "odometry:" << '\n' << "{\n";
×
1177
    str << "    time_usec: " << odometry.time_usec << '\n';
×
1178
    str << "    frame_id: " << odometry.frame_id << '\n';
×
1179
    str << "    child_frame_id: " << odometry.child_frame_id << '\n';
×
1180
    str << "    position_body: " << odometry.position_body << '\n';
×
1181
    str << "    q: " << odometry.q << '\n';
×
1182
    str << "    velocity_body: " << odometry.velocity_body << '\n';
×
1183
    str << "    angular_velocity_body: " << odometry.angular_velocity_body << '\n';
×
1184
    str << "    pose_covariance: " << odometry.pose_covariance << '\n';
×
1185
    str << "    velocity_covariance: " << odometry.velocity_covariance << '\n';
×
1186
    str << '}';
×
1187
    return str;
×
1188
}
1189

1190
bool operator==(const Telemetry::DistanceSensor& lhs, const Telemetry::DistanceSensor& rhs)
×
1191
{
1192
    return ((std::isnan(rhs.minimum_distance_m) && std::isnan(lhs.minimum_distance_m)) ||
×
1193
            rhs.minimum_distance_m == lhs.minimum_distance_m) &&
×
1194
           ((std::isnan(rhs.maximum_distance_m) && std::isnan(lhs.maximum_distance_m)) ||
×
1195
            rhs.maximum_distance_m == lhs.maximum_distance_m) &&
×
1196
           ((std::isnan(rhs.current_distance_m) && std::isnan(lhs.current_distance_m)) ||
×
1197
            rhs.current_distance_m == lhs.current_distance_m) &&
×
1198
           (rhs.orientation == lhs.orientation);
×
1199
}
1200

1201
std::ostream& operator<<(std::ostream& str, Telemetry::DistanceSensor const& distance_sensor)
×
1202
{
1203
    str << std::setprecision(15);
×
1204
    str << "distance_sensor:" << '\n' << "{\n";
×
1205
    str << "    minimum_distance_m: " << distance_sensor.minimum_distance_m << '\n';
×
1206
    str << "    maximum_distance_m: " << distance_sensor.maximum_distance_m << '\n';
×
1207
    str << "    current_distance_m: " << distance_sensor.current_distance_m << '\n';
×
1208
    str << "    orientation: " << distance_sensor.orientation << '\n';
×
1209
    str << '}';
×
1210
    return str;
×
1211
}
1212

1213
bool operator==(const Telemetry::ScaledPressure& lhs, const Telemetry::ScaledPressure& rhs)
×
1214
{
1215
    return (rhs.timestamp_us == lhs.timestamp_us) &&
×
1216
           ((std::isnan(rhs.absolute_pressure_hpa) && std::isnan(lhs.absolute_pressure_hpa)) ||
×
1217
            rhs.absolute_pressure_hpa == lhs.absolute_pressure_hpa) &&
×
1218
           ((std::isnan(rhs.differential_pressure_hpa) &&
×
1219
             std::isnan(lhs.differential_pressure_hpa)) ||
×
1220
            rhs.differential_pressure_hpa == lhs.differential_pressure_hpa) &&
×
1221
           ((std::isnan(rhs.temperature_deg) && std::isnan(lhs.temperature_deg)) ||
×
1222
            rhs.temperature_deg == lhs.temperature_deg) &&
×
1223
           ((std::isnan(rhs.differential_pressure_temperature_deg) &&
×
1224
             std::isnan(lhs.differential_pressure_temperature_deg)) ||
×
1225
            rhs.differential_pressure_temperature_deg == lhs.differential_pressure_temperature_deg);
×
1226
}
1227

1228
std::ostream& operator<<(std::ostream& str, Telemetry::ScaledPressure const& scaled_pressure)
×
1229
{
1230
    str << std::setprecision(15);
×
1231
    str << "scaled_pressure:" << '\n' << "{\n";
×
1232
    str << "    timestamp_us: " << scaled_pressure.timestamp_us << '\n';
×
1233
    str << "    absolute_pressure_hpa: " << scaled_pressure.absolute_pressure_hpa << '\n';
×
1234
    str << "    differential_pressure_hpa: " << scaled_pressure.differential_pressure_hpa << '\n';
×
1235
    str << "    temperature_deg: " << scaled_pressure.temperature_deg << '\n';
×
1236
    str << "    differential_pressure_temperature_deg: "
×
1237
        << scaled_pressure.differential_pressure_temperature_deg << '\n';
×
1238
    str << '}';
×
1239
    return str;
×
1240
}
1241

1242
bool operator==(const Telemetry::PositionNed& lhs, const Telemetry::PositionNed& rhs)
×
1243
{
1244
    return ((std::isnan(rhs.north_m) && std::isnan(lhs.north_m)) || rhs.north_m == lhs.north_m) &&
×
1245
           ((std::isnan(rhs.east_m) && std::isnan(lhs.east_m)) || rhs.east_m == lhs.east_m) &&
×
1246
           ((std::isnan(rhs.down_m) && std::isnan(lhs.down_m)) || rhs.down_m == lhs.down_m);
×
1247
}
1248

1249
std::ostream& operator<<(std::ostream& str, Telemetry::PositionNed const& position_ned)
×
1250
{
1251
    str << std::setprecision(15);
×
1252
    str << "position_ned:" << '\n' << "{\n";
×
1253
    str << "    north_m: " << position_ned.north_m << '\n';
×
1254
    str << "    east_m: " << position_ned.east_m << '\n';
×
1255
    str << "    down_m: " << position_ned.down_m << '\n';
×
1256
    str << '}';
×
1257
    return str;
×
1258
}
1259

1260
bool operator==(const Telemetry::VelocityNed& lhs, const Telemetry::VelocityNed& rhs)
×
1261
{
1262
    return ((std::isnan(rhs.north_m_s) && std::isnan(lhs.north_m_s)) ||
×
1263
            rhs.north_m_s == lhs.north_m_s) &&
×
1264
           ((std::isnan(rhs.east_m_s) && std::isnan(lhs.east_m_s)) ||
×
1265
            rhs.east_m_s == lhs.east_m_s) &&
×
1266
           ((std::isnan(rhs.down_m_s) && std::isnan(lhs.down_m_s)) || rhs.down_m_s == lhs.down_m_s);
×
1267
}
1268

1269
std::ostream& operator<<(std::ostream& str, Telemetry::VelocityNed const& velocity_ned)
×
1270
{
1271
    str << std::setprecision(15);
×
1272
    str << "velocity_ned:" << '\n' << "{\n";
×
1273
    str << "    north_m_s: " << velocity_ned.north_m_s << '\n';
×
1274
    str << "    east_m_s: " << velocity_ned.east_m_s << '\n';
×
1275
    str << "    down_m_s: " << velocity_ned.down_m_s << '\n';
×
1276
    str << '}';
×
1277
    return str;
×
1278
}
1279

1280
bool operator==(
×
1281
    const Telemetry::PositionVelocityNed& lhs, const Telemetry::PositionVelocityNed& rhs)
1282
{
1283
    return (rhs.position == lhs.position) && (rhs.velocity == lhs.velocity);
×
1284
}
1285

1286
std::ostream&
1287
operator<<(std::ostream& str, Telemetry::PositionVelocityNed const& position_velocity_ned)
×
1288
{
1289
    str << std::setprecision(15);
×
1290
    str << "position_velocity_ned:" << '\n' << "{\n";
×
1291
    str << "    position: " << position_velocity_ned.position << '\n';
×
1292
    str << "    velocity: " << position_velocity_ned.velocity << '\n';
×
1293
    str << '}';
×
1294
    return str;
×
1295
}
1296

1297
bool operator==(const Telemetry::GroundTruth& lhs, const Telemetry::GroundTruth& rhs)
×
1298
{
1299
    return ((std::isnan(rhs.latitude_deg) && std::isnan(lhs.latitude_deg)) ||
×
1300
            rhs.latitude_deg == lhs.latitude_deg) &&
×
1301
           ((std::isnan(rhs.longitude_deg) && std::isnan(lhs.longitude_deg)) ||
×
1302
            rhs.longitude_deg == lhs.longitude_deg) &&
×
1303
           ((std::isnan(rhs.absolute_altitude_m) && std::isnan(lhs.absolute_altitude_m)) ||
×
1304
            rhs.absolute_altitude_m == lhs.absolute_altitude_m);
×
1305
}
1306

1307
std::ostream& operator<<(std::ostream& str, Telemetry::GroundTruth const& ground_truth)
×
1308
{
1309
    str << std::setprecision(15);
×
1310
    str << "ground_truth:" << '\n' << "{\n";
×
1311
    str << "    latitude_deg: " << ground_truth.latitude_deg << '\n';
×
1312
    str << "    longitude_deg: " << ground_truth.longitude_deg << '\n';
×
1313
    str << "    absolute_altitude_m: " << ground_truth.absolute_altitude_m << '\n';
×
1314
    str << '}';
×
1315
    return str;
×
1316
}
1317

1318
bool operator==(const Telemetry::FixedwingMetrics& lhs, const Telemetry::FixedwingMetrics& rhs)
×
1319
{
1320
    return ((std::isnan(rhs.airspeed_m_s) && std::isnan(lhs.airspeed_m_s)) ||
×
1321
            rhs.airspeed_m_s == lhs.airspeed_m_s) &&
×
1322
           ((std::isnan(rhs.throttle_percentage) && std::isnan(lhs.throttle_percentage)) ||
×
1323
            rhs.throttle_percentage == lhs.throttle_percentage) &&
×
1324
           ((std::isnan(rhs.climb_rate_m_s) && std::isnan(lhs.climb_rate_m_s)) ||
×
NEW
1325
            rhs.climb_rate_m_s == lhs.climb_rate_m_s) &&
×
NEW
1326
           ((std::isnan(rhs.groundspeed_m_s) && std::isnan(lhs.groundspeed_m_s)) ||
×
NEW
1327
            rhs.groundspeed_m_s == lhs.groundspeed_m_s) &&
×
NEW
1328
           ((std::isnan(rhs.heading_deg) && std::isnan(lhs.heading_deg)) ||
×
NEW
1329
            rhs.heading_deg == lhs.heading_deg) &&
×
NEW
1330
           ((std::isnan(rhs.absolute_altitude_m) && std::isnan(lhs.absolute_altitude_m)) ||
×
NEW
1331
            rhs.absolute_altitude_m == lhs.absolute_altitude_m);
×
1332
}
1333

1334
std::ostream& operator<<(std::ostream& str, Telemetry::FixedwingMetrics const& fixedwing_metrics)
×
1335
{
1336
    str << std::setprecision(15);
×
1337
    str << "fixedwing_metrics:" << '\n' << "{\n";
×
1338
    str << "    airspeed_m_s: " << fixedwing_metrics.airspeed_m_s << '\n';
×
1339
    str << "    throttle_percentage: " << fixedwing_metrics.throttle_percentage << '\n';
×
1340
    str << "    climb_rate_m_s: " << fixedwing_metrics.climb_rate_m_s << '\n';
×
NEW
1341
    str << "    groundspeed_m_s: " << fixedwing_metrics.groundspeed_m_s << '\n';
×
NEW
1342
    str << "    heading_deg: " << fixedwing_metrics.heading_deg << '\n';
×
NEW
1343
    str << "    absolute_altitude_m: " << fixedwing_metrics.absolute_altitude_m << '\n';
×
1344
    str << '}';
×
1345
    return str;
×
1346
}
1347

1348
bool operator==(const Telemetry::AccelerationFrd& lhs, const Telemetry::AccelerationFrd& rhs)
×
1349
{
1350
    return ((std::isnan(rhs.forward_m_s2) && std::isnan(lhs.forward_m_s2)) ||
×
1351
            rhs.forward_m_s2 == lhs.forward_m_s2) &&
×
1352
           ((std::isnan(rhs.right_m_s2) && std::isnan(lhs.right_m_s2)) ||
×
1353
            rhs.right_m_s2 == lhs.right_m_s2) &&
×
1354
           ((std::isnan(rhs.down_m_s2) && std::isnan(lhs.down_m_s2)) ||
×
1355
            rhs.down_m_s2 == lhs.down_m_s2);
×
1356
}
1357

1358
std::ostream& operator<<(std::ostream& str, Telemetry::AccelerationFrd const& acceleration_frd)
×
1359
{
1360
    str << std::setprecision(15);
×
1361
    str << "acceleration_frd:" << '\n' << "{\n";
×
1362
    str << "    forward_m_s2: " << acceleration_frd.forward_m_s2 << '\n';
×
1363
    str << "    right_m_s2: " << acceleration_frd.right_m_s2 << '\n';
×
1364
    str << "    down_m_s2: " << acceleration_frd.down_m_s2 << '\n';
×
1365
    str << '}';
×
1366
    return str;
×
1367
}
1368

1369
bool operator==(const Telemetry::AngularVelocityFrd& lhs, const Telemetry::AngularVelocityFrd& rhs)
×
1370
{
1371
    return ((std::isnan(rhs.forward_rad_s) && std::isnan(lhs.forward_rad_s)) ||
×
1372
            rhs.forward_rad_s == lhs.forward_rad_s) &&
×
1373
           ((std::isnan(rhs.right_rad_s) && std::isnan(lhs.right_rad_s)) ||
×
1374
            rhs.right_rad_s == lhs.right_rad_s) &&
×
1375
           ((std::isnan(rhs.down_rad_s) && std::isnan(lhs.down_rad_s)) ||
×
1376
            rhs.down_rad_s == lhs.down_rad_s);
×
1377
}
1378

1379
std::ostream&
1380
operator<<(std::ostream& str, Telemetry::AngularVelocityFrd const& angular_velocity_frd)
×
1381
{
1382
    str << std::setprecision(15);
×
1383
    str << "angular_velocity_frd:" << '\n' << "{\n";
×
1384
    str << "    forward_rad_s: " << angular_velocity_frd.forward_rad_s << '\n';
×
1385
    str << "    right_rad_s: " << angular_velocity_frd.right_rad_s << '\n';
×
1386
    str << "    down_rad_s: " << angular_velocity_frd.down_rad_s << '\n';
×
1387
    str << '}';
×
1388
    return str;
×
1389
}
1390

1391
bool operator==(const Telemetry::MagneticFieldFrd& lhs, const Telemetry::MagneticFieldFrd& rhs)
×
1392
{
1393
    return ((std::isnan(rhs.forward_gauss) && std::isnan(lhs.forward_gauss)) ||
×
1394
            rhs.forward_gauss == lhs.forward_gauss) &&
×
1395
           ((std::isnan(rhs.right_gauss) && std::isnan(lhs.right_gauss)) ||
×
1396
            rhs.right_gauss == lhs.right_gauss) &&
×
1397
           ((std::isnan(rhs.down_gauss) && std::isnan(lhs.down_gauss)) ||
×
1398
            rhs.down_gauss == lhs.down_gauss);
×
1399
}
1400

1401
std::ostream& operator<<(std::ostream& str, Telemetry::MagneticFieldFrd const& magnetic_field_frd)
×
1402
{
1403
    str << std::setprecision(15);
×
1404
    str << "magnetic_field_frd:" << '\n' << "{\n";
×
1405
    str << "    forward_gauss: " << magnetic_field_frd.forward_gauss << '\n';
×
1406
    str << "    right_gauss: " << magnetic_field_frd.right_gauss << '\n';
×
1407
    str << "    down_gauss: " << magnetic_field_frd.down_gauss << '\n';
×
1408
    str << '}';
×
1409
    return str;
×
1410
}
1411

1412
bool operator==(const Telemetry::Imu& lhs, const Telemetry::Imu& rhs)
×
1413
{
1414
    return (rhs.acceleration_frd == lhs.acceleration_frd) &&
×
1415
           (rhs.angular_velocity_frd == lhs.angular_velocity_frd) &&
×
1416
           (rhs.magnetic_field_frd == lhs.magnetic_field_frd) &&
×
1417
           ((std::isnan(rhs.temperature_degc) && std::isnan(lhs.temperature_degc)) ||
×
1418
            rhs.temperature_degc == lhs.temperature_degc) &&
×
1419
           (rhs.timestamp_us == lhs.timestamp_us);
×
1420
}
1421

1422
std::ostream& operator<<(std::ostream& str, Telemetry::Imu const& imu)
×
1423
{
1424
    str << std::setprecision(15);
×
1425
    str << "imu:" << '\n' << "{\n";
×
1426
    str << "    acceleration_frd: " << imu.acceleration_frd << '\n';
×
1427
    str << "    angular_velocity_frd: " << imu.angular_velocity_frd << '\n';
×
1428
    str << "    magnetic_field_frd: " << imu.magnetic_field_frd << '\n';
×
1429
    str << "    temperature_degc: " << imu.temperature_degc << '\n';
×
1430
    str << "    timestamp_us: " << imu.timestamp_us << '\n';
×
1431
    str << '}';
×
1432
    return str;
×
1433
}
1434

1435
bool operator==(const Telemetry::GpsGlobalOrigin& lhs, const Telemetry::GpsGlobalOrigin& rhs)
×
1436
{
1437
    return ((std::isnan(rhs.latitude_deg) && std::isnan(lhs.latitude_deg)) ||
×
1438
            rhs.latitude_deg == lhs.latitude_deg) &&
×
1439
           ((std::isnan(rhs.longitude_deg) && std::isnan(lhs.longitude_deg)) ||
×
1440
            rhs.longitude_deg == lhs.longitude_deg) &&
×
1441
           ((std::isnan(rhs.altitude_m) && std::isnan(lhs.altitude_m)) ||
×
1442
            rhs.altitude_m == lhs.altitude_m);
×
1443
}
1444

1445
std::ostream& operator<<(std::ostream& str, Telemetry::GpsGlobalOrigin const& gps_global_origin)
×
1446
{
1447
    str << std::setprecision(15);
×
1448
    str << "gps_global_origin:" << '\n' << "{\n";
×
1449
    str << "    latitude_deg: " << gps_global_origin.latitude_deg << '\n';
×
1450
    str << "    longitude_deg: " << gps_global_origin.longitude_deg << '\n';
×
1451
    str << "    altitude_m: " << gps_global_origin.altitude_m << '\n';
×
1452
    str << '}';
×
1453
    return str;
×
1454
}
1455

1456
bool operator==(const Telemetry::Altitude& lhs, const Telemetry::Altitude& rhs)
×
1457
{
1458
    return ((std::isnan(rhs.altitude_monotonic_m) && std::isnan(lhs.altitude_monotonic_m)) ||
×
1459
            rhs.altitude_monotonic_m == lhs.altitude_monotonic_m) &&
×
1460
           ((std::isnan(rhs.altitude_amsl_m) && std::isnan(lhs.altitude_amsl_m)) ||
×
1461
            rhs.altitude_amsl_m == lhs.altitude_amsl_m) &&
×
1462
           ((std::isnan(rhs.altitude_local_m) && std::isnan(lhs.altitude_local_m)) ||
×
1463
            rhs.altitude_local_m == lhs.altitude_local_m) &&
×
1464
           ((std::isnan(rhs.altitude_relative_m) && std::isnan(lhs.altitude_relative_m)) ||
×
1465
            rhs.altitude_relative_m == lhs.altitude_relative_m) &&
×
1466
           ((std::isnan(rhs.altitude_terrain_m) && std::isnan(lhs.altitude_terrain_m)) ||
×
1467
            rhs.altitude_terrain_m == lhs.altitude_terrain_m) &&
×
1468
           ((std::isnan(rhs.bottom_clearance_m) && std::isnan(lhs.bottom_clearance_m)) ||
×
1469
            rhs.bottom_clearance_m == lhs.bottom_clearance_m);
×
1470
}
1471

1472
std::ostream& operator<<(std::ostream& str, Telemetry::Altitude const& altitude)
×
1473
{
1474
    str << std::setprecision(15);
×
1475
    str << "altitude:" << '\n' << "{\n";
×
1476
    str << "    altitude_monotonic_m: " << altitude.altitude_monotonic_m << '\n';
×
1477
    str << "    altitude_amsl_m: " << altitude.altitude_amsl_m << '\n';
×
1478
    str << "    altitude_local_m: " << altitude.altitude_local_m << '\n';
×
1479
    str << "    altitude_relative_m: " << altitude.altitude_relative_m << '\n';
×
1480
    str << "    altitude_terrain_m: " << altitude.altitude_terrain_m << '\n';
×
1481
    str << "    bottom_clearance_m: " << altitude.bottom_clearance_m << '\n';
×
1482
    str << '}';
×
1483
    return str;
×
1484
}
1485

1486
std::ostream& operator<<(std::ostream& str, Telemetry::Result const& result)
×
1487
{
1488
    switch (result) {
×
1489
        case Telemetry::Result::Unknown:
×
1490
            return str << "Unknown";
×
1491
        case Telemetry::Result::Success:
×
1492
            return str << "Success";
×
1493
        case Telemetry::Result::NoSystem:
×
1494
            return str << "No System";
×
1495
        case Telemetry::Result::ConnectionError:
×
1496
            return str << "Connection Error";
×
1497
        case Telemetry::Result::Busy:
×
1498
            return str << "Busy";
×
1499
        case Telemetry::Result::CommandDenied:
×
1500
            return str << "Command Denied";
×
1501
        case Telemetry::Result::Timeout:
×
1502
            return str << "Timeout";
×
1503
        case Telemetry::Result::Unsupported:
×
1504
            return str << "Unsupported";
×
1505
        default:
×
1506
            return str << "Unknown";
×
1507
    }
1508
}
1509

1510
std::ostream& operator<<(std::ostream& str, Telemetry::FixType const& fix_type)
×
1511
{
1512
    switch (fix_type) {
×
1513
        case Telemetry::FixType::NoGps:
×
1514
            return str << "No Gps";
×
1515
        case Telemetry::FixType::NoFix:
×
1516
            return str << "No Fix";
×
1517
        case Telemetry::FixType::Fix2D:
×
1518
            return str << "Fix 2D";
×
1519
        case Telemetry::FixType::Fix3D:
×
1520
            return str << "Fix 3D";
×
1521
        case Telemetry::FixType::FixDgps:
×
1522
            return str << "Fix Dgps";
×
1523
        case Telemetry::FixType::RtkFloat:
×
1524
            return str << "Rtk Float";
×
1525
        case Telemetry::FixType::RtkFixed:
×
1526
            return str << "Rtk Fixed";
×
1527
        default:
×
1528
            return str << "Unknown";
×
1529
    }
1530
}
1531

1532
std::ostream& operator<<(std::ostream& str, Telemetry::FlightMode const& flight_mode)
×
1533
{
1534
    switch (flight_mode) {
×
1535
        case Telemetry::FlightMode::Unknown:
×
1536
            return str << "Unknown";
×
1537
        case Telemetry::FlightMode::Ready:
×
1538
            return str << "Ready";
×
1539
        case Telemetry::FlightMode::Takeoff:
×
1540
            return str << "Takeoff";
×
1541
        case Telemetry::FlightMode::Hold:
×
1542
            return str << "Hold";
×
1543
        case Telemetry::FlightMode::Mission:
×
1544
            return str << "Mission";
×
1545
        case Telemetry::FlightMode::ReturnToLaunch:
×
1546
            return str << "Return To Launch";
×
1547
        case Telemetry::FlightMode::Land:
×
1548
            return str << "Land";
×
1549
        case Telemetry::FlightMode::Offboard:
×
1550
            return str << "Offboard";
×
1551
        case Telemetry::FlightMode::FollowMe:
×
1552
            return str << "Follow Me";
×
1553
        case Telemetry::FlightMode::Manual:
×
1554
            return str << "Manual";
×
1555
        case Telemetry::FlightMode::Altctl:
×
1556
            return str << "Altctl";
×
1557
        case Telemetry::FlightMode::Posctl:
×
1558
            return str << "Posctl";
×
1559
        case Telemetry::FlightMode::Acro:
×
1560
            return str << "Acro";
×
1561
        case Telemetry::FlightMode::Stabilized:
×
1562
            return str << "Stabilized";
×
1563
        case Telemetry::FlightMode::Rattitude:
×
1564
            return str << "Rattitude";
×
1565
        default:
×
1566
            return str << "Unknown";
×
1567
    }
1568
}
1569

1570
std::ostream& operator<<(std::ostream& str, Telemetry::StatusTextType const& status_text_type)
×
1571
{
1572
    switch (status_text_type) {
×
1573
        case Telemetry::StatusTextType::Debug:
×
1574
            return str << "Debug";
×
1575
        case Telemetry::StatusTextType::Info:
×
1576
            return str << "Info";
×
1577
        case Telemetry::StatusTextType::Notice:
×
1578
            return str << "Notice";
×
1579
        case Telemetry::StatusTextType::Warning:
×
1580
            return str << "Warning";
×
1581
        case Telemetry::StatusTextType::Error:
×
1582
            return str << "Error";
×
1583
        case Telemetry::StatusTextType::Critical:
×
1584
            return str << "Critical";
×
1585
        case Telemetry::StatusTextType::Alert:
×
1586
            return str << "Alert";
×
1587
        case Telemetry::StatusTextType::Emergency:
×
1588
            return str << "Emergency";
×
1589
        default:
×
1590
            return str << "Unknown";
×
1591
    }
1592
}
1593

1594
std::ostream& operator<<(std::ostream& str, Telemetry::LandedState const& landed_state)
×
1595
{
1596
    switch (landed_state) {
×
1597
        case Telemetry::LandedState::Unknown:
×
1598
            return str << "Unknown";
×
1599
        case Telemetry::LandedState::OnGround:
×
1600
            return str << "On Ground";
×
1601
        case Telemetry::LandedState::InAir:
×
1602
            return str << "In Air";
×
1603
        case Telemetry::LandedState::TakingOff:
×
1604
            return str << "Taking Off";
×
1605
        case Telemetry::LandedState::Landing:
×
1606
            return str << "Landing";
×
1607
        default:
×
1608
            return str << "Unknown";
×
1609
    }
1610
}
1611

1612
std::ostream& operator<<(std::ostream& str, Telemetry::VtolState const& vtol_state)
×
1613
{
1614
    switch (vtol_state) {
×
1615
        case Telemetry::VtolState::Undefined:
×
1616
            return str << "Undefined";
×
1617
        case Telemetry::VtolState::TransitionToFw:
×
1618
            return str << "Transition To Fw";
×
1619
        case Telemetry::VtolState::TransitionToMc:
×
1620
            return str << "Transition To Mc";
×
1621
        case Telemetry::VtolState::Mc:
×
1622
            return str << "Mc";
×
1623
        case Telemetry::VtolState::Fw:
×
1624
            return str << "Fw";
×
1625
        default:
×
1626
            return str << "Unknown";
×
1627
    }
1628
}
1629

1630
} // namespace mavsdk
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc