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

mavlink / MAVSDK / 13934227568

18 Mar 2025 09:54PM UTC coverage: 44.344% (-0.08%) from 44.424%
13934227568

push

github

web-flow
Merge pull request #2523 from aminballoon/pr-add-Mavlink-Wind

Add mavlink wind

1 of 79 new or added lines in 2 files covered. (1.27%)

9 existing lines in 4 files now uncovered.

14601 of 32927 relevant lines covered (44.34%)

283.95 hits per line

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

0.88
/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

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

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

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

UNCOV
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)) ||
×
985
            rhs.remaining_percent == lhs.remaining_percent);
×
986
}
987

988
std::ostream& operator<<(std::ostream& str, Telemetry::Battery const& battery)
×
989
{
990
    str << std::setprecision(15);
×
991
    str << "battery:" << '\n' << "{\n";
×
992
    str << "    id: " << battery.id << '\n';
×
993
    str << "    temperature_degc: " << battery.temperature_degc << '\n';
×
994
    str << "    voltage_v: " << battery.voltage_v << '\n';
×
995
    str << "    current_battery_a: " << battery.current_battery_a << '\n';
×
996
    str << "    capacity_consumed_ah: " << battery.capacity_consumed_ah << '\n';
×
997
    str << "    remaining_percent: " << battery.remaining_percent << '\n';
×
998
    str << '}';
×
999
    return str;
×
1000
}
1001

1002
bool operator==(const Telemetry::Health& lhs, const Telemetry::Health& rhs)
×
1003
{
1004
    return (rhs.is_gyrometer_calibration_ok == lhs.is_gyrometer_calibration_ok) &&
×
1005
           (rhs.is_accelerometer_calibration_ok == lhs.is_accelerometer_calibration_ok) &&
×
1006
           (rhs.is_magnetometer_calibration_ok == lhs.is_magnetometer_calibration_ok) &&
×
1007
           (rhs.is_local_position_ok == lhs.is_local_position_ok) &&
×
1008
           (rhs.is_global_position_ok == lhs.is_global_position_ok) &&
×
1009
           (rhs.is_home_position_ok == lhs.is_home_position_ok) &&
×
1010
           (rhs.is_armable == lhs.is_armable);
×
1011
}
1012

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

1029
bool operator==(const Telemetry::RcStatus& lhs, const Telemetry::RcStatus& rhs)
×
1030
{
1031
    return (rhs.was_available_once == lhs.was_available_once) &&
×
1032
           (rhs.is_available == lhs.is_available) &&
×
1033
           ((std::isnan(rhs.signal_strength_percent) && std::isnan(lhs.signal_strength_percent)) ||
×
1034
            rhs.signal_strength_percent == lhs.signal_strength_percent);
×
1035
}
1036

1037
std::ostream& operator<<(std::ostream& str, Telemetry::RcStatus const& rc_status)
×
1038
{
1039
    str << std::setprecision(15);
×
1040
    str << "rc_status:" << '\n' << "{\n";
×
1041
    str << "    was_available_once: " << rc_status.was_available_once << '\n';
×
1042
    str << "    is_available: " << rc_status.is_available << '\n';
×
1043
    str << "    signal_strength_percent: " << rc_status.signal_strength_percent << '\n';
×
1044
    str << '}';
×
1045
    return str;
×
1046
}
1047

1048
bool operator==(const Telemetry::StatusText& lhs, const Telemetry::StatusText& rhs)
×
1049
{
1050
    return (rhs.type == lhs.type) && (rhs.text == lhs.text);
×
1051
}
1052

1053
std::ostream& operator<<(std::ostream& str, Telemetry::StatusText const& status_text)
×
1054
{
1055
    str << std::setprecision(15);
×
1056
    str << "status_text:" << '\n' << "{\n";
×
1057
    str << "    type: " << status_text.type << '\n';
×
1058
    str << "    text: " << status_text.text << '\n';
×
1059
    str << '}';
×
1060
    return str;
×
1061
}
1062

1063
bool operator==(
×
1064
    const Telemetry::ActuatorControlTarget& lhs, const Telemetry::ActuatorControlTarget& rhs)
1065
{
1066
    return (rhs.group == lhs.group) && (rhs.controls == lhs.controls);
×
1067
}
1068

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

1086
bool operator==(
×
1087
    const Telemetry::ActuatorOutputStatus& lhs, const Telemetry::ActuatorOutputStatus& rhs)
1088
{
1089
    return (rhs.active == lhs.active) && (rhs.actuator == lhs.actuator);
×
1090
}
1091

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

1109
bool operator==(const Telemetry::Covariance& lhs, const Telemetry::Covariance& rhs)
×
1110
{
1111
    return (rhs.covariance_matrix == lhs.covariance_matrix);
×
1112
}
1113

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

1128
bool operator==(const Telemetry::VelocityBody& lhs, const Telemetry::VelocityBody& rhs)
×
1129
{
1130
    return ((std::isnan(rhs.x_m_s) && std::isnan(lhs.x_m_s)) || rhs.x_m_s == lhs.x_m_s) &&
×
1131
           ((std::isnan(rhs.y_m_s) && std::isnan(lhs.y_m_s)) || rhs.y_m_s == lhs.y_m_s) &&
×
1132
           ((std::isnan(rhs.z_m_s) && std::isnan(lhs.z_m_s)) || rhs.z_m_s == lhs.z_m_s);
×
1133
}
1134

1135
std::ostream& operator<<(std::ostream& str, Telemetry::VelocityBody const& velocity_body)
×
1136
{
1137
    str << std::setprecision(15);
×
1138
    str << "velocity_body:" << '\n' << "{\n";
×
1139
    str << "    x_m_s: " << velocity_body.x_m_s << '\n';
×
1140
    str << "    y_m_s: " << velocity_body.y_m_s << '\n';
×
1141
    str << "    z_m_s: " << velocity_body.z_m_s << '\n';
×
1142
    str << '}';
×
1143
    return str;
×
1144
}
1145

1146
bool operator==(const Telemetry::PositionBody& lhs, const Telemetry::PositionBody& rhs)
×
1147
{
1148
    return ((std::isnan(rhs.x_m) && std::isnan(lhs.x_m)) || rhs.x_m == lhs.x_m) &&
×
1149
           ((std::isnan(rhs.y_m) && std::isnan(lhs.y_m)) || rhs.y_m == lhs.y_m) &&
×
1150
           ((std::isnan(rhs.z_m) && std::isnan(lhs.z_m)) || rhs.z_m == lhs.z_m);
×
1151
}
1152

1153
std::ostream& operator<<(std::ostream& str, Telemetry::PositionBody const& position_body)
×
1154
{
1155
    str << std::setprecision(15);
×
1156
    str << "position_body:" << '\n' << "{\n";
×
1157
    str << "    x_m: " << position_body.x_m << '\n';
×
1158
    str << "    y_m: " << position_body.y_m << '\n';
×
1159
    str << "    z_m: " << position_body.z_m << '\n';
×
1160
    str << '}';
×
1161
    return str;
×
1162
}
1163

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

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

1206
bool operator==(const Telemetry::DistanceSensor& lhs, const Telemetry::DistanceSensor& rhs)
×
1207
{
1208
    return ((std::isnan(rhs.minimum_distance_m) && std::isnan(lhs.minimum_distance_m)) ||
×
1209
            rhs.minimum_distance_m == lhs.minimum_distance_m) &&
×
1210
           ((std::isnan(rhs.maximum_distance_m) && std::isnan(lhs.maximum_distance_m)) ||
×
1211
            rhs.maximum_distance_m == lhs.maximum_distance_m) &&
×
1212
           ((std::isnan(rhs.current_distance_m) && std::isnan(lhs.current_distance_m)) ||
×
1213
            rhs.current_distance_m == lhs.current_distance_m) &&
×
1214
           (rhs.orientation == lhs.orientation);
×
1215
}
1216

1217
std::ostream& operator<<(std::ostream& str, Telemetry::DistanceSensor const& distance_sensor)
×
1218
{
1219
    str << std::setprecision(15);
×
1220
    str << "distance_sensor:" << '\n' << "{\n";
×
1221
    str << "    minimum_distance_m: " << distance_sensor.minimum_distance_m << '\n';
×
1222
    str << "    maximum_distance_m: " << distance_sensor.maximum_distance_m << '\n';
×
1223
    str << "    current_distance_m: " << distance_sensor.current_distance_m << '\n';
×
1224
    str << "    orientation: " << distance_sensor.orientation << '\n';
×
1225
    str << '}';
×
1226
    return str;
×
1227
}
1228

1229
bool operator==(const Telemetry::ScaledPressure& lhs, const Telemetry::ScaledPressure& rhs)
×
1230
{
1231
    return (rhs.timestamp_us == lhs.timestamp_us) &&
×
1232
           ((std::isnan(rhs.absolute_pressure_hpa) && std::isnan(lhs.absolute_pressure_hpa)) ||
×
1233
            rhs.absolute_pressure_hpa == lhs.absolute_pressure_hpa) &&
×
1234
           ((std::isnan(rhs.differential_pressure_hpa) &&
×
1235
             std::isnan(lhs.differential_pressure_hpa)) ||
×
1236
            rhs.differential_pressure_hpa == lhs.differential_pressure_hpa) &&
×
1237
           ((std::isnan(rhs.temperature_deg) && std::isnan(lhs.temperature_deg)) ||
×
1238
            rhs.temperature_deg == lhs.temperature_deg) &&
×
1239
           ((std::isnan(rhs.differential_pressure_temperature_deg) &&
×
1240
             std::isnan(lhs.differential_pressure_temperature_deg)) ||
×
1241
            rhs.differential_pressure_temperature_deg == lhs.differential_pressure_temperature_deg);
×
1242
}
1243

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

1258
bool operator==(const Telemetry::PositionNed& lhs, const Telemetry::PositionNed& rhs)
×
1259
{
1260
    return ((std::isnan(rhs.north_m) && std::isnan(lhs.north_m)) || rhs.north_m == lhs.north_m) &&
×
1261
           ((std::isnan(rhs.east_m) && std::isnan(lhs.east_m)) || rhs.east_m == lhs.east_m) &&
×
1262
           ((std::isnan(rhs.down_m) && std::isnan(lhs.down_m)) || rhs.down_m == lhs.down_m);
×
1263
}
1264

1265
std::ostream& operator<<(std::ostream& str, Telemetry::PositionNed const& position_ned)
×
1266
{
1267
    str << std::setprecision(15);
×
1268
    str << "position_ned:" << '\n' << "{\n";
×
1269
    str << "    north_m: " << position_ned.north_m << '\n';
×
1270
    str << "    east_m: " << position_ned.east_m << '\n';
×
1271
    str << "    down_m: " << position_ned.down_m << '\n';
×
1272
    str << '}';
×
1273
    return str;
×
1274
}
1275

1276
bool operator==(const Telemetry::VelocityNed& lhs, const Telemetry::VelocityNed& rhs)
×
1277
{
1278
    return ((std::isnan(rhs.north_m_s) && std::isnan(lhs.north_m_s)) ||
×
1279
            rhs.north_m_s == lhs.north_m_s) &&
×
1280
           ((std::isnan(rhs.east_m_s) && std::isnan(lhs.east_m_s)) ||
×
1281
            rhs.east_m_s == lhs.east_m_s) &&
×
1282
           ((std::isnan(rhs.down_m_s) && std::isnan(lhs.down_m_s)) || rhs.down_m_s == lhs.down_m_s);
×
1283
}
1284

1285
std::ostream& operator<<(std::ostream& str, Telemetry::VelocityNed const& velocity_ned)
×
1286
{
1287
    str << std::setprecision(15);
×
1288
    str << "velocity_ned:" << '\n' << "{\n";
×
1289
    str << "    north_m_s: " << velocity_ned.north_m_s << '\n';
×
1290
    str << "    east_m_s: " << velocity_ned.east_m_s << '\n';
×
1291
    str << "    down_m_s: " << velocity_ned.down_m_s << '\n';
×
1292
    str << '}';
×
1293
    return str;
×
1294
}
1295

1296
bool operator==(
×
1297
    const Telemetry::PositionVelocityNed& lhs, const Telemetry::PositionVelocityNed& rhs)
1298
{
1299
    return (rhs.position == lhs.position) && (rhs.velocity == lhs.velocity);
×
1300
}
1301

1302
std::ostream&
1303
operator<<(std::ostream& str, Telemetry::PositionVelocityNed const& position_velocity_ned)
×
1304
{
1305
    str << std::setprecision(15);
×
1306
    str << "position_velocity_ned:" << '\n' << "{\n";
×
1307
    str << "    position: " << position_velocity_ned.position << '\n';
×
1308
    str << "    velocity: " << position_velocity_ned.velocity << '\n';
×
1309
    str << '}';
×
1310
    return str;
×
1311
}
1312

1313
bool operator==(const Telemetry::GroundTruth& lhs, const Telemetry::GroundTruth& rhs)
×
1314
{
1315
    return ((std::isnan(rhs.latitude_deg) && std::isnan(lhs.latitude_deg)) ||
×
1316
            rhs.latitude_deg == lhs.latitude_deg) &&
×
1317
           ((std::isnan(rhs.longitude_deg) && std::isnan(lhs.longitude_deg)) ||
×
1318
            rhs.longitude_deg == lhs.longitude_deg) &&
×
1319
           ((std::isnan(rhs.absolute_altitude_m) && std::isnan(lhs.absolute_altitude_m)) ||
×
1320
            rhs.absolute_altitude_m == lhs.absolute_altitude_m);
×
1321
}
1322

1323
std::ostream& operator<<(std::ostream& str, Telemetry::GroundTruth const& ground_truth)
×
1324
{
1325
    str << std::setprecision(15);
×
1326
    str << "ground_truth:" << '\n' << "{\n";
×
1327
    str << "    latitude_deg: " << ground_truth.latitude_deg << '\n';
×
1328
    str << "    longitude_deg: " << ground_truth.longitude_deg << '\n';
×
1329
    str << "    absolute_altitude_m: " << ground_truth.absolute_altitude_m << '\n';
×
1330
    str << '}';
×
1331
    return str;
×
1332
}
1333

1334
bool operator==(const Telemetry::FixedwingMetrics& lhs, const Telemetry::FixedwingMetrics& rhs)
×
1335
{
1336
    return ((std::isnan(rhs.airspeed_m_s) && std::isnan(lhs.airspeed_m_s)) ||
×
1337
            rhs.airspeed_m_s == lhs.airspeed_m_s) &&
×
1338
           ((std::isnan(rhs.throttle_percentage) && std::isnan(lhs.throttle_percentage)) ||
×
1339
            rhs.throttle_percentage == lhs.throttle_percentage) &&
×
1340
           ((std::isnan(rhs.climb_rate_m_s) && std::isnan(lhs.climb_rate_m_s)) ||
×
1341
            rhs.climb_rate_m_s == lhs.climb_rate_m_s) &&
×
1342
           ((std::isnan(rhs.groundspeed_m_s) && std::isnan(lhs.groundspeed_m_s)) ||
×
1343
            rhs.groundspeed_m_s == lhs.groundspeed_m_s) &&
×
1344
           ((std::isnan(rhs.heading_deg) && std::isnan(lhs.heading_deg)) ||
×
1345
            rhs.heading_deg == lhs.heading_deg) &&
×
1346
           ((std::isnan(rhs.absolute_altitude_m) && std::isnan(lhs.absolute_altitude_m)) ||
×
1347
            rhs.absolute_altitude_m == lhs.absolute_altitude_m);
×
1348
}
1349

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

1364
bool operator==(const Telemetry::AccelerationFrd& lhs, const Telemetry::AccelerationFrd& rhs)
×
1365
{
1366
    return ((std::isnan(rhs.forward_m_s2) && std::isnan(lhs.forward_m_s2)) ||
×
1367
            rhs.forward_m_s2 == lhs.forward_m_s2) &&
×
1368
           ((std::isnan(rhs.right_m_s2) && std::isnan(lhs.right_m_s2)) ||
×
1369
            rhs.right_m_s2 == lhs.right_m_s2) &&
×
1370
           ((std::isnan(rhs.down_m_s2) && std::isnan(lhs.down_m_s2)) ||
×
1371
            rhs.down_m_s2 == lhs.down_m_s2);
×
1372
}
1373

1374
std::ostream& operator<<(std::ostream& str, Telemetry::AccelerationFrd const& acceleration_frd)
×
1375
{
1376
    str << std::setprecision(15);
×
1377
    str << "acceleration_frd:" << '\n' << "{\n";
×
1378
    str << "    forward_m_s2: " << acceleration_frd.forward_m_s2 << '\n';
×
1379
    str << "    right_m_s2: " << acceleration_frd.right_m_s2 << '\n';
×
1380
    str << "    down_m_s2: " << acceleration_frd.down_m_s2 << '\n';
×
1381
    str << '}';
×
1382
    return str;
×
1383
}
1384

1385
bool operator==(const Telemetry::AngularVelocityFrd& lhs, const Telemetry::AngularVelocityFrd& rhs)
×
1386
{
1387
    return ((std::isnan(rhs.forward_rad_s) && std::isnan(lhs.forward_rad_s)) ||
×
1388
            rhs.forward_rad_s == lhs.forward_rad_s) &&
×
1389
           ((std::isnan(rhs.right_rad_s) && std::isnan(lhs.right_rad_s)) ||
×
1390
            rhs.right_rad_s == lhs.right_rad_s) &&
×
1391
           ((std::isnan(rhs.down_rad_s) && std::isnan(lhs.down_rad_s)) ||
×
1392
            rhs.down_rad_s == lhs.down_rad_s);
×
1393
}
1394

1395
std::ostream&
1396
operator<<(std::ostream& str, Telemetry::AngularVelocityFrd const& angular_velocity_frd)
×
1397
{
1398
    str << std::setprecision(15);
×
1399
    str << "angular_velocity_frd:" << '\n' << "{\n";
×
1400
    str << "    forward_rad_s: " << angular_velocity_frd.forward_rad_s << '\n';
×
1401
    str << "    right_rad_s: " << angular_velocity_frd.right_rad_s << '\n';
×
1402
    str << "    down_rad_s: " << angular_velocity_frd.down_rad_s << '\n';
×
1403
    str << '}';
×
1404
    return str;
×
1405
}
1406

1407
bool operator==(const Telemetry::MagneticFieldFrd& lhs, const Telemetry::MagneticFieldFrd& rhs)
×
1408
{
1409
    return ((std::isnan(rhs.forward_gauss) && std::isnan(lhs.forward_gauss)) ||
×
1410
            rhs.forward_gauss == lhs.forward_gauss) &&
×
1411
           ((std::isnan(rhs.right_gauss) && std::isnan(lhs.right_gauss)) ||
×
1412
            rhs.right_gauss == lhs.right_gauss) &&
×
1413
           ((std::isnan(rhs.down_gauss) && std::isnan(lhs.down_gauss)) ||
×
1414
            rhs.down_gauss == lhs.down_gauss);
×
1415
}
1416

1417
std::ostream& operator<<(std::ostream& str, Telemetry::MagneticFieldFrd const& magnetic_field_frd)
×
1418
{
1419
    str << std::setprecision(15);
×
1420
    str << "magnetic_field_frd:" << '\n' << "{\n";
×
1421
    str << "    forward_gauss: " << magnetic_field_frd.forward_gauss << '\n';
×
1422
    str << "    right_gauss: " << magnetic_field_frd.right_gauss << '\n';
×
1423
    str << "    down_gauss: " << magnetic_field_frd.down_gauss << '\n';
×
1424
    str << '}';
×
1425
    return str;
×
1426
}
1427

1428
bool operator==(const Telemetry::Imu& lhs, const Telemetry::Imu& rhs)
×
1429
{
1430
    return (rhs.acceleration_frd == lhs.acceleration_frd) &&
×
1431
           (rhs.angular_velocity_frd == lhs.angular_velocity_frd) &&
×
1432
           (rhs.magnetic_field_frd == lhs.magnetic_field_frd) &&
×
1433
           ((std::isnan(rhs.temperature_degc) && std::isnan(lhs.temperature_degc)) ||
×
1434
            rhs.temperature_degc == lhs.temperature_degc) &&
×
1435
           (rhs.timestamp_us == lhs.timestamp_us);
×
1436
}
1437

1438
std::ostream& operator<<(std::ostream& str, Telemetry::Imu const& imu)
×
1439
{
1440
    str << std::setprecision(15);
×
1441
    str << "imu:" << '\n' << "{\n";
×
1442
    str << "    acceleration_frd: " << imu.acceleration_frd << '\n';
×
1443
    str << "    angular_velocity_frd: " << imu.angular_velocity_frd << '\n';
×
1444
    str << "    magnetic_field_frd: " << imu.magnetic_field_frd << '\n';
×
1445
    str << "    temperature_degc: " << imu.temperature_degc << '\n';
×
1446
    str << "    timestamp_us: " << imu.timestamp_us << '\n';
×
1447
    str << '}';
×
1448
    return str;
×
1449
}
1450

1451
bool operator==(const Telemetry::GpsGlobalOrigin& lhs, const Telemetry::GpsGlobalOrigin& rhs)
×
1452
{
1453
    return ((std::isnan(rhs.latitude_deg) && std::isnan(lhs.latitude_deg)) ||
×
1454
            rhs.latitude_deg == lhs.latitude_deg) &&
×
1455
           ((std::isnan(rhs.longitude_deg) && std::isnan(lhs.longitude_deg)) ||
×
1456
            rhs.longitude_deg == lhs.longitude_deg) &&
×
1457
           ((std::isnan(rhs.altitude_m) && std::isnan(lhs.altitude_m)) ||
×
1458
            rhs.altitude_m == lhs.altitude_m);
×
1459
}
1460

1461
std::ostream& operator<<(std::ostream& str, Telemetry::GpsGlobalOrigin const& gps_global_origin)
×
1462
{
1463
    str << std::setprecision(15);
×
1464
    str << "gps_global_origin:" << '\n' << "{\n";
×
1465
    str << "    latitude_deg: " << gps_global_origin.latitude_deg << '\n';
×
1466
    str << "    longitude_deg: " << gps_global_origin.longitude_deg << '\n';
×
1467
    str << "    altitude_m: " << gps_global_origin.altitude_m << '\n';
×
1468
    str << '}';
×
1469
    return str;
×
1470
}
1471

1472
bool operator==(const Telemetry::Altitude& lhs, const Telemetry::Altitude& rhs)
×
1473
{
1474
    return ((std::isnan(rhs.altitude_monotonic_m) && std::isnan(lhs.altitude_monotonic_m)) ||
×
1475
            rhs.altitude_monotonic_m == lhs.altitude_monotonic_m) &&
×
1476
           ((std::isnan(rhs.altitude_amsl_m) && std::isnan(lhs.altitude_amsl_m)) ||
×
1477
            rhs.altitude_amsl_m == lhs.altitude_amsl_m) &&
×
1478
           ((std::isnan(rhs.altitude_local_m) && std::isnan(lhs.altitude_local_m)) ||
×
1479
            rhs.altitude_local_m == lhs.altitude_local_m) &&
×
1480
           ((std::isnan(rhs.altitude_relative_m) && std::isnan(lhs.altitude_relative_m)) ||
×
1481
            rhs.altitude_relative_m == lhs.altitude_relative_m) &&
×
1482
           ((std::isnan(rhs.altitude_terrain_m) && std::isnan(lhs.altitude_terrain_m)) ||
×
1483
            rhs.altitude_terrain_m == lhs.altitude_terrain_m) &&
×
1484
           ((std::isnan(rhs.bottom_clearance_m) && std::isnan(lhs.bottom_clearance_m)) ||
×
1485
            rhs.bottom_clearance_m == lhs.bottom_clearance_m);
×
1486
}
1487

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

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

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

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

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

1591
std::ostream& operator<<(std::ostream& str, Telemetry::FlightMode const& flight_mode)
×
1592
{
1593
    switch (flight_mode) {
×
1594
        case Telemetry::FlightMode::Unknown:
×
1595
            return str << "Unknown";
×
1596
        case Telemetry::FlightMode::Ready:
×
1597
            return str << "Ready";
×
1598
        case Telemetry::FlightMode::Takeoff:
×
1599
            return str << "Takeoff";
×
1600
        case Telemetry::FlightMode::Hold:
×
1601
            return str << "Hold";
×
1602
        case Telemetry::FlightMode::Mission:
×
1603
            return str << "Mission";
×
1604
        case Telemetry::FlightMode::ReturnToLaunch:
×
1605
            return str << "Return To Launch";
×
1606
        case Telemetry::FlightMode::Land:
×
1607
            return str << "Land";
×
1608
        case Telemetry::FlightMode::Offboard:
×
1609
            return str << "Offboard";
×
1610
        case Telemetry::FlightMode::FollowMe:
×
1611
            return str << "Follow Me";
×
1612
        case Telemetry::FlightMode::Manual:
×
1613
            return str << "Manual";
×
1614
        case Telemetry::FlightMode::Altctl:
×
1615
            return str << "Altctl";
×
1616
        case Telemetry::FlightMode::Posctl:
×
1617
            return str << "Posctl";
×
1618
        case Telemetry::FlightMode::Acro:
×
1619
            return str << "Acro";
×
1620
        case Telemetry::FlightMode::Stabilized:
×
1621
            return str << "Stabilized";
×
1622
        case Telemetry::FlightMode::Rattitude:
×
1623
            return str << "Rattitude";
×
1624
        default:
×
1625
            return str << "Unknown";
×
1626
    }
1627
}
1628

1629
std::ostream& operator<<(std::ostream& str, Telemetry::StatusTextType const& status_text_type)
×
1630
{
1631
    switch (status_text_type) {
×
1632
        case Telemetry::StatusTextType::Debug:
×
1633
            return str << "Debug";
×
1634
        case Telemetry::StatusTextType::Info:
×
1635
            return str << "Info";
×
1636
        case Telemetry::StatusTextType::Notice:
×
1637
            return str << "Notice";
×
1638
        case Telemetry::StatusTextType::Warning:
×
1639
            return str << "Warning";
×
1640
        case Telemetry::StatusTextType::Error:
×
1641
            return str << "Error";
×
1642
        case Telemetry::StatusTextType::Critical:
×
1643
            return str << "Critical";
×
1644
        case Telemetry::StatusTextType::Alert:
×
1645
            return str << "Alert";
×
1646
        case Telemetry::StatusTextType::Emergency:
×
1647
            return str << "Emergency";
×
1648
        default:
×
1649
            return str << "Unknown";
×
1650
    }
1651
}
1652

1653
std::ostream& operator<<(std::ostream& str, Telemetry::LandedState const& landed_state)
×
1654
{
1655
    switch (landed_state) {
×
1656
        case Telemetry::LandedState::Unknown:
×
1657
            return str << "Unknown";
×
1658
        case Telemetry::LandedState::OnGround:
×
1659
            return str << "On Ground";
×
1660
        case Telemetry::LandedState::InAir:
×
1661
            return str << "In Air";
×
1662
        case Telemetry::LandedState::TakingOff:
×
1663
            return str << "Taking Off";
×
1664
        case Telemetry::LandedState::Landing:
×
1665
            return str << "Landing";
×
1666
        default:
×
1667
            return str << "Unknown";
×
1668
    }
1669
}
1670

1671
std::ostream& operator<<(std::ostream& str, Telemetry::VtolState const& vtol_state)
×
1672
{
1673
    switch (vtol_state) {
×
1674
        case Telemetry::VtolState::Undefined:
×
1675
            return str << "Undefined";
×
1676
        case Telemetry::VtolState::TransitionToFw:
×
1677
            return str << "Transition To Fw";
×
1678
        case Telemetry::VtolState::TransitionToMc:
×
1679
            return str << "Transition To Mc";
×
1680
        case Telemetry::VtolState::Mc:
×
1681
            return str << "Mc";
×
1682
        case Telemetry::VtolState::Fw:
×
1683
            return str << "Fw";
×
1684
        default:
×
1685
            return str << "Unknown";
×
1686
    }
1687
}
1688

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

© 2025 Coveralls, Inc