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

mavlink / MAVSDK / 14854566885

06 May 2025 07:57AM UTC coverage: 44.182% (-0.04%) from 44.218%
14854566885

push

github

web-flow
Merge pull request #2524 from aminballoon/pr-update-Battery-TimeRemain&Function

Update Battery Remaining Time and Battery Function

0 of 39 new or added lines in 2 files covered. (0.0%)

2 existing lines in 2 files now uncovered.

14789 of 33473 relevant lines covered (44.18%)

276.9 hits per line

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

0.87
/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) :
1✔
48
    PluginBase(),
49
    _impl{std::make_unique<TelemetryImpl>(system)}
1✔
50
{}
1✔
51

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

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

59
void Telemetry::unsubscribe_position(PositionHandle handle)
×
60
{
61
    _impl->unsubscribe_position(handle);
×
62
}
×
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)
×
283
{
284
    return _impl->subscribe_rc_status(callback);
×
285
}
286

287
void Telemetry::unsubscribe_rc_status(RcStatusHandle handle)
×
288
{
289
    _impl->unsubscribe_rc_status(handle);
×
290
}
×
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)
×
376
{
377
    return _impl->subscribe_ground_truth(callback);
×
378
}
379

380
void Telemetry::unsubscribe_ground_truth(GroundTruthHandle handle)
×
381
{
382
    _impl->unsubscribe_ground_truth(handle);
×
383
}
×
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)
×
530
{
531
    return _impl->subscribe_altitude(callback);
×
532
}
533

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

539
Telemetry::Altitude Telemetry::altitude() const
×
540
{
541
    return _impl->altitude();
×
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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

790
void Telemetry::get_gps_global_origin_async(const GetGpsGlobalOriginCallback callback)
×
791
{
792
    _impl->get_gps_global_origin_async(callback);
×
793
}
×
794

795
std::pair<Telemetry::Result, Telemetry::GpsGlobalOrigin> Telemetry::get_gps_global_origin() const
×
796
{
797
    return _impl->get_gps_global_origin();
×
798
}
799

800
bool operator==(const Telemetry::Position& lhs, const Telemetry::Position& rhs)
×
801
{
802
    return ((std::isnan(rhs.latitude_deg) && std::isnan(lhs.latitude_deg)) ||
×
803
            rhs.latitude_deg == lhs.latitude_deg) &&
×
804
           ((std::isnan(rhs.longitude_deg) && std::isnan(lhs.longitude_deg)) ||
×
805
            rhs.longitude_deg == lhs.longitude_deg) &&
×
806
           ((std::isnan(rhs.absolute_altitude_m) && std::isnan(lhs.absolute_altitude_m)) ||
×
807
            rhs.absolute_altitude_m == lhs.absolute_altitude_m) &&
×
808
           ((std::isnan(rhs.relative_altitude_m) && std::isnan(lhs.relative_altitude_m)) ||
×
809
            rhs.relative_altitude_m == lhs.relative_altitude_m);
×
810
}
811

812
std::ostream& operator<<(std::ostream& str, Telemetry::Position const& position)
×
813
{
814
    str << std::setprecision(15);
×
815
    str << "position:" << '\n' << "{\n";
×
816
    str << "    latitude_deg: " << position.latitude_deg << '\n';
×
817
    str << "    longitude_deg: " << position.longitude_deg << '\n';
×
818
    str << "    absolute_altitude_m: " << position.absolute_altitude_m << '\n';
×
819
    str << "    relative_altitude_m: " << position.relative_altitude_m << '\n';
×
820
    str << '}';
×
821
    return str;
×
822
}
823

824
bool operator==(const Telemetry::Heading& lhs, const Telemetry::Heading& rhs)
×
825
{
826
    return (
827
        (std::isnan(rhs.heading_deg) && std::isnan(lhs.heading_deg)) ||
×
828
        rhs.heading_deg == lhs.heading_deg);
×
829
}
830

831
std::ostream& operator<<(std::ostream& str, Telemetry::Heading const& heading)
×
832
{
833
    str << std::setprecision(15);
×
834
    str << "heading:" << '\n' << "{\n";
×
835
    str << "    heading_deg: " << heading.heading_deg << '\n';
×
836
    str << '}';
×
837
    return str;
×
838
}
839

840
bool operator==(const Telemetry::Quaternion& lhs, const Telemetry::Quaternion& rhs)
×
841
{
842
    return ((std::isnan(rhs.w) && std::isnan(lhs.w)) || rhs.w == lhs.w) &&
×
843
           ((std::isnan(rhs.x) && std::isnan(lhs.x)) || rhs.x == lhs.x) &&
×
844
           ((std::isnan(rhs.y) && std::isnan(lhs.y)) || rhs.y == lhs.y) &&
×
845
           ((std::isnan(rhs.z) && std::isnan(lhs.z)) || rhs.z == lhs.z) &&
×
846
           (rhs.timestamp_us == lhs.timestamp_us);
×
847
}
848

849
std::ostream& operator<<(std::ostream& str, Telemetry::Quaternion const& quaternion)
×
850
{
851
    str << std::setprecision(15);
×
852
    str << "quaternion:" << '\n' << "{\n";
×
853
    str << "    w: " << quaternion.w << '\n';
×
854
    str << "    x: " << quaternion.x << '\n';
×
855
    str << "    y: " << quaternion.y << '\n';
×
856
    str << "    z: " << quaternion.z << '\n';
×
857
    str << "    timestamp_us: " << quaternion.timestamp_us << '\n';
×
858
    str << '}';
×
859
    return str;
×
860
}
861

862
bool operator==(const Telemetry::EulerAngle& lhs, const Telemetry::EulerAngle& rhs)
×
863
{
864
    return ((std::isnan(rhs.roll_deg) && std::isnan(lhs.roll_deg)) ||
×
865
            rhs.roll_deg == lhs.roll_deg) &&
×
866
           ((std::isnan(rhs.pitch_deg) && std::isnan(lhs.pitch_deg)) ||
×
867
            rhs.pitch_deg == lhs.pitch_deg) &&
×
868
           ((std::isnan(rhs.yaw_deg) && std::isnan(lhs.yaw_deg)) || rhs.yaw_deg == lhs.yaw_deg) &&
×
869
           (rhs.timestamp_us == lhs.timestamp_us);
×
870
}
871

872
std::ostream& operator<<(std::ostream& str, Telemetry::EulerAngle const& euler_angle)
×
873
{
874
    str << std::setprecision(15);
×
875
    str << "euler_angle:" << '\n' << "{\n";
×
876
    str << "    roll_deg: " << euler_angle.roll_deg << '\n';
×
877
    str << "    pitch_deg: " << euler_angle.pitch_deg << '\n';
×
878
    str << "    yaw_deg: " << euler_angle.yaw_deg << '\n';
×
879
    str << "    timestamp_us: " << euler_angle.timestamp_us << '\n';
×
880
    str << '}';
×
881
    return str;
×
882
}
883

884
bool operator==(
×
885
    const Telemetry::AngularVelocityBody& lhs, const Telemetry::AngularVelocityBody& rhs)
886
{
887
    return ((std::isnan(rhs.roll_rad_s) && std::isnan(lhs.roll_rad_s)) ||
×
888
            rhs.roll_rad_s == lhs.roll_rad_s) &&
×
889
           ((std::isnan(rhs.pitch_rad_s) && std::isnan(lhs.pitch_rad_s)) ||
×
890
            rhs.pitch_rad_s == lhs.pitch_rad_s) &&
×
891
           ((std::isnan(rhs.yaw_rad_s) && std::isnan(lhs.yaw_rad_s)) ||
×
892
            rhs.yaw_rad_s == lhs.yaw_rad_s);
×
893
}
894

895
std::ostream&
896
operator<<(std::ostream& str, Telemetry::AngularVelocityBody const& angular_velocity_body)
×
897
{
898
    str << std::setprecision(15);
×
899
    str << "angular_velocity_body:" << '\n' << "{\n";
×
900
    str << "    roll_rad_s: " << angular_velocity_body.roll_rad_s << '\n';
×
901
    str << "    pitch_rad_s: " << angular_velocity_body.pitch_rad_s << '\n';
×
902
    str << "    yaw_rad_s: " << angular_velocity_body.yaw_rad_s << '\n';
×
903
    str << '}';
×
904
    return str;
×
905
}
906

907
bool operator==(const Telemetry::GpsInfo& lhs, const Telemetry::GpsInfo& rhs)
×
908
{
909
    return (rhs.num_satellites == lhs.num_satellites) && (rhs.fix_type == lhs.fix_type);
×
910
}
911

912
std::ostream& operator<<(std::ostream& str, Telemetry::GpsInfo const& gps_info)
×
913
{
914
    str << std::setprecision(15);
×
915
    str << "gps_info:" << '\n' << "{\n";
×
916
    str << "    num_satellites: " << gps_info.num_satellites << '\n';
×
917
    str << "    fix_type: " << gps_info.fix_type << '\n';
×
918
    str << '}';
×
919
    return str;
×
920
}
921

922
bool operator==(const Telemetry::RawGps& lhs, const Telemetry::RawGps& rhs)
×
923
{
924
    return (rhs.timestamp_us == lhs.timestamp_us) &&
×
925
           ((std::isnan(rhs.latitude_deg) && std::isnan(lhs.latitude_deg)) ||
×
926
            rhs.latitude_deg == lhs.latitude_deg) &&
×
927
           ((std::isnan(rhs.longitude_deg) && std::isnan(lhs.longitude_deg)) ||
×
928
            rhs.longitude_deg == lhs.longitude_deg) &&
×
929
           ((std::isnan(rhs.absolute_altitude_m) && std::isnan(lhs.absolute_altitude_m)) ||
×
930
            rhs.absolute_altitude_m == lhs.absolute_altitude_m) &&
×
931
           ((std::isnan(rhs.hdop) && std::isnan(lhs.hdop)) || rhs.hdop == lhs.hdop) &&
×
932
           ((std::isnan(rhs.vdop) && std::isnan(lhs.vdop)) || rhs.vdop == lhs.vdop) &&
×
933
           ((std::isnan(rhs.velocity_m_s) && std::isnan(lhs.velocity_m_s)) ||
×
934
            rhs.velocity_m_s == lhs.velocity_m_s) &&
×
935
           ((std::isnan(rhs.cog_deg) && std::isnan(lhs.cog_deg)) || rhs.cog_deg == lhs.cog_deg) &&
×
936
           ((std::isnan(rhs.altitude_ellipsoid_m) && std::isnan(lhs.altitude_ellipsoid_m)) ||
×
937
            rhs.altitude_ellipsoid_m == lhs.altitude_ellipsoid_m) &&
×
938
           ((std::isnan(rhs.horizontal_uncertainty_m) &&
×
939
             std::isnan(lhs.horizontal_uncertainty_m)) ||
×
940
            rhs.horizontal_uncertainty_m == lhs.horizontal_uncertainty_m) &&
×
941
           ((std::isnan(rhs.vertical_uncertainty_m) && std::isnan(lhs.vertical_uncertainty_m)) ||
×
942
            rhs.vertical_uncertainty_m == lhs.vertical_uncertainty_m) &&
×
943
           ((std::isnan(rhs.velocity_uncertainty_m_s) &&
×
944
             std::isnan(lhs.velocity_uncertainty_m_s)) ||
×
945
            rhs.velocity_uncertainty_m_s == lhs.velocity_uncertainty_m_s) &&
×
946
           ((std::isnan(rhs.heading_uncertainty_deg) && std::isnan(lhs.heading_uncertainty_deg)) ||
×
947
            rhs.heading_uncertainty_deg == lhs.heading_uncertainty_deg) &&
×
948
           ((std::isnan(rhs.yaw_deg) && std::isnan(lhs.yaw_deg)) || rhs.yaw_deg == lhs.yaw_deg);
×
949
}
950

951
std::ostream& operator<<(std::ostream& str, Telemetry::RawGps const& raw_gps)
×
952
{
953
    str << std::setprecision(15);
×
954
    str << "raw_gps:" << '\n' << "{\n";
×
955
    str << "    timestamp_us: " << raw_gps.timestamp_us << '\n';
×
956
    str << "    latitude_deg: " << raw_gps.latitude_deg << '\n';
×
957
    str << "    longitude_deg: " << raw_gps.longitude_deg << '\n';
×
958
    str << "    absolute_altitude_m: " << raw_gps.absolute_altitude_m << '\n';
×
959
    str << "    hdop: " << raw_gps.hdop << '\n';
×
960
    str << "    vdop: " << raw_gps.vdop << '\n';
×
961
    str << "    velocity_m_s: " << raw_gps.velocity_m_s << '\n';
×
962
    str << "    cog_deg: " << raw_gps.cog_deg << '\n';
×
963
    str << "    altitude_ellipsoid_m: " << raw_gps.altitude_ellipsoid_m << '\n';
×
964
    str << "    horizontal_uncertainty_m: " << raw_gps.horizontal_uncertainty_m << '\n';
×
965
    str << "    vertical_uncertainty_m: " << raw_gps.vertical_uncertainty_m << '\n';
×
966
    str << "    velocity_uncertainty_m_s: " << raw_gps.velocity_uncertainty_m_s << '\n';
×
967
    str << "    heading_uncertainty_deg: " << raw_gps.heading_uncertainty_deg << '\n';
×
968
    str << "    yaw_deg: " << raw_gps.yaw_deg << '\n';
×
969
    str << '}';
×
970
    return str;
×
971
}
972

973
bool operator==(const Telemetry::Battery& lhs, const Telemetry::Battery& rhs)
×
974
{
975
    return (rhs.id == lhs.id) &&
×
976
           ((std::isnan(rhs.temperature_degc) && std::isnan(lhs.temperature_degc)) ||
×
977
            rhs.temperature_degc == lhs.temperature_degc) &&
×
978
           ((std::isnan(rhs.voltage_v) && std::isnan(lhs.voltage_v)) ||
×
979
            rhs.voltage_v == lhs.voltage_v) &&
×
980
           ((std::isnan(rhs.current_battery_a) && std::isnan(lhs.current_battery_a)) ||
×
981
            rhs.current_battery_a == lhs.current_battery_a) &&
×
982
           ((std::isnan(rhs.capacity_consumed_ah) && std::isnan(lhs.capacity_consumed_ah)) ||
×
983
            rhs.capacity_consumed_ah == lhs.capacity_consumed_ah) &&
×
984
           ((std::isnan(rhs.remaining_percent) && std::isnan(lhs.remaining_percent)) ||
×
NEW
985
            rhs.remaining_percent == lhs.remaining_percent) &&
×
NEW
986
           ((std::isnan(rhs.time_remaining_s) && std::isnan(lhs.time_remaining_s)) ||
×
NEW
987
            rhs.time_remaining_s == lhs.time_remaining_s) &&
×
NEW
988
           (rhs.battery_function == lhs.battery_function);
×
989
}
990

991
std::ostream& operator<<(std::ostream& str, Telemetry::Battery const& battery)
×
992
{
993
    str << std::setprecision(15);
×
994
    str << "battery:" << '\n' << "{\n";
×
995
    str << "    id: " << battery.id << '\n';
×
996
    str << "    temperature_degc: " << battery.temperature_degc << '\n';
×
997
    str << "    voltage_v: " << battery.voltage_v << '\n';
×
998
    str << "    current_battery_a: " << battery.current_battery_a << '\n';
×
999
    str << "    capacity_consumed_ah: " << battery.capacity_consumed_ah << '\n';
×
1000
    str << "    remaining_percent: " << battery.remaining_percent << '\n';
×
NEW
1001
    str << "    time_remaining_s: " << battery.time_remaining_s << '\n';
×
NEW
1002
    str << "    battery_function: " << battery.battery_function << '\n';
×
1003
    str << '}';
×
1004
    return str;
×
1005
}
1006

1007
bool operator==(const Telemetry::Health& lhs, const Telemetry::Health& rhs)
×
1008
{
1009
    return (rhs.is_gyrometer_calibration_ok == lhs.is_gyrometer_calibration_ok) &&
×
1010
           (rhs.is_accelerometer_calibration_ok == lhs.is_accelerometer_calibration_ok) &&
×
1011
           (rhs.is_magnetometer_calibration_ok == lhs.is_magnetometer_calibration_ok) &&
×
1012
           (rhs.is_local_position_ok == lhs.is_local_position_ok) &&
×
1013
           (rhs.is_global_position_ok == lhs.is_global_position_ok) &&
×
1014
           (rhs.is_home_position_ok == lhs.is_home_position_ok) &&
×
1015
           (rhs.is_armable == lhs.is_armable);
×
1016
}
1017

1018
std::ostream& operator<<(std::ostream& str, Telemetry::Health const& health)
×
1019
{
1020
    str << std::setprecision(15);
×
1021
    str << "health:" << '\n' << "{\n";
×
1022
    str << "    is_gyrometer_calibration_ok: " << health.is_gyrometer_calibration_ok << '\n';
×
1023
    str << "    is_accelerometer_calibration_ok: " << health.is_accelerometer_calibration_ok
×
1024
        << '\n';
×
1025
    str << "    is_magnetometer_calibration_ok: " << health.is_magnetometer_calibration_ok << '\n';
×
1026
    str << "    is_local_position_ok: " << health.is_local_position_ok << '\n';
×
1027
    str << "    is_global_position_ok: " << health.is_global_position_ok << '\n';
×
1028
    str << "    is_home_position_ok: " << health.is_home_position_ok << '\n';
×
1029
    str << "    is_armable: " << health.is_armable << '\n';
×
1030
    str << '}';
×
1031
    return str;
×
1032
}
1033

1034
bool operator==(const Telemetry::RcStatus& lhs, const Telemetry::RcStatus& rhs)
×
1035
{
1036
    return (rhs.was_available_once == lhs.was_available_once) &&
×
1037
           (rhs.is_available == lhs.is_available) &&
×
1038
           ((std::isnan(rhs.signal_strength_percent) && std::isnan(lhs.signal_strength_percent)) ||
×
1039
            rhs.signal_strength_percent == lhs.signal_strength_percent);
×
1040
}
1041

1042
std::ostream& operator<<(std::ostream& str, Telemetry::RcStatus const& rc_status)
×
1043
{
1044
    str << std::setprecision(15);
×
1045
    str << "rc_status:" << '\n' << "{\n";
×
1046
    str << "    was_available_once: " << rc_status.was_available_once << '\n';
×
1047
    str << "    is_available: " << rc_status.is_available << '\n';
×
1048
    str << "    signal_strength_percent: " << rc_status.signal_strength_percent << '\n';
×
1049
    str << '}';
×
1050
    return str;
×
1051
}
1052

1053
bool operator==(const Telemetry::StatusText& lhs, const Telemetry::StatusText& rhs)
×
1054
{
1055
    return (rhs.type == lhs.type) && (rhs.text == lhs.text);
×
1056
}
1057

1058
std::ostream& operator<<(std::ostream& str, Telemetry::StatusText const& status_text)
×
1059
{
1060
    str << std::setprecision(15);
×
1061
    str << "status_text:" << '\n' << "{\n";
×
1062
    str << "    type: " << status_text.type << '\n';
×
1063
    str << "    text: " << status_text.text << '\n';
×
1064
    str << '}';
×
1065
    return str;
×
1066
}
1067

1068
bool operator==(
×
1069
    const Telemetry::ActuatorControlTarget& lhs, const Telemetry::ActuatorControlTarget& rhs)
1070
{
1071
    return (rhs.group == lhs.group) && (rhs.controls == lhs.controls);
×
1072
}
1073

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

1091
bool operator==(
×
1092
    const Telemetry::ActuatorOutputStatus& lhs, const Telemetry::ActuatorOutputStatus& rhs)
1093
{
1094
    return (rhs.active == lhs.active) && (rhs.actuator == lhs.actuator);
×
1095
}
1096

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

1114
bool operator==(const Telemetry::Covariance& lhs, const Telemetry::Covariance& rhs)
×
1115
{
1116
    return (rhs.covariance_matrix == lhs.covariance_matrix);
×
1117
}
1118

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

1133
bool operator==(const Telemetry::VelocityBody& lhs, const Telemetry::VelocityBody& rhs)
×
1134
{
1135
    return ((std::isnan(rhs.x_m_s) && std::isnan(lhs.x_m_s)) || rhs.x_m_s == lhs.x_m_s) &&
×
1136
           ((std::isnan(rhs.y_m_s) && std::isnan(lhs.y_m_s)) || rhs.y_m_s == lhs.y_m_s) &&
×
1137
           ((std::isnan(rhs.z_m_s) && std::isnan(lhs.z_m_s)) || rhs.z_m_s == lhs.z_m_s);
×
1138
}
1139

1140
std::ostream& operator<<(std::ostream& str, Telemetry::VelocityBody const& velocity_body)
×
1141
{
1142
    str << std::setprecision(15);
×
1143
    str << "velocity_body:" << '\n' << "{\n";
×
1144
    str << "    x_m_s: " << velocity_body.x_m_s << '\n';
×
1145
    str << "    y_m_s: " << velocity_body.y_m_s << '\n';
×
1146
    str << "    z_m_s: " << velocity_body.z_m_s << '\n';
×
1147
    str << '}';
×
1148
    return str;
×
1149
}
1150

1151
bool operator==(const Telemetry::PositionBody& lhs, const Telemetry::PositionBody& rhs)
×
1152
{
1153
    return ((std::isnan(rhs.x_m) && std::isnan(lhs.x_m)) || rhs.x_m == lhs.x_m) &&
×
1154
           ((std::isnan(rhs.y_m) && std::isnan(lhs.y_m)) || rhs.y_m == lhs.y_m) &&
×
1155
           ((std::isnan(rhs.z_m) && std::isnan(lhs.z_m)) || rhs.z_m == lhs.z_m);
×
1156
}
1157

1158
std::ostream& operator<<(std::ostream& str, Telemetry::PositionBody const& position_body)
×
1159
{
1160
    str << std::setprecision(15);
×
1161
    str << "position_body:" << '\n' << "{\n";
×
1162
    str << "    x_m: " << position_body.x_m << '\n';
×
1163
    str << "    y_m: " << position_body.y_m << '\n';
×
1164
    str << "    z_m: " << position_body.z_m << '\n';
×
1165
    str << '}';
×
1166
    return str;
×
1167
}
1168

1169
std::ostream& operator<<(std::ostream& str, Telemetry::Odometry::MavFrame const& mav_frame)
×
1170
{
1171
    switch (mav_frame) {
×
1172
        case Telemetry::Odometry::MavFrame::Undef:
×
1173
            return str << "Undef";
×
1174
        case Telemetry::Odometry::MavFrame::BodyNed:
×
1175
            return str << "Body Ned";
×
1176
        case Telemetry::Odometry::MavFrame::VisionNed:
×
1177
            return str << "Vision Ned";
×
1178
        case Telemetry::Odometry::MavFrame::EstimNed:
×
1179
            return str << "Estim Ned";
×
1180
        default:
×
1181
            return str << "Unknown";
×
1182
    }
1183
}
1184
bool operator==(const Telemetry::Odometry& lhs, const Telemetry::Odometry& rhs)
×
1185
{
1186
    return (rhs.time_usec == lhs.time_usec) && (rhs.frame_id == lhs.frame_id) &&
×
1187
           (rhs.child_frame_id == lhs.child_frame_id) && (rhs.position_body == lhs.position_body) &&
×
1188
           (rhs.q == lhs.q) && (rhs.velocity_body == lhs.velocity_body) &&
×
1189
           (rhs.angular_velocity_body == lhs.angular_velocity_body) &&
×
1190
           (rhs.pose_covariance == lhs.pose_covariance) &&
×
1191
           (rhs.velocity_covariance == lhs.velocity_covariance);
×
1192
}
1193

1194
std::ostream& operator<<(std::ostream& str, Telemetry::Odometry const& odometry)
×
1195
{
1196
    str << std::setprecision(15);
×
1197
    str << "odometry:" << '\n' << "{\n";
×
1198
    str << "    time_usec: " << odometry.time_usec << '\n';
×
1199
    str << "    frame_id: " << odometry.frame_id << '\n';
×
1200
    str << "    child_frame_id: " << odometry.child_frame_id << '\n';
×
1201
    str << "    position_body: " << odometry.position_body << '\n';
×
1202
    str << "    q: " << odometry.q << '\n';
×
1203
    str << "    velocity_body: " << odometry.velocity_body << '\n';
×
1204
    str << "    angular_velocity_body: " << odometry.angular_velocity_body << '\n';
×
1205
    str << "    pose_covariance: " << odometry.pose_covariance << '\n';
×
1206
    str << "    velocity_covariance: " << odometry.velocity_covariance << '\n';
×
1207
    str << '}';
×
1208
    return str;
×
1209
}
1210

1211
bool operator==(const Telemetry::DistanceSensor& lhs, const Telemetry::DistanceSensor& rhs)
×
1212
{
1213
    return ((std::isnan(rhs.minimum_distance_m) && std::isnan(lhs.minimum_distance_m)) ||
×
1214
            rhs.minimum_distance_m == lhs.minimum_distance_m) &&
×
1215
           ((std::isnan(rhs.maximum_distance_m) && std::isnan(lhs.maximum_distance_m)) ||
×
1216
            rhs.maximum_distance_m == lhs.maximum_distance_m) &&
×
1217
           ((std::isnan(rhs.current_distance_m) && std::isnan(lhs.current_distance_m)) ||
×
1218
            rhs.current_distance_m == lhs.current_distance_m) &&
×
1219
           (rhs.orientation == lhs.orientation);
×
1220
}
1221

1222
std::ostream& operator<<(std::ostream& str, Telemetry::DistanceSensor const& distance_sensor)
×
1223
{
1224
    str << std::setprecision(15);
×
1225
    str << "distance_sensor:" << '\n' << "{\n";
×
1226
    str << "    minimum_distance_m: " << distance_sensor.minimum_distance_m << '\n';
×
1227
    str << "    maximum_distance_m: " << distance_sensor.maximum_distance_m << '\n';
×
1228
    str << "    current_distance_m: " << distance_sensor.current_distance_m << '\n';
×
1229
    str << "    orientation: " << distance_sensor.orientation << '\n';
×
1230
    str << '}';
×
1231
    return str;
×
1232
}
1233

1234
bool operator==(const Telemetry::ScaledPressure& lhs, const Telemetry::ScaledPressure& rhs)
×
1235
{
1236
    return (rhs.timestamp_us == lhs.timestamp_us) &&
×
1237
           ((std::isnan(rhs.absolute_pressure_hpa) && std::isnan(lhs.absolute_pressure_hpa)) ||
×
1238
            rhs.absolute_pressure_hpa == lhs.absolute_pressure_hpa) &&
×
1239
           ((std::isnan(rhs.differential_pressure_hpa) &&
×
1240
             std::isnan(lhs.differential_pressure_hpa)) ||
×
1241
            rhs.differential_pressure_hpa == lhs.differential_pressure_hpa) &&
×
1242
           ((std::isnan(rhs.temperature_deg) && std::isnan(lhs.temperature_deg)) ||
×
1243
            rhs.temperature_deg == lhs.temperature_deg) &&
×
1244
           ((std::isnan(rhs.differential_pressure_temperature_deg) &&
×
1245
             std::isnan(lhs.differential_pressure_temperature_deg)) ||
×
1246
            rhs.differential_pressure_temperature_deg == lhs.differential_pressure_temperature_deg);
×
1247
}
1248

1249
std::ostream& operator<<(std::ostream& str, Telemetry::ScaledPressure const& scaled_pressure)
×
1250
{
1251
    str << std::setprecision(15);
×
1252
    str << "scaled_pressure:" << '\n' << "{\n";
×
1253
    str << "    timestamp_us: " << scaled_pressure.timestamp_us << '\n';
×
1254
    str << "    absolute_pressure_hpa: " << scaled_pressure.absolute_pressure_hpa << '\n';
×
1255
    str << "    differential_pressure_hpa: " << scaled_pressure.differential_pressure_hpa << '\n';
×
1256
    str << "    temperature_deg: " << scaled_pressure.temperature_deg << '\n';
×
1257
    str << "    differential_pressure_temperature_deg: "
×
1258
        << scaled_pressure.differential_pressure_temperature_deg << '\n';
×
1259
    str << '}';
×
1260
    return str;
×
1261
}
1262

1263
bool operator==(const Telemetry::PositionNed& lhs, const Telemetry::PositionNed& rhs)
×
1264
{
1265
    return ((std::isnan(rhs.north_m) && std::isnan(lhs.north_m)) || rhs.north_m == lhs.north_m) &&
×
1266
           ((std::isnan(rhs.east_m) && std::isnan(lhs.east_m)) || rhs.east_m == lhs.east_m) &&
×
1267
           ((std::isnan(rhs.down_m) && std::isnan(lhs.down_m)) || rhs.down_m == lhs.down_m);
×
1268
}
1269

1270
std::ostream& operator<<(std::ostream& str, Telemetry::PositionNed const& position_ned)
×
1271
{
1272
    str << std::setprecision(15);
×
1273
    str << "position_ned:" << '\n' << "{\n";
×
1274
    str << "    north_m: " << position_ned.north_m << '\n';
×
1275
    str << "    east_m: " << position_ned.east_m << '\n';
×
1276
    str << "    down_m: " << position_ned.down_m << '\n';
×
1277
    str << '}';
×
1278
    return str;
×
1279
}
1280

1281
bool operator==(const Telemetry::VelocityNed& lhs, const Telemetry::VelocityNed& rhs)
×
1282
{
1283
    return ((std::isnan(rhs.north_m_s) && std::isnan(lhs.north_m_s)) ||
×
1284
            rhs.north_m_s == lhs.north_m_s) &&
×
1285
           ((std::isnan(rhs.east_m_s) && std::isnan(lhs.east_m_s)) ||
×
1286
            rhs.east_m_s == lhs.east_m_s) &&
×
1287
           ((std::isnan(rhs.down_m_s) && std::isnan(lhs.down_m_s)) || rhs.down_m_s == lhs.down_m_s);
×
1288
}
1289

1290
std::ostream& operator<<(std::ostream& str, Telemetry::VelocityNed const& velocity_ned)
×
1291
{
1292
    str << std::setprecision(15);
×
1293
    str << "velocity_ned:" << '\n' << "{\n";
×
1294
    str << "    north_m_s: " << velocity_ned.north_m_s << '\n';
×
1295
    str << "    east_m_s: " << velocity_ned.east_m_s << '\n';
×
1296
    str << "    down_m_s: " << velocity_ned.down_m_s << '\n';
×
1297
    str << '}';
×
1298
    return str;
×
1299
}
1300

1301
bool operator==(
×
1302
    const Telemetry::PositionVelocityNed& lhs, const Telemetry::PositionVelocityNed& rhs)
1303
{
1304
    return (rhs.position == lhs.position) && (rhs.velocity == lhs.velocity);
×
1305
}
1306

1307
std::ostream&
1308
operator<<(std::ostream& str, Telemetry::PositionVelocityNed const& position_velocity_ned)
×
1309
{
1310
    str << std::setprecision(15);
×
1311
    str << "position_velocity_ned:" << '\n' << "{\n";
×
1312
    str << "    position: " << position_velocity_ned.position << '\n';
×
1313
    str << "    velocity: " << position_velocity_ned.velocity << '\n';
×
1314
    str << '}';
×
1315
    return str;
×
1316
}
1317

1318
bool operator==(const Telemetry::GroundTruth& lhs, const Telemetry::GroundTruth& rhs)
×
1319
{
1320
    return ((std::isnan(rhs.latitude_deg) && std::isnan(lhs.latitude_deg)) ||
×
1321
            rhs.latitude_deg == lhs.latitude_deg) &&
×
1322
           ((std::isnan(rhs.longitude_deg) && std::isnan(lhs.longitude_deg)) ||
×
1323
            rhs.longitude_deg == lhs.longitude_deg) &&
×
1324
           ((std::isnan(rhs.absolute_altitude_m) && std::isnan(lhs.absolute_altitude_m)) ||
×
1325
            rhs.absolute_altitude_m == lhs.absolute_altitude_m);
×
1326
}
1327

1328
std::ostream& operator<<(std::ostream& str, Telemetry::GroundTruth const& ground_truth)
×
1329
{
1330
    str << std::setprecision(15);
×
1331
    str << "ground_truth:" << '\n' << "{\n";
×
1332
    str << "    latitude_deg: " << ground_truth.latitude_deg << '\n';
×
1333
    str << "    longitude_deg: " << ground_truth.longitude_deg << '\n';
×
1334
    str << "    absolute_altitude_m: " << ground_truth.absolute_altitude_m << '\n';
×
1335
    str << '}';
×
1336
    return str;
×
1337
}
1338

1339
bool operator==(const Telemetry::FixedwingMetrics& lhs, const Telemetry::FixedwingMetrics& rhs)
×
1340
{
1341
    return ((std::isnan(rhs.airspeed_m_s) && std::isnan(lhs.airspeed_m_s)) ||
×
1342
            rhs.airspeed_m_s == lhs.airspeed_m_s) &&
×
1343
           ((std::isnan(rhs.throttle_percentage) && std::isnan(lhs.throttle_percentage)) ||
×
1344
            rhs.throttle_percentage == lhs.throttle_percentage) &&
×
1345
           ((std::isnan(rhs.climb_rate_m_s) && std::isnan(lhs.climb_rate_m_s)) ||
×
1346
            rhs.climb_rate_m_s == lhs.climb_rate_m_s) &&
×
1347
           ((std::isnan(rhs.groundspeed_m_s) && std::isnan(lhs.groundspeed_m_s)) ||
×
1348
            rhs.groundspeed_m_s == lhs.groundspeed_m_s) &&
×
1349
           ((std::isnan(rhs.heading_deg) && std::isnan(lhs.heading_deg)) ||
×
1350
            rhs.heading_deg == lhs.heading_deg) &&
×
1351
           ((std::isnan(rhs.absolute_altitude_m) && std::isnan(lhs.absolute_altitude_m)) ||
×
1352
            rhs.absolute_altitude_m == lhs.absolute_altitude_m);
×
1353
}
1354

1355
std::ostream& operator<<(std::ostream& str, Telemetry::FixedwingMetrics const& fixedwing_metrics)
×
1356
{
1357
    str << std::setprecision(15);
×
1358
    str << "fixedwing_metrics:" << '\n' << "{\n";
×
1359
    str << "    airspeed_m_s: " << fixedwing_metrics.airspeed_m_s << '\n';
×
1360
    str << "    throttle_percentage: " << fixedwing_metrics.throttle_percentage << '\n';
×
1361
    str << "    climb_rate_m_s: " << fixedwing_metrics.climb_rate_m_s << '\n';
×
1362
    str << "    groundspeed_m_s: " << fixedwing_metrics.groundspeed_m_s << '\n';
×
1363
    str << "    heading_deg: " << fixedwing_metrics.heading_deg << '\n';
×
1364
    str << "    absolute_altitude_m: " << fixedwing_metrics.absolute_altitude_m << '\n';
×
1365
    str << '}';
×
1366
    return str;
×
1367
}
1368

1369
bool operator==(const Telemetry::AccelerationFrd& lhs, const Telemetry::AccelerationFrd& rhs)
×
1370
{
1371
    return ((std::isnan(rhs.forward_m_s2) && std::isnan(lhs.forward_m_s2)) ||
×
1372
            rhs.forward_m_s2 == lhs.forward_m_s2) &&
×
1373
           ((std::isnan(rhs.right_m_s2) && std::isnan(lhs.right_m_s2)) ||
×
1374
            rhs.right_m_s2 == lhs.right_m_s2) &&
×
1375
           ((std::isnan(rhs.down_m_s2) && std::isnan(lhs.down_m_s2)) ||
×
1376
            rhs.down_m_s2 == lhs.down_m_s2);
×
1377
}
1378

1379
std::ostream& operator<<(std::ostream& str, Telemetry::AccelerationFrd const& acceleration_frd)
×
1380
{
1381
    str << std::setprecision(15);
×
1382
    str << "acceleration_frd:" << '\n' << "{\n";
×
1383
    str << "    forward_m_s2: " << acceleration_frd.forward_m_s2 << '\n';
×
1384
    str << "    right_m_s2: " << acceleration_frd.right_m_s2 << '\n';
×
1385
    str << "    down_m_s2: " << acceleration_frd.down_m_s2 << '\n';
×
1386
    str << '}';
×
1387
    return str;
×
1388
}
1389

1390
bool operator==(const Telemetry::AngularVelocityFrd& lhs, const Telemetry::AngularVelocityFrd& rhs)
×
1391
{
1392
    return ((std::isnan(rhs.forward_rad_s) && std::isnan(lhs.forward_rad_s)) ||
×
1393
            rhs.forward_rad_s == lhs.forward_rad_s) &&
×
1394
           ((std::isnan(rhs.right_rad_s) && std::isnan(lhs.right_rad_s)) ||
×
1395
            rhs.right_rad_s == lhs.right_rad_s) &&
×
1396
           ((std::isnan(rhs.down_rad_s) && std::isnan(lhs.down_rad_s)) ||
×
1397
            rhs.down_rad_s == lhs.down_rad_s);
×
1398
}
1399

1400
std::ostream&
1401
operator<<(std::ostream& str, Telemetry::AngularVelocityFrd const& angular_velocity_frd)
×
1402
{
1403
    str << std::setprecision(15);
×
1404
    str << "angular_velocity_frd:" << '\n' << "{\n";
×
1405
    str << "    forward_rad_s: " << angular_velocity_frd.forward_rad_s << '\n';
×
1406
    str << "    right_rad_s: " << angular_velocity_frd.right_rad_s << '\n';
×
1407
    str << "    down_rad_s: " << angular_velocity_frd.down_rad_s << '\n';
×
1408
    str << '}';
×
1409
    return str;
×
1410
}
1411

1412
bool operator==(const Telemetry::MagneticFieldFrd& lhs, const Telemetry::MagneticFieldFrd& rhs)
×
1413
{
1414
    return ((std::isnan(rhs.forward_gauss) && std::isnan(lhs.forward_gauss)) ||
×
1415
            rhs.forward_gauss == lhs.forward_gauss) &&
×
1416
           ((std::isnan(rhs.right_gauss) && std::isnan(lhs.right_gauss)) ||
×
1417
            rhs.right_gauss == lhs.right_gauss) &&
×
1418
           ((std::isnan(rhs.down_gauss) && std::isnan(lhs.down_gauss)) ||
×
1419
            rhs.down_gauss == lhs.down_gauss);
×
1420
}
1421

1422
std::ostream& operator<<(std::ostream& str, Telemetry::MagneticFieldFrd const& magnetic_field_frd)
×
1423
{
1424
    str << std::setprecision(15);
×
1425
    str << "magnetic_field_frd:" << '\n' << "{\n";
×
1426
    str << "    forward_gauss: " << magnetic_field_frd.forward_gauss << '\n';
×
1427
    str << "    right_gauss: " << magnetic_field_frd.right_gauss << '\n';
×
1428
    str << "    down_gauss: " << magnetic_field_frd.down_gauss << '\n';
×
1429
    str << '}';
×
1430
    return str;
×
1431
}
1432

1433
bool operator==(const Telemetry::Imu& lhs, const Telemetry::Imu& rhs)
×
1434
{
1435
    return (rhs.acceleration_frd == lhs.acceleration_frd) &&
×
1436
           (rhs.angular_velocity_frd == lhs.angular_velocity_frd) &&
×
1437
           (rhs.magnetic_field_frd == lhs.magnetic_field_frd) &&
×
1438
           ((std::isnan(rhs.temperature_degc) && std::isnan(lhs.temperature_degc)) ||
×
1439
            rhs.temperature_degc == lhs.temperature_degc) &&
×
1440
           (rhs.timestamp_us == lhs.timestamp_us);
×
1441
}
1442

1443
std::ostream& operator<<(std::ostream& str, Telemetry::Imu const& imu)
×
1444
{
1445
    str << std::setprecision(15);
×
1446
    str << "imu:" << '\n' << "{\n";
×
1447
    str << "    acceleration_frd: " << imu.acceleration_frd << '\n';
×
1448
    str << "    angular_velocity_frd: " << imu.angular_velocity_frd << '\n';
×
1449
    str << "    magnetic_field_frd: " << imu.magnetic_field_frd << '\n';
×
1450
    str << "    temperature_degc: " << imu.temperature_degc << '\n';
×
1451
    str << "    timestamp_us: " << imu.timestamp_us << '\n';
×
1452
    str << '}';
×
1453
    return str;
×
1454
}
1455

1456
bool operator==(const Telemetry::GpsGlobalOrigin& lhs, const Telemetry::GpsGlobalOrigin& rhs)
×
1457
{
1458
    return ((std::isnan(rhs.latitude_deg) && std::isnan(lhs.latitude_deg)) ||
×
1459
            rhs.latitude_deg == lhs.latitude_deg) &&
×
1460
           ((std::isnan(rhs.longitude_deg) && std::isnan(lhs.longitude_deg)) ||
×
1461
            rhs.longitude_deg == lhs.longitude_deg) &&
×
1462
           ((std::isnan(rhs.altitude_m) && std::isnan(lhs.altitude_m)) ||
×
1463
            rhs.altitude_m == lhs.altitude_m);
×
1464
}
1465

1466
std::ostream& operator<<(std::ostream& str, Telemetry::GpsGlobalOrigin const& gps_global_origin)
×
1467
{
1468
    str << std::setprecision(15);
×
1469
    str << "gps_global_origin:" << '\n' << "{\n";
×
1470
    str << "    latitude_deg: " << gps_global_origin.latitude_deg << '\n';
×
1471
    str << "    longitude_deg: " << gps_global_origin.longitude_deg << '\n';
×
1472
    str << "    altitude_m: " << gps_global_origin.altitude_m << '\n';
×
1473
    str << '}';
×
1474
    return str;
×
1475
}
1476

1477
bool operator==(const Telemetry::Altitude& lhs, const Telemetry::Altitude& rhs)
×
1478
{
1479
    return ((std::isnan(rhs.altitude_monotonic_m) && std::isnan(lhs.altitude_monotonic_m)) ||
×
1480
            rhs.altitude_monotonic_m == lhs.altitude_monotonic_m) &&
×
1481
           ((std::isnan(rhs.altitude_amsl_m) && std::isnan(lhs.altitude_amsl_m)) ||
×
1482
            rhs.altitude_amsl_m == lhs.altitude_amsl_m) &&
×
1483
           ((std::isnan(rhs.altitude_local_m) && std::isnan(lhs.altitude_local_m)) ||
×
1484
            rhs.altitude_local_m == lhs.altitude_local_m) &&
×
1485
           ((std::isnan(rhs.altitude_relative_m) && std::isnan(lhs.altitude_relative_m)) ||
×
1486
            rhs.altitude_relative_m == lhs.altitude_relative_m) &&
×
1487
           ((std::isnan(rhs.altitude_terrain_m) && std::isnan(lhs.altitude_terrain_m)) ||
×
1488
            rhs.altitude_terrain_m == lhs.altitude_terrain_m) &&
×
1489
           ((std::isnan(rhs.bottom_clearance_m) && std::isnan(lhs.bottom_clearance_m)) ||
×
1490
            rhs.bottom_clearance_m == lhs.bottom_clearance_m);
×
1491
}
1492

1493
std::ostream& operator<<(std::ostream& str, Telemetry::Altitude const& altitude)
×
1494
{
1495
    str << std::setprecision(15);
×
1496
    str << "altitude:" << '\n' << "{\n";
×
1497
    str << "    altitude_monotonic_m: " << altitude.altitude_monotonic_m << '\n';
×
1498
    str << "    altitude_amsl_m: " << altitude.altitude_amsl_m << '\n';
×
1499
    str << "    altitude_local_m: " << altitude.altitude_local_m << '\n';
×
1500
    str << "    altitude_relative_m: " << altitude.altitude_relative_m << '\n';
×
1501
    str << "    altitude_terrain_m: " << altitude.altitude_terrain_m << '\n';
×
1502
    str << "    bottom_clearance_m: " << altitude.bottom_clearance_m << '\n';
×
1503
    str << '}';
×
1504
    return str;
×
1505
}
1506

1507
bool operator==(const Telemetry::Wind& lhs, const Telemetry::Wind& rhs)
×
1508
{
1509
    return ((std::isnan(rhs.wind_x_ned_m_s) && std::isnan(lhs.wind_x_ned_m_s)) ||
×
1510
            rhs.wind_x_ned_m_s == lhs.wind_x_ned_m_s) &&
×
1511
           ((std::isnan(rhs.wind_y_ned_m_s) && std::isnan(lhs.wind_y_ned_m_s)) ||
×
1512
            rhs.wind_y_ned_m_s == lhs.wind_y_ned_m_s) &&
×
1513
           ((std::isnan(rhs.wind_z_ned_m_s) && std::isnan(lhs.wind_z_ned_m_s)) ||
×
1514
            rhs.wind_z_ned_m_s == lhs.wind_z_ned_m_s) &&
×
1515
           ((std::isnan(rhs.horizontal_variability_stddev_m_s) &&
×
1516
             std::isnan(lhs.horizontal_variability_stddev_m_s)) ||
×
1517
            rhs.horizontal_variability_stddev_m_s == lhs.horizontal_variability_stddev_m_s) &&
×
1518
           ((std::isnan(rhs.vertical_variability_stddev_m_s) &&
×
1519
             std::isnan(lhs.vertical_variability_stddev_m_s)) ||
×
1520
            rhs.vertical_variability_stddev_m_s == lhs.vertical_variability_stddev_m_s) &&
×
1521
           ((std::isnan(rhs.wind_altitude_msl_m) && std::isnan(lhs.wind_altitude_msl_m)) ||
×
1522
            rhs.wind_altitude_msl_m == lhs.wind_altitude_msl_m) &&
×
1523
           ((std::isnan(rhs.horizontal_wind_speed_accuracy_m_s) &&
×
1524
             std::isnan(lhs.horizontal_wind_speed_accuracy_m_s)) ||
×
1525
            rhs.horizontal_wind_speed_accuracy_m_s == lhs.horizontal_wind_speed_accuracy_m_s) &&
×
1526
           ((std::isnan(rhs.vertical_wind_speed_accuracy_m_s) &&
×
1527
             std::isnan(lhs.vertical_wind_speed_accuracy_m_s)) ||
×
1528
            rhs.vertical_wind_speed_accuracy_m_s == lhs.vertical_wind_speed_accuracy_m_s);
×
1529
}
1530

1531
std::ostream& operator<<(std::ostream& str, Telemetry::Wind const& wind)
×
1532
{
1533
    str << std::setprecision(15);
×
1534
    str << "wind:" << '\n' << "{\n";
×
1535
    str << "    wind_x_ned_m_s: " << wind.wind_x_ned_m_s << '\n';
×
1536
    str << "    wind_y_ned_m_s: " << wind.wind_y_ned_m_s << '\n';
×
1537
    str << "    wind_z_ned_m_s: " << wind.wind_z_ned_m_s << '\n';
×
1538
    str << "    horizontal_variability_stddev_m_s: " << wind.horizontal_variability_stddev_m_s
×
1539
        << '\n';
×
1540
    str << "    vertical_variability_stddev_m_s: " << wind.vertical_variability_stddev_m_s << '\n';
×
1541
    str << "    wind_altitude_msl_m: " << wind.wind_altitude_msl_m << '\n';
×
1542
    str << "    horizontal_wind_speed_accuracy_m_s: " << wind.horizontal_wind_speed_accuracy_m_s
×
1543
        << '\n';
×
1544
    str << "    vertical_wind_speed_accuracy_m_s: " << wind.vertical_wind_speed_accuracy_m_s
×
1545
        << '\n';
×
1546
    str << '}';
×
1547
    return str;
×
1548
}
1549

1550
std::ostream& operator<<(std::ostream& str, Telemetry::Result const& result)
×
1551
{
1552
    switch (result) {
×
1553
        case Telemetry::Result::Unknown:
×
1554
            return str << "Unknown";
×
1555
        case Telemetry::Result::Success:
×
1556
            return str << "Success";
×
1557
        case Telemetry::Result::NoSystem:
×
1558
            return str << "No System";
×
1559
        case Telemetry::Result::ConnectionError:
×
1560
            return str << "Connection Error";
×
1561
        case Telemetry::Result::Busy:
×
1562
            return str << "Busy";
×
1563
        case Telemetry::Result::CommandDenied:
×
1564
            return str << "Command Denied";
×
1565
        case Telemetry::Result::Timeout:
×
1566
            return str << "Timeout";
×
1567
        case Telemetry::Result::Unsupported:
×
1568
            return str << "Unsupported";
×
1569
        default:
×
1570
            return str << "Unknown";
×
1571
    }
1572
}
1573

1574
std::ostream& operator<<(std::ostream& str, Telemetry::FixType const& fix_type)
×
1575
{
1576
    switch (fix_type) {
×
1577
        case Telemetry::FixType::NoGps:
×
1578
            return str << "No Gps";
×
1579
        case Telemetry::FixType::NoFix:
×
1580
            return str << "No Fix";
×
1581
        case Telemetry::FixType::Fix2D:
×
1582
            return str << "Fix 2D";
×
1583
        case Telemetry::FixType::Fix3D:
×
1584
            return str << "Fix 3D";
×
1585
        case Telemetry::FixType::FixDgps:
×
1586
            return str << "Fix Dgps";
×
1587
        case Telemetry::FixType::RtkFloat:
×
1588
            return str << "Rtk Float";
×
1589
        case Telemetry::FixType::RtkFixed:
×
1590
            return str << "Rtk Fixed";
×
1591
        default:
×
1592
            return str << "Unknown";
×
1593
    }
1594
}
1595

NEW
1596
std::ostream& operator<<(std::ostream& str, Telemetry::BatteryFunction const& battery_function)
×
1597
{
NEW
1598
    switch (battery_function) {
×
NEW
1599
        case Telemetry::BatteryFunction::Unknown:
×
NEW
1600
            return str << "Unknown";
×
NEW
1601
        case Telemetry::BatteryFunction::All:
×
NEW
1602
            return str << "All";
×
NEW
1603
        case Telemetry::BatteryFunction::Propulsion:
×
NEW
1604
            return str << "Propulsion";
×
NEW
1605
        case Telemetry::BatteryFunction::Avionics:
×
NEW
1606
            return str << "Avionics";
×
NEW
1607
        case Telemetry::BatteryFunction::Payload:
×
NEW
1608
            return str << "Payload";
×
NEW
1609
        default:
×
NEW
1610
            return str << "Unknown";
×
1611
    }
1612
}
1613

UNCOV
1614
std::ostream& operator<<(std::ostream& str, Telemetry::FlightMode const& flight_mode)
×
1615
{
1616
    switch (flight_mode) {
×
1617
        case Telemetry::FlightMode::Unknown:
×
1618
            return str << "Unknown";
×
1619
        case Telemetry::FlightMode::Ready:
×
1620
            return str << "Ready";
×
1621
        case Telemetry::FlightMode::Takeoff:
×
1622
            return str << "Takeoff";
×
1623
        case Telemetry::FlightMode::Hold:
×
1624
            return str << "Hold";
×
1625
        case Telemetry::FlightMode::Mission:
×
1626
            return str << "Mission";
×
1627
        case Telemetry::FlightMode::ReturnToLaunch:
×
1628
            return str << "Return To Launch";
×
1629
        case Telemetry::FlightMode::Land:
×
1630
            return str << "Land";
×
1631
        case Telemetry::FlightMode::Offboard:
×
1632
            return str << "Offboard";
×
1633
        case Telemetry::FlightMode::FollowMe:
×
1634
            return str << "Follow Me";
×
1635
        case Telemetry::FlightMode::Manual:
×
1636
            return str << "Manual";
×
1637
        case Telemetry::FlightMode::Altctl:
×
1638
            return str << "Altctl";
×
1639
        case Telemetry::FlightMode::Posctl:
×
1640
            return str << "Posctl";
×
1641
        case Telemetry::FlightMode::Acro:
×
1642
            return str << "Acro";
×
1643
        case Telemetry::FlightMode::Stabilized:
×
1644
            return str << "Stabilized";
×
1645
        case Telemetry::FlightMode::Rattitude:
×
1646
            return str << "Rattitude";
×
1647
        default:
×
1648
            return str << "Unknown";
×
1649
    }
1650
}
1651

1652
std::ostream& operator<<(std::ostream& str, Telemetry::StatusTextType const& status_text_type)
×
1653
{
1654
    switch (status_text_type) {
×
1655
        case Telemetry::StatusTextType::Debug:
×
1656
            return str << "Debug";
×
1657
        case Telemetry::StatusTextType::Info:
×
1658
            return str << "Info";
×
1659
        case Telemetry::StatusTextType::Notice:
×
1660
            return str << "Notice";
×
1661
        case Telemetry::StatusTextType::Warning:
×
1662
            return str << "Warning";
×
1663
        case Telemetry::StatusTextType::Error:
×
1664
            return str << "Error";
×
1665
        case Telemetry::StatusTextType::Critical:
×
1666
            return str << "Critical";
×
1667
        case Telemetry::StatusTextType::Alert:
×
1668
            return str << "Alert";
×
1669
        case Telemetry::StatusTextType::Emergency:
×
1670
            return str << "Emergency";
×
1671
        default:
×
1672
            return str << "Unknown";
×
1673
    }
1674
}
1675

1676
std::ostream& operator<<(std::ostream& str, Telemetry::LandedState const& landed_state)
×
1677
{
1678
    switch (landed_state) {
×
1679
        case Telemetry::LandedState::Unknown:
×
1680
            return str << "Unknown";
×
1681
        case Telemetry::LandedState::OnGround:
×
1682
            return str << "On Ground";
×
1683
        case Telemetry::LandedState::InAir:
×
1684
            return str << "In Air";
×
1685
        case Telemetry::LandedState::TakingOff:
×
1686
            return str << "Taking Off";
×
1687
        case Telemetry::LandedState::Landing:
×
1688
            return str << "Landing";
×
1689
        default:
×
1690
            return str << "Unknown";
×
1691
    }
1692
}
1693

1694
std::ostream& operator<<(std::ostream& str, Telemetry::VtolState const& vtol_state)
×
1695
{
1696
    switch (vtol_state) {
×
1697
        case Telemetry::VtolState::Undefined:
×
1698
            return str << "Undefined";
×
1699
        case Telemetry::VtolState::TransitionToFw:
×
1700
            return str << "Transition To Fw";
×
1701
        case Telemetry::VtolState::TransitionToMc:
×
1702
            return str << "Transition To Mc";
×
1703
        case Telemetry::VtolState::Mc:
×
1704
            return str << "Mc";
×
1705
        case Telemetry::VtolState::Fw:
×
1706
            return str << "Fw";
×
1707
        default:
×
1708
            return str << "Unknown";
×
1709
    }
1710
}
1711

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