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

mavlink / MAVSDK / 23830665824

01 Apr 2026 03:35AM UTC coverage: 50.498%. First build
23830665824

Pull #2833

github

web-flow
Merge 743a48bcf into 721efdc45
Pull Request #2833: Backport recent main fixes and features to v3

623 of 797 new or added lines in 27 files covered. (78.17%)

19254 of 38128 relevant lines covered (50.5%)

669.04 hits per line

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

5.03
/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
using Wind = Telemetry::Wind;
43

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

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

52
Telemetry::~Telemetry() {}
12✔
53

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

59
void Telemetry::unsubscribe_position(PositionHandle handle)
3✔
60
{
61
    _impl->unsubscribe_position(handle);
3✔
62
}
3✔
63

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

287
void Telemetry::unsubscribe_rc_status(RcStatusHandle handle)
3✔
288
{
289
    _impl->unsubscribe_rc_status(handle);
3✔
290
}
3✔
291

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

380
void Telemetry::unsubscribe_ground_truth(GroundTruthHandle handle)
1✔
381
{
382
    _impl->unsubscribe_ground_truth(handle);
1✔
383
}
1✔
384

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

534
void Telemetry::unsubscribe_altitude(AltitudeHandle handle)
2✔
535
{
536
    _impl->unsubscribe_altitude(handle);
2✔
537
}
2✔
538

539
Telemetry::Altitude Telemetry::altitude() const
1✔
540
{
541
    return _impl->altitude();
1✔
542
}
543

544
Telemetry::WindHandle Telemetry::subscribe_wind(const WindCallback& callback)
×
545
{
546
    return _impl->subscribe_wind(callback);
×
547
}
548

549
void Telemetry::unsubscribe_wind(WindHandle handle)
×
550
{
551
    _impl->unsubscribe_wind(handle);
×
552
}
×
553

554
Telemetry::Wind Telemetry::wind() const
×
555
{
556
    return _impl->wind();
×
557
}
558

559
void Telemetry::set_rate_position_async(double rate_hz, const ResultCallback callback)
×
560
{
561
    _impl->set_rate_position_async(rate_hz, callback);
×
562
}
×
563

564
Telemetry::Result Telemetry::set_rate_position(double rate_hz) const
×
565
{
566
    return _impl->set_rate_position(rate_hz);
×
567
}
568

569
void Telemetry::set_rate_home_async(double rate_hz, const ResultCallback callback)
×
570
{
571
    _impl->set_rate_home_async(rate_hz, callback);
×
572
}
×
573

574
Telemetry::Result Telemetry::set_rate_home(double rate_hz) const
×
575
{
576
    return _impl->set_rate_home(rate_hz);
×
577
}
578

579
void Telemetry::set_rate_in_air_async(double rate_hz, const ResultCallback callback)
×
580
{
581
    _impl->set_rate_in_air_async(rate_hz, callback);
×
582
}
×
583

584
Telemetry::Result Telemetry::set_rate_in_air(double rate_hz) const
×
585
{
586
    return _impl->set_rate_in_air(rate_hz);
×
587
}
588

589
void Telemetry::set_rate_landed_state_async(double rate_hz, const ResultCallback callback)
×
590
{
591
    _impl->set_rate_landed_state_async(rate_hz, callback);
×
592
}
×
593

594
Telemetry::Result Telemetry::set_rate_landed_state(double rate_hz) const
×
595
{
596
    return _impl->set_rate_landed_state(rate_hz);
×
597
}
598

599
void Telemetry::set_rate_vtol_state_async(double rate_hz, const ResultCallback callback)
×
600
{
601
    _impl->set_rate_vtol_state_async(rate_hz, callback);
×
602
}
×
603

604
Telemetry::Result Telemetry::set_rate_vtol_state(double rate_hz) const
×
605
{
606
    return _impl->set_rate_vtol_state(rate_hz);
×
607
}
608

609
void Telemetry::set_rate_attitude_quaternion_async(double rate_hz, const ResultCallback callback)
×
610
{
611
    _impl->set_rate_attitude_quaternion_async(rate_hz, callback);
×
612
}
×
613

614
Telemetry::Result Telemetry::set_rate_attitude_quaternion(double rate_hz) const
×
615
{
616
    return _impl->set_rate_attitude_quaternion(rate_hz);
×
617
}
618

619
void Telemetry::set_rate_attitude_euler_async(double rate_hz, const ResultCallback callback)
×
620
{
621
    _impl->set_rate_attitude_euler_async(rate_hz, callback);
×
622
}
×
623

624
Telemetry::Result Telemetry::set_rate_attitude_euler(double rate_hz) const
×
625
{
626
    return _impl->set_rate_attitude_euler(rate_hz);
×
627
}
628

629
void Telemetry::set_rate_velocity_ned_async(double rate_hz, const ResultCallback callback)
×
630
{
631
    _impl->set_rate_velocity_ned_async(rate_hz, callback);
×
632
}
×
633

634
Telemetry::Result Telemetry::set_rate_velocity_ned(double rate_hz) const
×
635
{
636
    return _impl->set_rate_velocity_ned(rate_hz);
×
637
}
638

639
void Telemetry::set_rate_gps_info_async(double rate_hz, const ResultCallback callback)
×
640
{
641
    _impl->set_rate_gps_info_async(rate_hz, callback);
×
642
}
×
643

644
Telemetry::Result Telemetry::set_rate_gps_info(double rate_hz) const
×
645
{
646
    return _impl->set_rate_gps_info(rate_hz);
×
647
}
648

NEW
649
void Telemetry::set_rate_raw_gps_async(double rate_hz, const ResultCallback callback)
×
650
{
NEW
651
    _impl->set_rate_raw_gps_async(rate_hz, callback);
×
NEW
652
}
×
653

NEW
654
Telemetry::Result Telemetry::set_rate_raw_gps(double rate_hz) const
×
655
{
NEW
656
    return _impl->set_rate_raw_gps(rate_hz);
×
657
}
658

659
void Telemetry::set_rate_battery_async(double rate_hz, const ResultCallback callback)
×
660
{
661
    _impl->set_rate_battery_async(rate_hz, callback);
×
662
}
×
663

664
Telemetry::Result Telemetry::set_rate_battery(double rate_hz) const
×
665
{
666
    return _impl->set_rate_battery(rate_hz);
×
667
}
668

669
void Telemetry::set_rate_rc_status_async(double rate_hz, const ResultCallback callback)
×
670
{
671
    _impl->set_rate_rc_status_async(rate_hz, callback);
×
672
}
×
673

674
Telemetry::Result Telemetry::set_rate_rc_status(double rate_hz) const
×
675
{
676
    return _impl->set_rate_rc_status(rate_hz);
×
677
}
678

679
void Telemetry::set_rate_actuator_control_target_async(
×
680
    double rate_hz, const ResultCallback callback)
681
{
682
    _impl->set_rate_actuator_control_target_async(rate_hz, callback);
×
683
}
×
684

685
Telemetry::Result Telemetry::set_rate_actuator_control_target(double rate_hz) const
×
686
{
687
    return _impl->set_rate_actuator_control_target(rate_hz);
×
688
}
689

690
void Telemetry::set_rate_actuator_output_status_async(double rate_hz, const ResultCallback callback)
×
691
{
692
    _impl->set_rate_actuator_output_status_async(rate_hz, callback);
×
693
}
×
694

695
Telemetry::Result Telemetry::set_rate_actuator_output_status(double rate_hz) const
×
696
{
697
    return _impl->set_rate_actuator_output_status(rate_hz);
×
698
}
699

700
void Telemetry::set_rate_odometry_async(double rate_hz, const ResultCallback callback)
×
701
{
702
    _impl->set_rate_odometry_async(rate_hz, callback);
×
703
}
×
704

705
Telemetry::Result Telemetry::set_rate_odometry(double rate_hz) const
×
706
{
707
    return _impl->set_rate_odometry(rate_hz);
×
708
}
709

710
void Telemetry::set_rate_position_velocity_ned_async(double rate_hz, const ResultCallback callback)
×
711
{
712
    _impl->set_rate_position_velocity_ned_async(rate_hz, callback);
×
713
}
×
714

715
Telemetry::Result Telemetry::set_rate_position_velocity_ned(double rate_hz) const
×
716
{
717
    return _impl->set_rate_position_velocity_ned(rate_hz);
×
718
}
719

720
void Telemetry::set_rate_ground_truth_async(double rate_hz, const ResultCallback callback)
×
721
{
722
    _impl->set_rate_ground_truth_async(rate_hz, callback);
×
723
}
×
724

725
Telemetry::Result Telemetry::set_rate_ground_truth(double rate_hz) const
×
726
{
727
    return _impl->set_rate_ground_truth(rate_hz);
×
728
}
729

730
void Telemetry::set_rate_fixedwing_metrics_async(double rate_hz, const ResultCallback callback)
×
731
{
732
    _impl->set_rate_fixedwing_metrics_async(rate_hz, callback);
×
733
}
×
734

735
Telemetry::Result Telemetry::set_rate_fixedwing_metrics(double rate_hz) const
×
736
{
737
    return _impl->set_rate_fixedwing_metrics(rate_hz);
×
738
}
739

740
void Telemetry::set_rate_imu_async(double rate_hz, const ResultCallback callback)
×
741
{
742
    _impl->set_rate_imu_async(rate_hz, callback);
×
743
}
×
744

745
Telemetry::Result Telemetry::set_rate_imu(double rate_hz) const
×
746
{
747
    return _impl->set_rate_imu(rate_hz);
×
748
}
749

750
void Telemetry::set_rate_scaled_imu_async(double rate_hz, const ResultCallback callback)
×
751
{
752
    _impl->set_rate_scaled_imu_async(rate_hz, callback);
×
753
}
×
754

755
Telemetry::Result Telemetry::set_rate_scaled_imu(double rate_hz) const
×
756
{
757
    return _impl->set_rate_scaled_imu(rate_hz);
×
758
}
759

760
void Telemetry::set_rate_raw_imu_async(double rate_hz, const ResultCallback callback)
×
761
{
762
    _impl->set_rate_raw_imu_async(rate_hz, callback);
×
763
}
×
764

765
Telemetry::Result Telemetry::set_rate_raw_imu(double rate_hz) const
×
766
{
767
    return _impl->set_rate_raw_imu(rate_hz);
×
768
}
769

770
void Telemetry::set_rate_unix_epoch_time_async(double rate_hz, const ResultCallback callback)
×
771
{
772
    _impl->set_rate_unix_epoch_time_async(rate_hz, callback);
×
773
}
×
774

775
Telemetry::Result Telemetry::set_rate_unix_epoch_time(double rate_hz) const
×
776
{
777
    return _impl->set_rate_unix_epoch_time(rate_hz);
×
778
}
779

780
void Telemetry::set_rate_distance_sensor_async(double rate_hz, const ResultCallback callback)
×
781
{
782
    _impl->set_rate_distance_sensor_async(rate_hz, callback);
×
783
}
×
784

785
Telemetry::Result Telemetry::set_rate_distance_sensor(double rate_hz) const
×
786
{
787
    return _impl->set_rate_distance_sensor(rate_hz);
×
788
}
789

790
void Telemetry::set_rate_altitude_async(double rate_hz, const ResultCallback callback)
×
791
{
792
    _impl->set_rate_altitude_async(rate_hz, callback);
×
793
}
×
794

795
Telemetry::Result Telemetry::set_rate_altitude(double rate_hz) const
×
796
{
797
    return _impl->set_rate_altitude(rate_hz);
×
798
}
799

800
void Telemetry::set_rate_health_async(double rate_hz, const ResultCallback callback)
×
801
{
802
    _impl->set_rate_health_async(rate_hz, callback);
×
803
}
×
804

805
Telemetry::Result Telemetry::set_rate_health(double rate_hz) const
×
806
{
807
    return _impl->set_rate_health(rate_hz);
×
808
}
809

810
void Telemetry::get_gps_global_origin_async(const GetGpsGlobalOriginCallback callback)
×
811
{
812
    _impl->get_gps_global_origin_async(callback);
×
813
}
×
814

815
std::pair<Telemetry::Result, Telemetry::GpsGlobalOrigin> Telemetry::get_gps_global_origin() const
×
816
{
817
    return _impl->get_gps_global_origin();
×
818
}
819

820
bool operator==(const Telemetry::Position& lhs, const Telemetry::Position& rhs)
×
821
{
822
    return ((std::isnan(rhs.latitude_deg) && std::isnan(lhs.latitude_deg)) ||
×
823
            rhs.latitude_deg == lhs.latitude_deg) &&
×
824
           ((std::isnan(rhs.longitude_deg) && std::isnan(lhs.longitude_deg)) ||
×
825
            rhs.longitude_deg == lhs.longitude_deg) &&
×
826
           ((std::isnan(rhs.absolute_altitude_m) && std::isnan(lhs.absolute_altitude_m)) ||
×
827
            rhs.absolute_altitude_m == lhs.absolute_altitude_m) &&
×
828
           ((std::isnan(rhs.relative_altitude_m) && std::isnan(lhs.relative_altitude_m)) ||
×
829
            rhs.relative_altitude_m == lhs.relative_altitude_m);
×
830
}
831

832
std::ostream& operator<<(std::ostream& str, Telemetry::Position const& position)
×
833
{
834
    str << std::setprecision(15);
×
835
    str << "position:" << '\n' << "{\n";
×
836
    str << "    latitude_deg: " << position.latitude_deg << '\n';
×
837
    str << "    longitude_deg: " << position.longitude_deg << '\n';
×
838
    str << "    absolute_altitude_m: " << position.absolute_altitude_m << '\n';
×
839
    str << "    relative_altitude_m: " << position.relative_altitude_m << '\n';
×
840
    str << '}';
×
841
    return str;
×
842
}
843

844
bool operator==(const Telemetry::Heading& lhs, const Telemetry::Heading& rhs)
×
845
{
846
    return (
847
        (std::isnan(rhs.heading_deg) && std::isnan(lhs.heading_deg)) ||
×
848
        rhs.heading_deg == lhs.heading_deg);
×
849
}
850

851
std::ostream& operator<<(std::ostream& str, Telemetry::Heading const& heading)
×
852
{
853
    str << std::setprecision(15);
×
854
    str << "heading:" << '\n' << "{\n";
×
855
    str << "    heading_deg: " << heading.heading_deg << '\n';
×
856
    str << '}';
×
857
    return str;
×
858
}
859

860
bool operator==(const Telemetry::Quaternion& lhs, const Telemetry::Quaternion& rhs)
×
861
{
862
    return ((std::isnan(rhs.w) && std::isnan(lhs.w)) || rhs.w == lhs.w) &&
×
863
           ((std::isnan(rhs.x) && std::isnan(lhs.x)) || rhs.x == lhs.x) &&
×
864
           ((std::isnan(rhs.y) && std::isnan(lhs.y)) || rhs.y == lhs.y) &&
×
865
           ((std::isnan(rhs.z) && std::isnan(lhs.z)) || rhs.z == lhs.z) &&
×
866
           (rhs.timestamp_us == lhs.timestamp_us);
×
867
}
868

869
std::ostream& operator<<(std::ostream& str, Telemetry::Quaternion const& quaternion)
×
870
{
871
    str << std::setprecision(15);
×
872
    str << "quaternion:" << '\n' << "{\n";
×
873
    str << "    w: " << quaternion.w << '\n';
×
874
    str << "    x: " << quaternion.x << '\n';
×
875
    str << "    y: " << quaternion.y << '\n';
×
876
    str << "    z: " << quaternion.z << '\n';
×
877
    str << "    timestamp_us: " << quaternion.timestamp_us << '\n';
×
878
    str << '}';
×
879
    return str;
×
880
}
881

882
bool operator==(const Telemetry::EulerAngle& lhs, const Telemetry::EulerAngle& rhs)
×
883
{
884
    return ((std::isnan(rhs.roll_deg) && std::isnan(lhs.roll_deg)) ||
×
885
            rhs.roll_deg == lhs.roll_deg) &&
×
886
           ((std::isnan(rhs.pitch_deg) && std::isnan(lhs.pitch_deg)) ||
×
887
            rhs.pitch_deg == lhs.pitch_deg) &&
×
888
           ((std::isnan(rhs.yaw_deg) && std::isnan(lhs.yaw_deg)) || rhs.yaw_deg == lhs.yaw_deg) &&
×
889
           (rhs.timestamp_us == lhs.timestamp_us);
×
890
}
891

892
std::ostream& operator<<(std::ostream& str, Telemetry::EulerAngle const& euler_angle)
×
893
{
894
    str << std::setprecision(15);
×
895
    str << "euler_angle:" << '\n' << "{\n";
×
896
    str << "    roll_deg: " << euler_angle.roll_deg << '\n';
×
897
    str << "    pitch_deg: " << euler_angle.pitch_deg << '\n';
×
898
    str << "    yaw_deg: " << euler_angle.yaw_deg << '\n';
×
899
    str << "    timestamp_us: " << euler_angle.timestamp_us << '\n';
×
900
    str << '}';
×
901
    return str;
×
902
}
903

904
bool operator==(
×
905
    const Telemetry::AngularVelocityBody& lhs, const Telemetry::AngularVelocityBody& rhs)
906
{
907
    return ((std::isnan(rhs.roll_rad_s) && std::isnan(lhs.roll_rad_s)) ||
×
908
            rhs.roll_rad_s == lhs.roll_rad_s) &&
×
909
           ((std::isnan(rhs.pitch_rad_s) && std::isnan(lhs.pitch_rad_s)) ||
×
910
            rhs.pitch_rad_s == lhs.pitch_rad_s) &&
×
911
           ((std::isnan(rhs.yaw_rad_s) && std::isnan(lhs.yaw_rad_s)) ||
×
912
            rhs.yaw_rad_s == lhs.yaw_rad_s);
×
913
}
914

915
std::ostream&
916
operator<<(std::ostream& str, Telemetry::AngularVelocityBody const& angular_velocity_body)
×
917
{
918
    str << std::setprecision(15);
×
919
    str << "angular_velocity_body:" << '\n' << "{\n";
×
920
    str << "    roll_rad_s: " << angular_velocity_body.roll_rad_s << '\n';
×
921
    str << "    pitch_rad_s: " << angular_velocity_body.pitch_rad_s << '\n';
×
922
    str << "    yaw_rad_s: " << angular_velocity_body.yaw_rad_s << '\n';
×
923
    str << '}';
×
924
    return str;
×
925
}
926

927
bool operator==(const Telemetry::GpsInfo& lhs, const Telemetry::GpsInfo& rhs)
×
928
{
929
    return (rhs.num_satellites == lhs.num_satellites) && (rhs.fix_type == lhs.fix_type);
×
930
}
931

932
std::ostream& operator<<(std::ostream& str, Telemetry::GpsInfo const& gps_info)
×
933
{
934
    str << std::setprecision(15);
×
935
    str << "gps_info:" << '\n' << "{\n";
×
936
    str << "    num_satellites: " << gps_info.num_satellites << '\n';
×
937
    str << "    fix_type: " << gps_info.fix_type << '\n';
×
938
    str << '}';
×
939
    return str;
×
940
}
941

942
bool operator==(const Telemetry::RawGps& lhs, const Telemetry::RawGps& rhs)
×
943
{
944
    return (rhs.timestamp_us == lhs.timestamp_us) &&
×
945
           ((std::isnan(rhs.latitude_deg) && std::isnan(lhs.latitude_deg)) ||
×
946
            rhs.latitude_deg == lhs.latitude_deg) &&
×
947
           ((std::isnan(rhs.longitude_deg) && std::isnan(lhs.longitude_deg)) ||
×
948
            rhs.longitude_deg == lhs.longitude_deg) &&
×
949
           ((std::isnan(rhs.absolute_altitude_m) && std::isnan(lhs.absolute_altitude_m)) ||
×
950
            rhs.absolute_altitude_m == lhs.absolute_altitude_m) &&
×
951
           ((std::isnan(rhs.hdop) && std::isnan(lhs.hdop)) || rhs.hdop == lhs.hdop) &&
×
952
           ((std::isnan(rhs.vdop) && std::isnan(lhs.vdop)) || rhs.vdop == lhs.vdop) &&
×
953
           ((std::isnan(rhs.velocity_m_s) && std::isnan(lhs.velocity_m_s)) ||
×
954
            rhs.velocity_m_s == lhs.velocity_m_s) &&
×
955
           ((std::isnan(rhs.cog_deg) && std::isnan(lhs.cog_deg)) || rhs.cog_deg == lhs.cog_deg) &&
×
956
           ((std::isnan(rhs.altitude_ellipsoid_m) && std::isnan(lhs.altitude_ellipsoid_m)) ||
×
957
            rhs.altitude_ellipsoid_m == lhs.altitude_ellipsoid_m) &&
×
958
           ((std::isnan(rhs.horizontal_uncertainty_m) &&
×
959
             std::isnan(lhs.horizontal_uncertainty_m)) ||
×
960
            rhs.horizontal_uncertainty_m == lhs.horizontal_uncertainty_m) &&
×
961
           ((std::isnan(rhs.vertical_uncertainty_m) && std::isnan(lhs.vertical_uncertainty_m)) ||
×
962
            rhs.vertical_uncertainty_m == lhs.vertical_uncertainty_m) &&
×
963
           ((std::isnan(rhs.velocity_uncertainty_m_s) &&
×
964
             std::isnan(lhs.velocity_uncertainty_m_s)) ||
×
965
            rhs.velocity_uncertainty_m_s == lhs.velocity_uncertainty_m_s) &&
×
966
           ((std::isnan(rhs.heading_uncertainty_deg) && std::isnan(lhs.heading_uncertainty_deg)) ||
×
967
            rhs.heading_uncertainty_deg == lhs.heading_uncertainty_deg) &&
×
968
           ((std::isnan(rhs.yaw_deg) && std::isnan(lhs.yaw_deg)) || rhs.yaw_deg == lhs.yaw_deg);
×
969
}
970

971
std::ostream& operator<<(std::ostream& str, Telemetry::RawGps const& raw_gps)
×
972
{
973
    str << std::setprecision(15);
×
974
    str << "raw_gps:" << '\n' << "{\n";
×
975
    str << "    timestamp_us: " << raw_gps.timestamp_us << '\n';
×
976
    str << "    latitude_deg: " << raw_gps.latitude_deg << '\n';
×
977
    str << "    longitude_deg: " << raw_gps.longitude_deg << '\n';
×
978
    str << "    absolute_altitude_m: " << raw_gps.absolute_altitude_m << '\n';
×
979
    str << "    hdop: " << raw_gps.hdop << '\n';
×
980
    str << "    vdop: " << raw_gps.vdop << '\n';
×
981
    str << "    velocity_m_s: " << raw_gps.velocity_m_s << '\n';
×
982
    str << "    cog_deg: " << raw_gps.cog_deg << '\n';
×
983
    str << "    altitude_ellipsoid_m: " << raw_gps.altitude_ellipsoid_m << '\n';
×
984
    str << "    horizontal_uncertainty_m: " << raw_gps.horizontal_uncertainty_m << '\n';
×
985
    str << "    vertical_uncertainty_m: " << raw_gps.vertical_uncertainty_m << '\n';
×
986
    str << "    velocity_uncertainty_m_s: " << raw_gps.velocity_uncertainty_m_s << '\n';
×
987
    str << "    heading_uncertainty_deg: " << raw_gps.heading_uncertainty_deg << '\n';
×
988
    str << "    yaw_deg: " << raw_gps.yaw_deg << '\n';
×
989
    str << '}';
×
990
    return str;
×
991
}
992

993
bool operator==(const Telemetry::Battery& lhs, const Telemetry::Battery& rhs)
×
994
{
995
    return (rhs.id == lhs.id) &&
×
996
           ((std::isnan(rhs.temperature_degc) && std::isnan(lhs.temperature_degc)) ||
×
997
            rhs.temperature_degc == lhs.temperature_degc) &&
×
998
           ((std::isnan(rhs.voltage_v) && std::isnan(lhs.voltage_v)) ||
×
999
            rhs.voltage_v == lhs.voltage_v) &&
×
1000
           ((std::isnan(rhs.current_battery_a) && std::isnan(lhs.current_battery_a)) ||
×
1001
            rhs.current_battery_a == lhs.current_battery_a) &&
×
1002
           ((std::isnan(rhs.capacity_consumed_ah) && std::isnan(lhs.capacity_consumed_ah)) ||
×
1003
            rhs.capacity_consumed_ah == lhs.capacity_consumed_ah) &&
×
1004
           ((std::isnan(rhs.remaining_percent) && std::isnan(lhs.remaining_percent)) ||
×
1005
            rhs.remaining_percent == lhs.remaining_percent) &&
×
1006
           ((std::isnan(rhs.time_remaining_s) && std::isnan(lhs.time_remaining_s)) ||
×
1007
            rhs.time_remaining_s == lhs.time_remaining_s) &&
×
1008
           (rhs.battery_function == lhs.battery_function);
×
1009
}
1010

1011
std::ostream& operator<<(std::ostream& str, Telemetry::Battery const& battery)
×
1012
{
1013
    str << std::setprecision(15);
×
1014
    str << "battery:" << '\n' << "{\n";
×
1015
    str << "    id: " << battery.id << '\n';
×
1016
    str << "    temperature_degc: " << battery.temperature_degc << '\n';
×
1017
    str << "    voltage_v: " << battery.voltage_v << '\n';
×
1018
    str << "    current_battery_a: " << battery.current_battery_a << '\n';
×
1019
    str << "    capacity_consumed_ah: " << battery.capacity_consumed_ah << '\n';
×
1020
    str << "    remaining_percent: " << battery.remaining_percent << '\n';
×
1021
    str << "    time_remaining_s: " << battery.time_remaining_s << '\n';
×
1022
    str << "    battery_function: " << battery.battery_function << '\n';
×
1023
    str << '}';
×
1024
    return str;
×
1025
}
1026

1027
bool operator==(const Telemetry::Health& lhs, const Telemetry::Health& rhs)
×
1028
{
1029
    return (rhs.is_gyrometer_calibration_ok == lhs.is_gyrometer_calibration_ok) &&
×
1030
           (rhs.is_accelerometer_calibration_ok == lhs.is_accelerometer_calibration_ok) &&
×
1031
           (rhs.is_magnetometer_calibration_ok == lhs.is_magnetometer_calibration_ok) &&
×
1032
           (rhs.is_local_position_ok == lhs.is_local_position_ok) &&
×
1033
           (rhs.is_global_position_ok == lhs.is_global_position_ok) &&
×
1034
           (rhs.is_home_position_ok == lhs.is_home_position_ok) &&
×
1035
           (rhs.is_armable == lhs.is_armable);
×
1036
}
1037

1038
std::ostream& operator<<(std::ostream& str, Telemetry::Health const& health)
×
1039
{
1040
    str << std::setprecision(15);
×
1041
    str << "health:" << '\n' << "{\n";
×
1042
    str << "    is_gyrometer_calibration_ok: " << health.is_gyrometer_calibration_ok << '\n';
×
1043
    str << "    is_accelerometer_calibration_ok: " << health.is_accelerometer_calibration_ok
×
1044
        << '\n';
×
1045
    str << "    is_magnetometer_calibration_ok: " << health.is_magnetometer_calibration_ok << '\n';
×
1046
    str << "    is_local_position_ok: " << health.is_local_position_ok << '\n';
×
1047
    str << "    is_global_position_ok: " << health.is_global_position_ok << '\n';
×
1048
    str << "    is_home_position_ok: " << health.is_home_position_ok << '\n';
×
1049
    str << "    is_armable: " << health.is_armable << '\n';
×
1050
    str << '}';
×
1051
    return str;
×
1052
}
1053

1054
bool operator==(const Telemetry::RcStatus& lhs, const Telemetry::RcStatus& rhs)
×
1055
{
1056
    return (rhs.was_available_once == lhs.was_available_once) &&
×
1057
           (rhs.is_available == lhs.is_available) &&
×
1058
           ((std::isnan(rhs.signal_strength_percent) && std::isnan(lhs.signal_strength_percent)) ||
×
1059
            rhs.signal_strength_percent == lhs.signal_strength_percent);
×
1060
}
1061

1062
std::ostream& operator<<(std::ostream& str, Telemetry::RcStatus const& rc_status)
×
1063
{
1064
    str << std::setprecision(15);
×
1065
    str << "rc_status:" << '\n' << "{\n";
×
1066
    str << "    was_available_once: " << rc_status.was_available_once << '\n';
×
1067
    str << "    is_available: " << rc_status.is_available << '\n';
×
1068
    str << "    signal_strength_percent: " << rc_status.signal_strength_percent << '\n';
×
1069
    str << '}';
×
1070
    return str;
×
1071
}
1072

1073
bool operator==(const Telemetry::StatusText& lhs, const Telemetry::StatusText& rhs)
×
1074
{
1075
    return (rhs.type == lhs.type) && (rhs.text == lhs.text);
×
1076
}
1077

1078
std::ostream& operator<<(std::ostream& str, Telemetry::StatusText const& status_text)
×
1079
{
1080
    str << std::setprecision(15);
×
1081
    str << "status_text:" << '\n' << "{\n";
×
1082
    str << "    type: " << status_text.type << '\n';
×
1083
    str << "    text: " << status_text.text << '\n';
×
1084
    str << '}';
×
1085
    return str;
×
1086
}
1087

1088
bool operator==(
×
1089
    const Telemetry::ActuatorControlTarget& lhs, const Telemetry::ActuatorControlTarget& rhs)
1090
{
1091
    return (rhs.group == lhs.group) && (rhs.controls == lhs.controls);
×
1092
}
1093

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

1111
bool operator==(
×
1112
    const Telemetry::ActuatorOutputStatus& lhs, const Telemetry::ActuatorOutputStatus& rhs)
1113
{
1114
    return (rhs.active == lhs.active) && (rhs.actuator == lhs.actuator);
×
1115
}
1116

1117
std::ostream&
1118
operator<<(std::ostream& str, Telemetry::ActuatorOutputStatus const& actuator_output_status)
×
1119
{
1120
    str << std::setprecision(15);
×
1121
    str << "actuator_output_status:" << '\n' << "{\n";
×
1122
    str << "    active: " << actuator_output_status.active << '\n';
×
1123
    str << "    actuator: [";
×
1124
    for (auto it = actuator_output_status.actuator.begin();
×
1125
         it != actuator_output_status.actuator.end();
×
1126
         ++it) {
×
1127
        str << *it;
×
1128
        str << (it + 1 != actuator_output_status.actuator.end() ? ", " : "]\n");
×
1129
    }
1130
    str << '}';
×
1131
    return str;
×
1132
}
1133

1134
bool operator==(const Telemetry::Covariance& lhs, const Telemetry::Covariance& rhs)
×
1135
{
1136
    return (rhs.covariance_matrix == lhs.covariance_matrix);
×
1137
}
1138

1139
std::ostream& operator<<(std::ostream& str, Telemetry::Covariance const& covariance)
×
1140
{
1141
    str << std::setprecision(15);
×
1142
    str << "covariance:" << '\n' << "{\n";
×
1143
    str << "    covariance_matrix: [";
×
1144
    for (auto it = covariance.covariance_matrix.begin(); it != covariance.covariance_matrix.end();
×
1145
         ++it) {
×
1146
        str << *it;
×
1147
        str << (it + 1 != covariance.covariance_matrix.end() ? ", " : "]\n");
×
1148
    }
1149
    str << '}';
×
1150
    return str;
×
1151
}
1152

1153
bool operator==(const Telemetry::VelocityBody& lhs, const Telemetry::VelocityBody& rhs)
×
1154
{
1155
    return ((std::isnan(rhs.x_m_s) && std::isnan(lhs.x_m_s)) || rhs.x_m_s == lhs.x_m_s) &&
×
1156
           ((std::isnan(rhs.y_m_s) && std::isnan(lhs.y_m_s)) || rhs.y_m_s == lhs.y_m_s) &&
×
1157
           ((std::isnan(rhs.z_m_s) && std::isnan(lhs.z_m_s)) || rhs.z_m_s == lhs.z_m_s);
×
1158
}
1159

1160
std::ostream& operator<<(std::ostream& str, Telemetry::VelocityBody const& velocity_body)
×
1161
{
1162
    str << std::setprecision(15);
×
1163
    str << "velocity_body:" << '\n' << "{\n";
×
1164
    str << "    x_m_s: " << velocity_body.x_m_s << '\n';
×
1165
    str << "    y_m_s: " << velocity_body.y_m_s << '\n';
×
1166
    str << "    z_m_s: " << velocity_body.z_m_s << '\n';
×
1167
    str << '}';
×
1168
    return str;
×
1169
}
1170

1171
bool operator==(const Telemetry::PositionBody& lhs, const Telemetry::PositionBody& rhs)
×
1172
{
1173
    return ((std::isnan(rhs.x_m) && std::isnan(lhs.x_m)) || rhs.x_m == lhs.x_m) &&
×
1174
           ((std::isnan(rhs.y_m) && std::isnan(lhs.y_m)) || rhs.y_m == lhs.y_m) &&
×
1175
           ((std::isnan(rhs.z_m) && std::isnan(lhs.z_m)) || rhs.z_m == lhs.z_m);
×
1176
}
1177

1178
std::ostream& operator<<(std::ostream& str, Telemetry::PositionBody const& position_body)
×
1179
{
1180
    str << std::setprecision(15);
×
1181
    str << "position_body:" << '\n' << "{\n";
×
1182
    str << "    x_m: " << position_body.x_m << '\n';
×
1183
    str << "    y_m: " << position_body.y_m << '\n';
×
1184
    str << "    z_m: " << position_body.z_m << '\n';
×
1185
    str << '}';
×
1186
    return str;
×
1187
}
1188

1189
std::ostream& operator<<(std::ostream& str, Telemetry::Odometry::MavFrame const& mav_frame)
×
1190
{
1191
    switch (mav_frame) {
×
1192
        case Telemetry::Odometry::MavFrame::Undef:
×
1193
            return str << "Undef";
×
1194
        case Telemetry::Odometry::MavFrame::BodyNed:
×
1195
            return str << "Body Ned";
×
1196
        case Telemetry::Odometry::MavFrame::VisionNed:
×
1197
            return str << "Vision Ned";
×
1198
        case Telemetry::Odometry::MavFrame::EstimNed:
×
1199
            return str << "Estim Ned";
×
1200
        default:
×
1201
            return str << "Unknown";
×
1202
    }
1203
}
1204
bool operator==(const Telemetry::Odometry& lhs, const Telemetry::Odometry& rhs)
×
1205
{
1206
    return (rhs.time_usec == lhs.time_usec) && (rhs.frame_id == lhs.frame_id) &&
×
1207
           (rhs.child_frame_id == lhs.child_frame_id) && (rhs.position_body == lhs.position_body) &&
×
1208
           (rhs.q == lhs.q) && (rhs.velocity_body == lhs.velocity_body) &&
×
1209
           (rhs.angular_velocity_body == lhs.angular_velocity_body) &&
×
1210
           (rhs.pose_covariance == lhs.pose_covariance) &&
×
1211
           (rhs.velocity_covariance == lhs.velocity_covariance);
×
1212
}
1213

1214
std::ostream& operator<<(std::ostream& str, Telemetry::Odometry const& odometry)
×
1215
{
1216
    str << std::setprecision(15);
×
1217
    str << "odometry:" << '\n' << "{\n";
×
1218
    str << "    time_usec: " << odometry.time_usec << '\n';
×
1219
    str << "    frame_id: " << odometry.frame_id << '\n';
×
1220
    str << "    child_frame_id: " << odometry.child_frame_id << '\n';
×
1221
    str << "    position_body: " << odometry.position_body << '\n';
×
1222
    str << "    q: " << odometry.q << '\n';
×
1223
    str << "    velocity_body: " << odometry.velocity_body << '\n';
×
1224
    str << "    angular_velocity_body: " << odometry.angular_velocity_body << '\n';
×
1225
    str << "    pose_covariance: " << odometry.pose_covariance << '\n';
×
1226
    str << "    velocity_covariance: " << odometry.velocity_covariance << '\n';
×
1227
    str << '}';
×
1228
    return str;
×
1229
}
1230

1231
bool operator==(const Telemetry::DistanceSensor& lhs, const Telemetry::DistanceSensor& rhs)
×
1232
{
1233
    return ((std::isnan(rhs.minimum_distance_m) && std::isnan(lhs.minimum_distance_m)) ||
×
1234
            rhs.minimum_distance_m == lhs.minimum_distance_m) &&
×
1235
           ((std::isnan(rhs.maximum_distance_m) && std::isnan(lhs.maximum_distance_m)) ||
×
1236
            rhs.maximum_distance_m == lhs.maximum_distance_m) &&
×
1237
           ((std::isnan(rhs.current_distance_m) && std::isnan(lhs.current_distance_m)) ||
×
1238
            rhs.current_distance_m == lhs.current_distance_m) &&
×
1239
           (rhs.orientation == lhs.orientation);
×
1240
}
1241

1242
std::ostream& operator<<(std::ostream& str, Telemetry::DistanceSensor const& distance_sensor)
×
1243
{
1244
    str << std::setprecision(15);
×
1245
    str << "distance_sensor:" << '\n' << "{\n";
×
1246
    str << "    minimum_distance_m: " << distance_sensor.minimum_distance_m << '\n';
×
1247
    str << "    maximum_distance_m: " << distance_sensor.maximum_distance_m << '\n';
×
1248
    str << "    current_distance_m: " << distance_sensor.current_distance_m << '\n';
×
1249
    str << "    orientation: " << distance_sensor.orientation << '\n';
×
1250
    str << '}';
×
1251
    return str;
×
1252
}
1253

1254
bool operator==(const Telemetry::ScaledPressure& lhs, const Telemetry::ScaledPressure& rhs)
×
1255
{
1256
    return (rhs.timestamp_us == lhs.timestamp_us) &&
×
1257
           ((std::isnan(rhs.absolute_pressure_hpa) && std::isnan(lhs.absolute_pressure_hpa)) ||
×
1258
            rhs.absolute_pressure_hpa == lhs.absolute_pressure_hpa) &&
×
1259
           ((std::isnan(rhs.differential_pressure_hpa) &&
×
1260
             std::isnan(lhs.differential_pressure_hpa)) ||
×
1261
            rhs.differential_pressure_hpa == lhs.differential_pressure_hpa) &&
×
1262
           ((std::isnan(rhs.temperature_deg) && std::isnan(lhs.temperature_deg)) ||
×
1263
            rhs.temperature_deg == lhs.temperature_deg) &&
×
1264
           ((std::isnan(rhs.differential_pressure_temperature_deg) &&
×
1265
             std::isnan(lhs.differential_pressure_temperature_deg)) ||
×
1266
            rhs.differential_pressure_temperature_deg == lhs.differential_pressure_temperature_deg);
×
1267
}
1268

1269
std::ostream& operator<<(std::ostream& str, Telemetry::ScaledPressure const& scaled_pressure)
×
1270
{
1271
    str << std::setprecision(15);
×
1272
    str << "scaled_pressure:" << '\n' << "{\n";
×
1273
    str << "    timestamp_us: " << scaled_pressure.timestamp_us << '\n';
×
1274
    str << "    absolute_pressure_hpa: " << scaled_pressure.absolute_pressure_hpa << '\n';
×
1275
    str << "    differential_pressure_hpa: " << scaled_pressure.differential_pressure_hpa << '\n';
×
1276
    str << "    temperature_deg: " << scaled_pressure.temperature_deg << '\n';
×
1277
    str << "    differential_pressure_temperature_deg: "
×
1278
        << scaled_pressure.differential_pressure_temperature_deg << '\n';
×
1279
    str << '}';
×
1280
    return str;
×
1281
}
1282

1283
bool operator==(const Telemetry::PositionNed& lhs, const Telemetry::PositionNed& rhs)
×
1284
{
1285
    return ((std::isnan(rhs.north_m) && std::isnan(lhs.north_m)) || rhs.north_m == lhs.north_m) &&
×
1286
           ((std::isnan(rhs.east_m) && std::isnan(lhs.east_m)) || rhs.east_m == lhs.east_m) &&
×
1287
           ((std::isnan(rhs.down_m) && std::isnan(lhs.down_m)) || rhs.down_m == lhs.down_m);
×
1288
}
1289

1290
std::ostream& operator<<(std::ostream& str, Telemetry::PositionNed const& position_ned)
×
1291
{
1292
    str << std::setprecision(15);
×
1293
    str << "position_ned:" << '\n' << "{\n";
×
1294
    str << "    north_m: " << position_ned.north_m << '\n';
×
1295
    str << "    east_m: " << position_ned.east_m << '\n';
×
1296
    str << "    down_m: " << position_ned.down_m << '\n';
×
1297
    str << '}';
×
1298
    return str;
×
1299
}
1300

1301
bool operator==(const Telemetry::VelocityNed& lhs, const Telemetry::VelocityNed& rhs)
×
1302
{
1303
    return ((std::isnan(rhs.north_m_s) && std::isnan(lhs.north_m_s)) ||
×
1304
            rhs.north_m_s == lhs.north_m_s) &&
×
1305
           ((std::isnan(rhs.east_m_s) && std::isnan(lhs.east_m_s)) ||
×
1306
            rhs.east_m_s == lhs.east_m_s) &&
×
1307
           ((std::isnan(rhs.down_m_s) && std::isnan(lhs.down_m_s)) || rhs.down_m_s == lhs.down_m_s);
×
1308
}
1309

1310
std::ostream& operator<<(std::ostream& str, Telemetry::VelocityNed const& velocity_ned)
×
1311
{
1312
    str << std::setprecision(15);
×
1313
    str << "velocity_ned:" << '\n' << "{\n";
×
1314
    str << "    north_m_s: " << velocity_ned.north_m_s << '\n';
×
1315
    str << "    east_m_s: " << velocity_ned.east_m_s << '\n';
×
1316
    str << "    down_m_s: " << velocity_ned.down_m_s << '\n';
×
1317
    str << '}';
×
1318
    return str;
×
1319
}
1320

1321
bool operator==(
×
1322
    const Telemetry::PositionVelocityNed& lhs, const Telemetry::PositionVelocityNed& rhs)
1323
{
1324
    return (rhs.position == lhs.position) && (rhs.velocity == lhs.velocity);
×
1325
}
1326

1327
std::ostream&
1328
operator<<(std::ostream& str, Telemetry::PositionVelocityNed const& position_velocity_ned)
×
1329
{
1330
    str << std::setprecision(15);
×
1331
    str << "position_velocity_ned:" << '\n' << "{\n";
×
1332
    str << "    position: " << position_velocity_ned.position << '\n';
×
1333
    str << "    velocity: " << position_velocity_ned.velocity << '\n';
×
1334
    str << '}';
×
1335
    return str;
×
1336
}
1337

1338
bool operator==(const Telemetry::GroundTruth& lhs, const Telemetry::GroundTruth& rhs)
2✔
1339
{
1340
    return ((std::isnan(rhs.latitude_deg) && std::isnan(lhs.latitude_deg)) ||
2✔
1341
            rhs.latitude_deg == lhs.latitude_deg) &&
4✔
1342
           ((std::isnan(rhs.longitude_deg) && std::isnan(lhs.longitude_deg)) ||
2✔
1343
            rhs.longitude_deg == lhs.longitude_deg) &&
4✔
1344
           ((std::isnan(rhs.absolute_altitude_m) && std::isnan(lhs.absolute_altitude_m)) ||
2✔
1345
            rhs.absolute_altitude_m == lhs.absolute_altitude_m) &&
6✔
1346
           (rhs.timestamp_us == lhs.timestamp_us);
4✔
1347
}
1348

1349
std::ostream& operator<<(std::ostream& str, Telemetry::GroundTruth const& ground_truth)
×
1350
{
1351
    str << std::setprecision(15);
×
1352
    str << "ground_truth:" << '\n' << "{\n";
×
1353
    str << "    latitude_deg: " << ground_truth.latitude_deg << '\n';
×
1354
    str << "    longitude_deg: " << ground_truth.longitude_deg << '\n';
×
1355
    str << "    absolute_altitude_m: " << ground_truth.absolute_altitude_m << '\n';
×
NEW
1356
    str << "    timestamp_us: " << ground_truth.timestamp_us << '\n';
×
1357
    str << '}';
×
1358
    return str;
×
1359
}
1360

1361
bool operator==(const Telemetry::FixedwingMetrics& lhs, const Telemetry::FixedwingMetrics& rhs)
×
1362
{
1363
    return ((std::isnan(rhs.airspeed_m_s) && std::isnan(lhs.airspeed_m_s)) ||
×
1364
            rhs.airspeed_m_s == lhs.airspeed_m_s) &&
×
1365
           ((std::isnan(rhs.throttle_percentage) && std::isnan(lhs.throttle_percentage)) ||
×
1366
            rhs.throttle_percentage == lhs.throttle_percentage) &&
×
1367
           ((std::isnan(rhs.climb_rate_m_s) && std::isnan(lhs.climb_rate_m_s)) ||
×
1368
            rhs.climb_rate_m_s == lhs.climb_rate_m_s) &&
×
1369
           ((std::isnan(rhs.groundspeed_m_s) && std::isnan(lhs.groundspeed_m_s)) ||
×
1370
            rhs.groundspeed_m_s == lhs.groundspeed_m_s) &&
×
1371
           ((std::isnan(rhs.heading_deg) && std::isnan(lhs.heading_deg)) ||
×
1372
            rhs.heading_deg == lhs.heading_deg) &&
×
1373
           ((std::isnan(rhs.absolute_altitude_m) && std::isnan(lhs.absolute_altitude_m)) ||
×
1374
            rhs.absolute_altitude_m == lhs.absolute_altitude_m);
×
1375
}
1376

1377
std::ostream& operator<<(std::ostream& str, Telemetry::FixedwingMetrics const& fixedwing_metrics)
×
1378
{
1379
    str << std::setprecision(15);
×
1380
    str << "fixedwing_metrics:" << '\n' << "{\n";
×
1381
    str << "    airspeed_m_s: " << fixedwing_metrics.airspeed_m_s << '\n';
×
1382
    str << "    throttle_percentage: " << fixedwing_metrics.throttle_percentage << '\n';
×
1383
    str << "    climb_rate_m_s: " << fixedwing_metrics.climb_rate_m_s << '\n';
×
1384
    str << "    groundspeed_m_s: " << fixedwing_metrics.groundspeed_m_s << '\n';
×
1385
    str << "    heading_deg: " << fixedwing_metrics.heading_deg << '\n';
×
1386
    str << "    absolute_altitude_m: " << fixedwing_metrics.absolute_altitude_m << '\n';
×
1387
    str << '}';
×
1388
    return str;
×
1389
}
1390

1391
bool operator==(const Telemetry::AccelerationFrd& lhs, const Telemetry::AccelerationFrd& rhs)
×
1392
{
1393
    return ((std::isnan(rhs.forward_m_s2) && std::isnan(lhs.forward_m_s2)) ||
×
1394
            rhs.forward_m_s2 == lhs.forward_m_s2) &&
×
1395
           ((std::isnan(rhs.right_m_s2) && std::isnan(lhs.right_m_s2)) ||
×
1396
            rhs.right_m_s2 == lhs.right_m_s2) &&
×
1397
           ((std::isnan(rhs.down_m_s2) && std::isnan(lhs.down_m_s2)) ||
×
1398
            rhs.down_m_s2 == lhs.down_m_s2);
×
1399
}
1400

1401
std::ostream& operator<<(std::ostream& str, Telemetry::AccelerationFrd const& acceleration_frd)
×
1402
{
1403
    str << std::setprecision(15);
×
1404
    str << "acceleration_frd:" << '\n' << "{\n";
×
1405
    str << "    forward_m_s2: " << acceleration_frd.forward_m_s2 << '\n';
×
1406
    str << "    right_m_s2: " << acceleration_frd.right_m_s2 << '\n';
×
1407
    str << "    down_m_s2: " << acceleration_frd.down_m_s2 << '\n';
×
1408
    str << '}';
×
1409
    return str;
×
1410
}
1411

1412
bool operator==(const Telemetry::AngularVelocityFrd& lhs, const Telemetry::AngularVelocityFrd& rhs)
×
1413
{
1414
    return ((std::isnan(rhs.forward_rad_s) && std::isnan(lhs.forward_rad_s)) ||
×
1415
            rhs.forward_rad_s == lhs.forward_rad_s) &&
×
1416
           ((std::isnan(rhs.right_rad_s) && std::isnan(lhs.right_rad_s)) ||
×
1417
            rhs.right_rad_s == lhs.right_rad_s) &&
×
1418
           ((std::isnan(rhs.down_rad_s) && std::isnan(lhs.down_rad_s)) ||
×
1419
            rhs.down_rad_s == lhs.down_rad_s);
×
1420
}
1421

1422
std::ostream&
1423
operator<<(std::ostream& str, Telemetry::AngularVelocityFrd const& angular_velocity_frd)
×
1424
{
1425
    str << std::setprecision(15);
×
1426
    str << "angular_velocity_frd:" << '\n' << "{\n";
×
1427
    str << "    forward_rad_s: " << angular_velocity_frd.forward_rad_s << '\n';
×
1428
    str << "    right_rad_s: " << angular_velocity_frd.right_rad_s << '\n';
×
1429
    str << "    down_rad_s: " << angular_velocity_frd.down_rad_s << '\n';
×
1430
    str << '}';
×
1431
    return str;
×
1432
}
1433

1434
bool operator==(const Telemetry::MagneticFieldFrd& lhs, const Telemetry::MagneticFieldFrd& rhs)
×
1435
{
1436
    return ((std::isnan(rhs.forward_gauss) && std::isnan(lhs.forward_gauss)) ||
×
1437
            rhs.forward_gauss == lhs.forward_gauss) &&
×
1438
           ((std::isnan(rhs.right_gauss) && std::isnan(lhs.right_gauss)) ||
×
1439
            rhs.right_gauss == lhs.right_gauss) &&
×
1440
           ((std::isnan(rhs.down_gauss) && std::isnan(lhs.down_gauss)) ||
×
1441
            rhs.down_gauss == lhs.down_gauss);
×
1442
}
1443

1444
std::ostream& operator<<(std::ostream& str, Telemetry::MagneticFieldFrd const& magnetic_field_frd)
×
1445
{
1446
    str << std::setprecision(15);
×
1447
    str << "magnetic_field_frd:" << '\n' << "{\n";
×
1448
    str << "    forward_gauss: " << magnetic_field_frd.forward_gauss << '\n';
×
1449
    str << "    right_gauss: " << magnetic_field_frd.right_gauss << '\n';
×
1450
    str << "    down_gauss: " << magnetic_field_frd.down_gauss << '\n';
×
1451
    str << '}';
×
1452
    return str;
×
1453
}
1454

1455
bool operator==(const Telemetry::Imu& lhs, const Telemetry::Imu& rhs)
×
1456
{
1457
    return (rhs.acceleration_frd == lhs.acceleration_frd) &&
×
1458
           (rhs.angular_velocity_frd == lhs.angular_velocity_frd) &&
×
1459
           (rhs.magnetic_field_frd == lhs.magnetic_field_frd) &&
×
1460
           ((std::isnan(rhs.temperature_degc) && std::isnan(lhs.temperature_degc)) ||
×
1461
            rhs.temperature_degc == lhs.temperature_degc) &&
×
1462
           (rhs.timestamp_us == lhs.timestamp_us);
×
1463
}
1464

1465
std::ostream& operator<<(std::ostream& str, Telemetry::Imu const& imu)
×
1466
{
1467
    str << std::setprecision(15);
×
1468
    str << "imu:" << '\n' << "{\n";
×
1469
    str << "    acceleration_frd: " << imu.acceleration_frd << '\n';
×
1470
    str << "    angular_velocity_frd: " << imu.angular_velocity_frd << '\n';
×
1471
    str << "    magnetic_field_frd: " << imu.magnetic_field_frd << '\n';
×
1472
    str << "    temperature_degc: " << imu.temperature_degc << '\n';
×
1473
    str << "    timestamp_us: " << imu.timestamp_us << '\n';
×
1474
    str << '}';
×
1475
    return str;
×
1476
}
1477

1478
bool operator==(const Telemetry::GpsGlobalOrigin& lhs, const Telemetry::GpsGlobalOrigin& rhs)
×
1479
{
1480
    return ((std::isnan(rhs.latitude_deg) && std::isnan(lhs.latitude_deg)) ||
×
1481
            rhs.latitude_deg == lhs.latitude_deg) &&
×
1482
           ((std::isnan(rhs.longitude_deg) && std::isnan(lhs.longitude_deg)) ||
×
1483
            rhs.longitude_deg == lhs.longitude_deg) &&
×
1484
           ((std::isnan(rhs.altitude_m) && std::isnan(lhs.altitude_m)) ||
×
1485
            rhs.altitude_m == lhs.altitude_m);
×
1486
}
1487

1488
std::ostream& operator<<(std::ostream& str, Telemetry::GpsGlobalOrigin const& gps_global_origin)
×
1489
{
1490
    str << std::setprecision(15);
×
1491
    str << "gps_global_origin:" << '\n' << "{\n";
×
1492
    str << "    latitude_deg: " << gps_global_origin.latitude_deg << '\n';
×
1493
    str << "    longitude_deg: " << gps_global_origin.longitude_deg << '\n';
×
1494
    str << "    altitude_m: " << gps_global_origin.altitude_m << '\n';
×
1495
    str << '}';
×
1496
    return str;
×
1497
}
1498

1499
bool operator==(const Telemetry::Altitude& lhs, const Telemetry::Altitude& rhs)
2✔
1500
{
1501
    return ((std::isnan(rhs.altitude_monotonic_m) && std::isnan(lhs.altitude_monotonic_m)) ||
2✔
1502
            rhs.altitude_monotonic_m == lhs.altitude_monotonic_m) &&
4✔
1503
           ((std::isnan(rhs.altitude_amsl_m) && std::isnan(lhs.altitude_amsl_m)) ||
2✔
1504
            rhs.altitude_amsl_m == lhs.altitude_amsl_m) &&
4✔
1505
           ((std::isnan(rhs.altitude_local_m) && std::isnan(lhs.altitude_local_m)) ||
2✔
1506
            rhs.altitude_local_m == lhs.altitude_local_m) &&
4✔
1507
           ((std::isnan(rhs.altitude_relative_m) && std::isnan(lhs.altitude_relative_m)) ||
2✔
1508
            rhs.altitude_relative_m == lhs.altitude_relative_m) &&
4✔
1509
           ((std::isnan(rhs.altitude_terrain_m) && std::isnan(lhs.altitude_terrain_m)) ||
2✔
1510
            rhs.altitude_terrain_m == lhs.altitude_terrain_m) &&
4✔
1511
           ((std::isnan(rhs.bottom_clearance_m) && std::isnan(lhs.bottom_clearance_m)) ||
2✔
1512
            rhs.bottom_clearance_m == lhs.bottom_clearance_m) &&
6✔
1513
           (rhs.timestamp_us == lhs.timestamp_us);
4✔
1514
}
1515

1516
std::ostream& operator<<(std::ostream& str, Telemetry::Altitude const& altitude)
×
1517
{
1518
    str << std::setprecision(15);
×
1519
    str << "altitude:" << '\n' << "{\n";
×
1520
    str << "    altitude_monotonic_m: " << altitude.altitude_monotonic_m << '\n';
×
1521
    str << "    altitude_amsl_m: " << altitude.altitude_amsl_m << '\n';
×
1522
    str << "    altitude_local_m: " << altitude.altitude_local_m << '\n';
×
1523
    str << "    altitude_relative_m: " << altitude.altitude_relative_m << '\n';
×
1524
    str << "    altitude_terrain_m: " << altitude.altitude_terrain_m << '\n';
×
1525
    str << "    bottom_clearance_m: " << altitude.bottom_clearance_m << '\n';
×
NEW
1526
    str << "    timestamp_us: " << altitude.timestamp_us << '\n';
×
1527
    str << '}';
×
1528
    return str;
×
1529
}
1530

1531
bool operator==(const Telemetry::Wind& lhs, const Telemetry::Wind& rhs)
×
1532
{
1533
    return ((std::isnan(rhs.wind_x_ned_m_s) && std::isnan(lhs.wind_x_ned_m_s)) ||
×
1534
            rhs.wind_x_ned_m_s == lhs.wind_x_ned_m_s) &&
×
1535
           ((std::isnan(rhs.wind_y_ned_m_s) && std::isnan(lhs.wind_y_ned_m_s)) ||
×
1536
            rhs.wind_y_ned_m_s == lhs.wind_y_ned_m_s) &&
×
1537
           ((std::isnan(rhs.wind_z_ned_m_s) && std::isnan(lhs.wind_z_ned_m_s)) ||
×
1538
            rhs.wind_z_ned_m_s == lhs.wind_z_ned_m_s) &&
×
1539
           ((std::isnan(rhs.horizontal_variability_stddev_m_s) &&
×
1540
             std::isnan(lhs.horizontal_variability_stddev_m_s)) ||
×
1541
            rhs.horizontal_variability_stddev_m_s == lhs.horizontal_variability_stddev_m_s) &&
×
1542
           ((std::isnan(rhs.vertical_variability_stddev_m_s) &&
×
1543
             std::isnan(lhs.vertical_variability_stddev_m_s)) ||
×
1544
            rhs.vertical_variability_stddev_m_s == lhs.vertical_variability_stddev_m_s) &&
×
1545
           ((std::isnan(rhs.wind_altitude_msl_m) && std::isnan(lhs.wind_altitude_msl_m)) ||
×
1546
            rhs.wind_altitude_msl_m == lhs.wind_altitude_msl_m) &&
×
1547
           ((std::isnan(rhs.horizontal_wind_speed_accuracy_m_s) &&
×
1548
             std::isnan(lhs.horizontal_wind_speed_accuracy_m_s)) ||
×
1549
            rhs.horizontal_wind_speed_accuracy_m_s == lhs.horizontal_wind_speed_accuracy_m_s) &&
×
1550
           ((std::isnan(rhs.vertical_wind_speed_accuracy_m_s) &&
×
1551
             std::isnan(lhs.vertical_wind_speed_accuracy_m_s)) ||
×
1552
            rhs.vertical_wind_speed_accuracy_m_s == lhs.vertical_wind_speed_accuracy_m_s);
×
1553
}
1554

1555
std::ostream& operator<<(std::ostream& str, Telemetry::Wind const& wind)
×
1556
{
1557
    str << std::setprecision(15);
×
1558
    str << "wind:" << '\n' << "{\n";
×
1559
    str << "    wind_x_ned_m_s: " << wind.wind_x_ned_m_s << '\n';
×
1560
    str << "    wind_y_ned_m_s: " << wind.wind_y_ned_m_s << '\n';
×
1561
    str << "    wind_z_ned_m_s: " << wind.wind_z_ned_m_s << '\n';
×
1562
    str << "    horizontal_variability_stddev_m_s: " << wind.horizontal_variability_stddev_m_s
×
1563
        << '\n';
×
1564
    str << "    vertical_variability_stddev_m_s: " << wind.vertical_variability_stddev_m_s << '\n';
×
1565
    str << "    wind_altitude_msl_m: " << wind.wind_altitude_msl_m << '\n';
×
1566
    str << "    horizontal_wind_speed_accuracy_m_s: " << wind.horizontal_wind_speed_accuracy_m_s
×
1567
        << '\n';
×
1568
    str << "    vertical_wind_speed_accuracy_m_s: " << wind.vertical_wind_speed_accuracy_m_s
×
1569
        << '\n';
×
1570
    str << '}';
×
1571
    return str;
×
1572
}
1573

1574
std::ostream& operator<<(std::ostream& str, Telemetry::Result const& result)
×
1575
{
1576
    switch (result) {
×
1577
        case Telemetry::Result::Unknown:
×
1578
            return str << "Unknown";
×
1579
        case Telemetry::Result::Success:
×
1580
            return str << "Success";
×
1581
        case Telemetry::Result::NoSystem:
×
1582
            return str << "No System";
×
1583
        case Telemetry::Result::ConnectionError:
×
1584
            return str << "Connection Error";
×
1585
        case Telemetry::Result::Busy:
×
1586
            return str << "Busy";
×
1587
        case Telemetry::Result::CommandDenied:
×
1588
            return str << "Command Denied";
×
1589
        case Telemetry::Result::Timeout:
×
1590
            return str << "Timeout";
×
1591
        case Telemetry::Result::Unsupported:
×
1592
            return str << "Unsupported";
×
1593
        default:
×
1594
            return str << "Unknown";
×
1595
    }
1596
}
1597

1598
std::ostream& operator<<(std::ostream& str, Telemetry::FixType const& fix_type)
×
1599
{
1600
    switch (fix_type) {
×
1601
        case Telemetry::FixType::NoGps:
×
1602
            return str << "No Gps";
×
1603
        case Telemetry::FixType::NoFix:
×
1604
            return str << "No Fix";
×
1605
        case Telemetry::FixType::Fix2D:
×
1606
            return str << "Fix 2D";
×
1607
        case Telemetry::FixType::Fix3D:
×
1608
            return str << "Fix 3D";
×
1609
        case Telemetry::FixType::FixDgps:
×
1610
            return str << "Fix Dgps";
×
1611
        case Telemetry::FixType::RtkFloat:
×
1612
            return str << "Rtk Float";
×
1613
        case Telemetry::FixType::RtkFixed:
×
1614
            return str << "Rtk Fixed";
×
1615
        default:
×
1616
            return str << "Unknown";
×
1617
    }
1618
}
1619

1620
std::ostream& operator<<(std::ostream& str, Telemetry::BatteryFunction const& battery_function)
×
1621
{
1622
    switch (battery_function) {
×
1623
        case Telemetry::BatteryFunction::Unknown:
×
1624
            return str << "Unknown";
×
1625
        case Telemetry::BatteryFunction::All:
×
1626
            return str << "All";
×
1627
        case Telemetry::BatteryFunction::Propulsion:
×
1628
            return str << "Propulsion";
×
1629
        case Telemetry::BatteryFunction::Avionics:
×
1630
            return str << "Avionics";
×
1631
        case Telemetry::BatteryFunction::Payload:
×
1632
            return str << "Payload";
×
1633
        default:
×
1634
            return str << "Unknown";
×
1635
    }
1636
}
1637

1638
std::ostream& operator<<(std::ostream& str, Telemetry::FlightMode const& flight_mode)
×
1639
{
1640
    switch (flight_mode) {
×
1641
        case Telemetry::FlightMode::Unknown:
×
1642
            return str << "Unknown";
×
1643
        case Telemetry::FlightMode::Ready:
×
1644
            return str << "Ready";
×
1645
        case Telemetry::FlightMode::Takeoff:
×
1646
            return str << "Takeoff";
×
1647
        case Telemetry::FlightMode::Hold:
×
1648
            return str << "Hold";
×
1649
        case Telemetry::FlightMode::Mission:
×
1650
            return str << "Mission";
×
1651
        case Telemetry::FlightMode::ReturnToLaunch:
×
1652
            return str << "Return To Launch";
×
1653
        case Telemetry::FlightMode::Land:
×
1654
            return str << "Land";
×
1655
        case Telemetry::FlightMode::Offboard:
×
1656
            return str << "Offboard";
×
1657
        case Telemetry::FlightMode::FollowMe:
×
1658
            return str << "Follow Me";
×
1659
        case Telemetry::FlightMode::Manual:
×
1660
            return str << "Manual";
×
1661
        case Telemetry::FlightMode::Altctl:
×
1662
            return str << "Altctl";
×
1663
        case Telemetry::FlightMode::Posctl:
×
1664
            return str << "Posctl";
×
1665
        case Telemetry::FlightMode::Acro:
×
1666
            return str << "Acro";
×
1667
        case Telemetry::FlightMode::Stabilized:
×
1668
            return str << "Stabilized";
×
1669
        case Telemetry::FlightMode::Rattitude:
×
1670
            return str << "Rattitude";
×
1671
        default:
×
1672
            return str << "Unknown";
×
1673
    }
1674
}
1675

1676
std::ostream& operator<<(std::ostream& str, Telemetry::StatusTextType const& status_text_type)
×
1677
{
1678
    switch (status_text_type) {
×
1679
        case Telemetry::StatusTextType::Debug:
×
1680
            return str << "Debug";
×
1681
        case Telemetry::StatusTextType::Info:
×
1682
            return str << "Info";
×
1683
        case Telemetry::StatusTextType::Notice:
×
1684
            return str << "Notice";
×
1685
        case Telemetry::StatusTextType::Warning:
×
1686
            return str << "Warning";
×
1687
        case Telemetry::StatusTextType::Error:
×
1688
            return str << "Error";
×
1689
        case Telemetry::StatusTextType::Critical:
×
1690
            return str << "Critical";
×
1691
        case Telemetry::StatusTextType::Alert:
×
1692
            return str << "Alert";
×
1693
        case Telemetry::StatusTextType::Emergency:
×
1694
            return str << "Emergency";
×
1695
        default:
×
1696
            return str << "Unknown";
×
1697
    }
1698
}
1699

1700
std::ostream& operator<<(std::ostream& str, Telemetry::LandedState const& landed_state)
×
1701
{
1702
    switch (landed_state) {
×
1703
        case Telemetry::LandedState::Unknown:
×
1704
            return str << "Unknown";
×
1705
        case Telemetry::LandedState::OnGround:
×
1706
            return str << "On Ground";
×
1707
        case Telemetry::LandedState::InAir:
×
1708
            return str << "In Air";
×
1709
        case Telemetry::LandedState::TakingOff:
×
1710
            return str << "Taking Off";
×
1711
        case Telemetry::LandedState::Landing:
×
1712
            return str << "Landing";
×
1713
        default:
×
1714
            return str << "Unknown";
×
1715
    }
1716
}
1717

1718
std::ostream& operator<<(std::ostream& str, Telemetry::VtolState const& vtol_state)
×
1719
{
1720
    switch (vtol_state) {
×
1721
        case Telemetry::VtolState::Undefined:
×
1722
            return str << "Undefined";
×
1723
        case Telemetry::VtolState::TransitionToFw:
×
1724
            return str << "Transition To Fw";
×
1725
        case Telemetry::VtolState::TransitionToMc:
×
1726
            return str << "Transition To Mc";
×
1727
        case Telemetry::VtolState::Mc:
×
1728
            return str << "Mc";
×
1729
        case Telemetry::VtolState::Fw:
×
1730
            return str << "Fw";
×
1731
        default:
×
1732
            return str << "Unknown";
×
1733
    }
1734
}
1735

1736
} // 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