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

mavlink / MAVSDK / 24114167644

08 Apr 2026 02:17AM UTC coverage: 50.468% (+0.003%) from 50.465%
24114167644

push

github

web-flow
core: hide symbols by default, export only public API (#2855)

* core: hide symbols by default, export only public API

Backport of #2824 to v3. Fixes segfault when MAVSDK is used alongside
ROS2 (or any library sharing bundled dependencies like OpenSSL/tinyxml2)
due to symbol conflicts from leaked third-party symbols.

- Add mavsdk_export.h with MAVSDK_PUBLIC, MAVSDK_TEST_EXPORT, and
  MAVSDK_TEMPL_INST macros
- Set CXX_VISIBILITY_PRESET=hidden and VISIBILITY_INLINES_HIDDEN=ON
- MAVSDK_SHARED compile definition gates dllexport/dllimport so that
  static builds on Windows are unaffected
- Annotate all public classes, free functions, operator overloads,
  and explicit template instantiations
- Update jinja2 templates to emit MAVSDK_PUBLIC on generated
  operator== and operator<< definitions
- Disable MSVC C4251 warning for DLL interface on STL members

Fixes #2852

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: remove stale asio includes from mission transfer client header

The backport patch incorrectly added asio includes that don't exist on
v3 (they were added on main after v3 branched).

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

15 of 379 new or added lines in 39 files covered. (3.96%)

4 existing lines in 3 files now uncovered.

19248 of 38139 relevant lines covered (50.47%)

672.95 hits per line

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

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

5
#include <iomanip>
6

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

10
namespace mavsdk {
11

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

NEW
1219
MAVSDK_PUBLIC std::ostream& operator<<(std::ostream& str, Telemetry::Odometry const& odometry)
×
1220
{
1221
    str << std::setprecision(15);
×
1222
    str << "odometry:" << '\n' << "{\n";
×
1223
    str << "    time_usec: " << odometry.time_usec << '\n';
×
1224
    str << "    frame_id: " << odometry.frame_id << '\n';
×
1225
    str << "    child_frame_id: " << odometry.child_frame_id << '\n';
×
1226
    str << "    position_body: " << odometry.position_body << '\n';
×
1227
    str << "    q: " << odometry.q << '\n';
×
1228
    str << "    velocity_body: " << odometry.velocity_body << '\n';
×
1229
    str << "    angular_velocity_body: " << odometry.angular_velocity_body << '\n';
×
1230
    str << "    pose_covariance: " << odometry.pose_covariance << '\n';
×
1231
    str << "    velocity_covariance: " << odometry.velocity_covariance << '\n';
×
1232
    str << '}';
×
1233
    return str;
×
1234
}
1235

1236
MAVSDK_PUBLIC bool
NEW
1237
operator==(const Telemetry::DistanceSensor& lhs, const Telemetry::DistanceSensor& rhs)
×
1238
{
1239
    return ((std::isnan(rhs.minimum_distance_m) && std::isnan(lhs.minimum_distance_m)) ||
×
1240
            rhs.minimum_distance_m == lhs.minimum_distance_m) &&
×
1241
           ((std::isnan(rhs.maximum_distance_m) && std::isnan(lhs.maximum_distance_m)) ||
×
1242
            rhs.maximum_distance_m == lhs.maximum_distance_m) &&
×
1243
           ((std::isnan(rhs.current_distance_m) && std::isnan(lhs.current_distance_m)) ||
×
1244
            rhs.current_distance_m == lhs.current_distance_m) &&
×
1245
           (rhs.orientation == lhs.orientation);
×
1246
}
1247

1248
MAVSDK_PUBLIC std::ostream&
NEW
1249
operator<<(std::ostream& str, Telemetry::DistanceSensor const& distance_sensor)
×
1250
{
1251
    str << std::setprecision(15);
×
1252
    str << "distance_sensor:" << '\n' << "{\n";
×
1253
    str << "    minimum_distance_m: " << distance_sensor.minimum_distance_m << '\n';
×
1254
    str << "    maximum_distance_m: " << distance_sensor.maximum_distance_m << '\n';
×
1255
    str << "    current_distance_m: " << distance_sensor.current_distance_m << '\n';
×
1256
    str << "    orientation: " << distance_sensor.orientation << '\n';
×
1257
    str << '}';
×
1258
    return str;
×
1259
}
1260

1261
MAVSDK_PUBLIC bool
NEW
1262
operator==(const Telemetry::ScaledPressure& lhs, const Telemetry::ScaledPressure& rhs)
×
1263
{
1264
    return (rhs.timestamp_us == lhs.timestamp_us) &&
×
1265
           ((std::isnan(rhs.absolute_pressure_hpa) && std::isnan(lhs.absolute_pressure_hpa)) ||
×
1266
            rhs.absolute_pressure_hpa == lhs.absolute_pressure_hpa) &&
×
1267
           ((std::isnan(rhs.differential_pressure_hpa) &&
×
1268
             std::isnan(lhs.differential_pressure_hpa)) ||
×
1269
            rhs.differential_pressure_hpa == lhs.differential_pressure_hpa) &&
×
1270
           ((std::isnan(rhs.temperature_deg) && std::isnan(lhs.temperature_deg)) ||
×
1271
            rhs.temperature_deg == lhs.temperature_deg) &&
×
1272
           ((std::isnan(rhs.differential_pressure_temperature_deg) &&
×
1273
             std::isnan(lhs.differential_pressure_temperature_deg)) ||
×
1274
            rhs.differential_pressure_temperature_deg == lhs.differential_pressure_temperature_deg);
×
1275
}
1276

1277
MAVSDK_PUBLIC std::ostream&
NEW
1278
operator<<(std::ostream& str, Telemetry::ScaledPressure const& scaled_pressure)
×
1279
{
1280
    str << std::setprecision(15);
×
1281
    str << "scaled_pressure:" << '\n' << "{\n";
×
1282
    str << "    timestamp_us: " << scaled_pressure.timestamp_us << '\n';
×
1283
    str << "    absolute_pressure_hpa: " << scaled_pressure.absolute_pressure_hpa << '\n';
×
1284
    str << "    differential_pressure_hpa: " << scaled_pressure.differential_pressure_hpa << '\n';
×
1285
    str << "    temperature_deg: " << scaled_pressure.temperature_deg << '\n';
×
1286
    str << "    differential_pressure_temperature_deg: "
×
1287
        << scaled_pressure.differential_pressure_temperature_deg << '\n';
×
1288
    str << '}';
×
1289
    return str;
×
1290
}
1291

NEW
1292
MAVSDK_PUBLIC bool operator==(const Telemetry::PositionNed& lhs, const Telemetry::PositionNed& rhs)
×
1293
{
1294
    return ((std::isnan(rhs.north_m) && std::isnan(lhs.north_m)) || rhs.north_m == lhs.north_m) &&
×
1295
           ((std::isnan(rhs.east_m) && std::isnan(lhs.east_m)) || rhs.east_m == lhs.east_m) &&
×
1296
           ((std::isnan(rhs.down_m) && std::isnan(lhs.down_m)) || rhs.down_m == lhs.down_m);
×
1297
}
1298

1299
MAVSDK_PUBLIC std::ostream&
NEW
1300
operator<<(std::ostream& str, Telemetry::PositionNed const& position_ned)
×
1301
{
1302
    str << std::setprecision(15);
×
1303
    str << "position_ned:" << '\n' << "{\n";
×
1304
    str << "    north_m: " << position_ned.north_m << '\n';
×
1305
    str << "    east_m: " << position_ned.east_m << '\n';
×
1306
    str << "    down_m: " << position_ned.down_m << '\n';
×
1307
    str << '}';
×
1308
    return str;
×
1309
}
1310

NEW
1311
MAVSDK_PUBLIC bool operator==(const Telemetry::VelocityNed& lhs, const Telemetry::VelocityNed& rhs)
×
1312
{
1313
    return ((std::isnan(rhs.north_m_s) && std::isnan(lhs.north_m_s)) ||
×
1314
            rhs.north_m_s == lhs.north_m_s) &&
×
1315
           ((std::isnan(rhs.east_m_s) && std::isnan(lhs.east_m_s)) ||
×
1316
            rhs.east_m_s == lhs.east_m_s) &&
×
1317
           ((std::isnan(rhs.down_m_s) && std::isnan(lhs.down_m_s)) || rhs.down_m_s == lhs.down_m_s);
×
1318
}
1319

1320
MAVSDK_PUBLIC std::ostream&
NEW
1321
operator<<(std::ostream& str, Telemetry::VelocityNed const& velocity_ned)
×
1322
{
1323
    str << std::setprecision(15);
×
1324
    str << "velocity_ned:" << '\n' << "{\n";
×
1325
    str << "    north_m_s: " << velocity_ned.north_m_s << '\n';
×
1326
    str << "    east_m_s: " << velocity_ned.east_m_s << '\n';
×
1327
    str << "    down_m_s: " << velocity_ned.down_m_s << '\n';
×
1328
    str << '}';
×
1329
    return str;
×
1330
}
1331

1332
MAVSDK_PUBLIC bool
NEW
1333
operator==(const Telemetry::PositionVelocityNed& lhs, const Telemetry::PositionVelocityNed& rhs)
×
1334
{
1335
    return (rhs.position == lhs.position) && (rhs.velocity == lhs.velocity);
×
1336
}
1337

1338
MAVSDK_PUBLIC std::ostream&
1339
operator<<(std::ostream& str, Telemetry::PositionVelocityNed const& position_velocity_ned)
×
1340
{
1341
    str << std::setprecision(15);
×
1342
    str << "position_velocity_ned:" << '\n' << "{\n";
×
1343
    str << "    position: " << position_velocity_ned.position << '\n';
×
1344
    str << "    velocity: " << position_velocity_ned.velocity << '\n';
×
1345
    str << '}';
×
1346
    return str;
×
1347
}
1348

1349
MAVSDK_PUBLIC bool operator==(const Telemetry::GroundTruth& lhs, const Telemetry::GroundTruth& rhs)
2✔
1350
{
1351
    return ((std::isnan(rhs.latitude_deg) && std::isnan(lhs.latitude_deg)) ||
2✔
1352
            rhs.latitude_deg == lhs.latitude_deg) &&
4✔
1353
           ((std::isnan(rhs.longitude_deg) && std::isnan(lhs.longitude_deg)) ||
2✔
1354
            rhs.longitude_deg == lhs.longitude_deg) &&
4✔
1355
           ((std::isnan(rhs.absolute_altitude_m) && std::isnan(lhs.absolute_altitude_m)) ||
2✔
1356
            rhs.absolute_altitude_m == lhs.absolute_altitude_m) &&
6✔
1357
           (rhs.timestamp_us == lhs.timestamp_us);
4✔
1358
}
1359

1360
MAVSDK_PUBLIC std::ostream&
NEW
1361
operator<<(std::ostream& str, Telemetry::GroundTruth const& ground_truth)
×
1362
{
1363
    str << std::setprecision(15);
×
1364
    str << "ground_truth:" << '\n' << "{\n";
×
1365
    str << "    latitude_deg: " << ground_truth.latitude_deg << '\n';
×
1366
    str << "    longitude_deg: " << ground_truth.longitude_deg << '\n';
×
1367
    str << "    absolute_altitude_m: " << ground_truth.absolute_altitude_m << '\n';
×
1368
    str << "    timestamp_us: " << ground_truth.timestamp_us << '\n';
×
1369
    str << '}';
×
1370
    return str;
×
1371
}
1372

1373
MAVSDK_PUBLIC bool
NEW
1374
operator==(const Telemetry::FixedwingMetrics& lhs, const Telemetry::FixedwingMetrics& rhs)
×
1375
{
1376
    return ((std::isnan(rhs.airspeed_m_s) && std::isnan(lhs.airspeed_m_s)) ||
×
1377
            rhs.airspeed_m_s == lhs.airspeed_m_s) &&
×
1378
           ((std::isnan(rhs.throttle_percentage) && std::isnan(lhs.throttle_percentage)) ||
×
1379
            rhs.throttle_percentage == lhs.throttle_percentage) &&
×
1380
           ((std::isnan(rhs.climb_rate_m_s) && std::isnan(lhs.climb_rate_m_s)) ||
×
1381
            rhs.climb_rate_m_s == lhs.climb_rate_m_s) &&
×
1382
           ((std::isnan(rhs.groundspeed_m_s) && std::isnan(lhs.groundspeed_m_s)) ||
×
1383
            rhs.groundspeed_m_s == lhs.groundspeed_m_s) &&
×
1384
           ((std::isnan(rhs.heading_deg) && std::isnan(lhs.heading_deg)) ||
×
1385
            rhs.heading_deg == lhs.heading_deg) &&
×
1386
           ((std::isnan(rhs.absolute_altitude_m) && std::isnan(lhs.absolute_altitude_m)) ||
×
1387
            rhs.absolute_altitude_m == lhs.absolute_altitude_m);
×
1388
}
1389

1390
MAVSDK_PUBLIC std::ostream&
NEW
1391
operator<<(std::ostream& str, Telemetry::FixedwingMetrics const& fixedwing_metrics)
×
1392
{
1393
    str << std::setprecision(15);
×
1394
    str << "fixedwing_metrics:" << '\n' << "{\n";
×
1395
    str << "    airspeed_m_s: " << fixedwing_metrics.airspeed_m_s << '\n';
×
1396
    str << "    throttle_percentage: " << fixedwing_metrics.throttle_percentage << '\n';
×
1397
    str << "    climb_rate_m_s: " << fixedwing_metrics.climb_rate_m_s << '\n';
×
1398
    str << "    groundspeed_m_s: " << fixedwing_metrics.groundspeed_m_s << '\n';
×
1399
    str << "    heading_deg: " << fixedwing_metrics.heading_deg << '\n';
×
1400
    str << "    absolute_altitude_m: " << fixedwing_metrics.absolute_altitude_m << '\n';
×
1401
    str << '}';
×
1402
    return str;
×
1403
}
1404

1405
MAVSDK_PUBLIC bool
NEW
1406
operator==(const Telemetry::AccelerationFrd& lhs, const Telemetry::AccelerationFrd& rhs)
×
1407
{
1408
    return ((std::isnan(rhs.forward_m_s2) && std::isnan(lhs.forward_m_s2)) ||
×
1409
            rhs.forward_m_s2 == lhs.forward_m_s2) &&
×
1410
           ((std::isnan(rhs.right_m_s2) && std::isnan(lhs.right_m_s2)) ||
×
1411
            rhs.right_m_s2 == lhs.right_m_s2) &&
×
1412
           ((std::isnan(rhs.down_m_s2) && std::isnan(lhs.down_m_s2)) ||
×
1413
            rhs.down_m_s2 == lhs.down_m_s2);
×
1414
}
1415

1416
MAVSDK_PUBLIC std::ostream&
NEW
1417
operator<<(std::ostream& str, Telemetry::AccelerationFrd const& acceleration_frd)
×
1418
{
1419
    str << std::setprecision(15);
×
1420
    str << "acceleration_frd:" << '\n' << "{\n";
×
1421
    str << "    forward_m_s2: " << acceleration_frd.forward_m_s2 << '\n';
×
1422
    str << "    right_m_s2: " << acceleration_frd.right_m_s2 << '\n';
×
1423
    str << "    down_m_s2: " << acceleration_frd.down_m_s2 << '\n';
×
1424
    str << '}';
×
1425
    return str;
×
1426
}
1427

1428
MAVSDK_PUBLIC bool
NEW
1429
operator==(const Telemetry::AngularVelocityFrd& lhs, const Telemetry::AngularVelocityFrd& rhs)
×
1430
{
1431
    return ((std::isnan(rhs.forward_rad_s) && std::isnan(lhs.forward_rad_s)) ||
×
1432
            rhs.forward_rad_s == lhs.forward_rad_s) &&
×
1433
           ((std::isnan(rhs.right_rad_s) && std::isnan(lhs.right_rad_s)) ||
×
1434
            rhs.right_rad_s == lhs.right_rad_s) &&
×
1435
           ((std::isnan(rhs.down_rad_s) && std::isnan(lhs.down_rad_s)) ||
×
1436
            rhs.down_rad_s == lhs.down_rad_s);
×
1437
}
1438

1439
MAVSDK_PUBLIC std::ostream&
1440
operator<<(std::ostream& str, Telemetry::AngularVelocityFrd const& angular_velocity_frd)
×
1441
{
1442
    str << std::setprecision(15);
×
1443
    str << "angular_velocity_frd:" << '\n' << "{\n";
×
1444
    str << "    forward_rad_s: " << angular_velocity_frd.forward_rad_s << '\n';
×
1445
    str << "    right_rad_s: " << angular_velocity_frd.right_rad_s << '\n';
×
1446
    str << "    down_rad_s: " << angular_velocity_frd.down_rad_s << '\n';
×
1447
    str << '}';
×
1448
    return str;
×
1449
}
1450

1451
MAVSDK_PUBLIC bool
NEW
1452
operator==(const Telemetry::MagneticFieldFrd& lhs, const Telemetry::MagneticFieldFrd& rhs)
×
1453
{
1454
    return ((std::isnan(rhs.forward_gauss) && std::isnan(lhs.forward_gauss)) ||
×
1455
            rhs.forward_gauss == lhs.forward_gauss) &&
×
1456
           ((std::isnan(rhs.right_gauss) && std::isnan(lhs.right_gauss)) ||
×
1457
            rhs.right_gauss == lhs.right_gauss) &&
×
1458
           ((std::isnan(rhs.down_gauss) && std::isnan(lhs.down_gauss)) ||
×
1459
            rhs.down_gauss == lhs.down_gauss);
×
1460
}
1461

1462
MAVSDK_PUBLIC std::ostream&
NEW
1463
operator<<(std::ostream& str, Telemetry::MagneticFieldFrd const& magnetic_field_frd)
×
1464
{
1465
    str << std::setprecision(15);
×
1466
    str << "magnetic_field_frd:" << '\n' << "{\n";
×
1467
    str << "    forward_gauss: " << magnetic_field_frd.forward_gauss << '\n';
×
1468
    str << "    right_gauss: " << magnetic_field_frd.right_gauss << '\n';
×
1469
    str << "    down_gauss: " << magnetic_field_frd.down_gauss << '\n';
×
1470
    str << '}';
×
1471
    return str;
×
1472
}
1473

NEW
1474
MAVSDK_PUBLIC bool operator==(const Telemetry::Imu& lhs, const Telemetry::Imu& rhs)
×
1475
{
1476
    return (rhs.acceleration_frd == lhs.acceleration_frd) &&
×
1477
           (rhs.angular_velocity_frd == lhs.angular_velocity_frd) &&
×
1478
           (rhs.magnetic_field_frd == lhs.magnetic_field_frd) &&
×
1479
           ((std::isnan(rhs.temperature_degc) && std::isnan(lhs.temperature_degc)) ||
×
1480
            rhs.temperature_degc == lhs.temperature_degc) &&
×
1481
           (rhs.timestamp_us == lhs.timestamp_us);
×
1482
}
1483

NEW
1484
MAVSDK_PUBLIC std::ostream& operator<<(std::ostream& str, Telemetry::Imu const& imu)
×
1485
{
1486
    str << std::setprecision(15);
×
1487
    str << "imu:" << '\n' << "{\n";
×
1488
    str << "    acceleration_frd: " << imu.acceleration_frd << '\n';
×
1489
    str << "    angular_velocity_frd: " << imu.angular_velocity_frd << '\n';
×
1490
    str << "    magnetic_field_frd: " << imu.magnetic_field_frd << '\n';
×
1491
    str << "    temperature_degc: " << imu.temperature_degc << '\n';
×
1492
    str << "    timestamp_us: " << imu.timestamp_us << '\n';
×
1493
    str << '}';
×
1494
    return str;
×
1495
}
1496

1497
MAVSDK_PUBLIC bool
NEW
1498
operator==(const Telemetry::GpsGlobalOrigin& lhs, const Telemetry::GpsGlobalOrigin& rhs)
×
1499
{
1500
    return ((std::isnan(rhs.latitude_deg) && std::isnan(lhs.latitude_deg)) ||
×
1501
            rhs.latitude_deg == lhs.latitude_deg) &&
×
1502
           ((std::isnan(rhs.longitude_deg) && std::isnan(lhs.longitude_deg)) ||
×
1503
            rhs.longitude_deg == lhs.longitude_deg) &&
×
1504
           ((std::isnan(rhs.altitude_m) && std::isnan(lhs.altitude_m)) ||
×
1505
            rhs.altitude_m == lhs.altitude_m);
×
1506
}
1507

1508
MAVSDK_PUBLIC std::ostream&
NEW
1509
operator<<(std::ostream& str, Telemetry::GpsGlobalOrigin const& gps_global_origin)
×
1510
{
1511
    str << std::setprecision(15);
×
1512
    str << "gps_global_origin:" << '\n' << "{\n";
×
1513
    str << "    latitude_deg: " << gps_global_origin.latitude_deg << '\n';
×
1514
    str << "    longitude_deg: " << gps_global_origin.longitude_deg << '\n';
×
1515
    str << "    altitude_m: " << gps_global_origin.altitude_m << '\n';
×
1516
    str << '}';
×
1517
    return str;
×
1518
}
1519

1520
MAVSDK_PUBLIC bool operator==(const Telemetry::Altitude& lhs, const Telemetry::Altitude& rhs)
2✔
1521
{
1522
    return ((std::isnan(rhs.altitude_monotonic_m) && std::isnan(lhs.altitude_monotonic_m)) ||
2✔
1523
            rhs.altitude_monotonic_m == lhs.altitude_monotonic_m) &&
4✔
1524
           ((std::isnan(rhs.altitude_amsl_m) && std::isnan(lhs.altitude_amsl_m)) ||
2✔
1525
            rhs.altitude_amsl_m == lhs.altitude_amsl_m) &&
4✔
1526
           ((std::isnan(rhs.altitude_local_m) && std::isnan(lhs.altitude_local_m)) ||
2✔
1527
            rhs.altitude_local_m == lhs.altitude_local_m) &&
4✔
1528
           ((std::isnan(rhs.altitude_relative_m) && std::isnan(lhs.altitude_relative_m)) ||
2✔
1529
            rhs.altitude_relative_m == lhs.altitude_relative_m) &&
4✔
1530
           ((std::isnan(rhs.altitude_terrain_m) && std::isnan(lhs.altitude_terrain_m)) ||
2✔
1531
            rhs.altitude_terrain_m == lhs.altitude_terrain_m) &&
4✔
1532
           ((std::isnan(rhs.bottom_clearance_m) && std::isnan(lhs.bottom_clearance_m)) ||
2✔
1533
            rhs.bottom_clearance_m == lhs.bottom_clearance_m) &&
6✔
1534
           (rhs.timestamp_us == lhs.timestamp_us);
4✔
1535
}
1536

NEW
1537
MAVSDK_PUBLIC std::ostream& operator<<(std::ostream& str, Telemetry::Altitude const& altitude)
×
1538
{
1539
    str << std::setprecision(15);
×
1540
    str << "altitude:" << '\n' << "{\n";
×
1541
    str << "    altitude_monotonic_m: " << altitude.altitude_monotonic_m << '\n';
×
1542
    str << "    altitude_amsl_m: " << altitude.altitude_amsl_m << '\n';
×
1543
    str << "    altitude_local_m: " << altitude.altitude_local_m << '\n';
×
1544
    str << "    altitude_relative_m: " << altitude.altitude_relative_m << '\n';
×
1545
    str << "    altitude_terrain_m: " << altitude.altitude_terrain_m << '\n';
×
1546
    str << "    bottom_clearance_m: " << altitude.bottom_clearance_m << '\n';
×
1547
    str << "    timestamp_us: " << altitude.timestamp_us << '\n';
×
1548
    str << '}';
×
1549
    return str;
×
1550
}
1551

NEW
1552
MAVSDK_PUBLIC bool operator==(const Telemetry::Wind& lhs, const Telemetry::Wind& rhs)
×
1553
{
1554
    return ((std::isnan(rhs.wind_x_ned_m_s) && std::isnan(lhs.wind_x_ned_m_s)) ||
×
1555
            rhs.wind_x_ned_m_s == lhs.wind_x_ned_m_s) &&
×
1556
           ((std::isnan(rhs.wind_y_ned_m_s) && std::isnan(lhs.wind_y_ned_m_s)) ||
×
1557
            rhs.wind_y_ned_m_s == lhs.wind_y_ned_m_s) &&
×
1558
           ((std::isnan(rhs.wind_z_ned_m_s) && std::isnan(lhs.wind_z_ned_m_s)) ||
×
1559
            rhs.wind_z_ned_m_s == lhs.wind_z_ned_m_s) &&
×
1560
           ((std::isnan(rhs.horizontal_variability_stddev_m_s) &&
×
1561
             std::isnan(lhs.horizontal_variability_stddev_m_s)) ||
×
1562
            rhs.horizontal_variability_stddev_m_s == lhs.horizontal_variability_stddev_m_s) &&
×
1563
           ((std::isnan(rhs.vertical_variability_stddev_m_s) &&
×
1564
             std::isnan(lhs.vertical_variability_stddev_m_s)) ||
×
1565
            rhs.vertical_variability_stddev_m_s == lhs.vertical_variability_stddev_m_s) &&
×
1566
           ((std::isnan(rhs.wind_altitude_msl_m) && std::isnan(lhs.wind_altitude_msl_m)) ||
×
1567
            rhs.wind_altitude_msl_m == lhs.wind_altitude_msl_m) &&
×
1568
           ((std::isnan(rhs.horizontal_wind_speed_accuracy_m_s) &&
×
1569
             std::isnan(lhs.horizontal_wind_speed_accuracy_m_s)) ||
×
1570
            rhs.horizontal_wind_speed_accuracy_m_s == lhs.horizontal_wind_speed_accuracy_m_s) &&
×
1571
           ((std::isnan(rhs.vertical_wind_speed_accuracy_m_s) &&
×
1572
             std::isnan(lhs.vertical_wind_speed_accuracy_m_s)) ||
×
1573
            rhs.vertical_wind_speed_accuracy_m_s == lhs.vertical_wind_speed_accuracy_m_s);
×
1574
}
1575

NEW
1576
MAVSDK_PUBLIC std::ostream& operator<<(std::ostream& str, Telemetry::Wind const& wind)
×
1577
{
1578
    str << std::setprecision(15);
×
1579
    str << "wind:" << '\n' << "{\n";
×
1580
    str << "    wind_x_ned_m_s: " << wind.wind_x_ned_m_s << '\n';
×
1581
    str << "    wind_y_ned_m_s: " << wind.wind_y_ned_m_s << '\n';
×
1582
    str << "    wind_z_ned_m_s: " << wind.wind_z_ned_m_s << '\n';
×
1583
    str << "    horizontal_variability_stddev_m_s: " << wind.horizontal_variability_stddev_m_s
×
1584
        << '\n';
×
1585
    str << "    vertical_variability_stddev_m_s: " << wind.vertical_variability_stddev_m_s << '\n';
×
1586
    str << "    wind_altitude_msl_m: " << wind.wind_altitude_msl_m << '\n';
×
1587
    str << "    horizontal_wind_speed_accuracy_m_s: " << wind.horizontal_wind_speed_accuracy_m_s
×
1588
        << '\n';
×
1589
    str << "    vertical_wind_speed_accuracy_m_s: " << wind.vertical_wind_speed_accuracy_m_s
×
1590
        << '\n';
×
1591
    str << '}';
×
1592
    return str;
×
1593
}
1594

NEW
1595
MAVSDK_PUBLIC std::ostream& operator<<(std::ostream& str, Telemetry::Result const& result)
×
1596
{
1597
    switch (result) {
×
1598
        case Telemetry::Result::Unknown:
×
1599
            return str << "Unknown";
×
1600
        case Telemetry::Result::Success:
×
1601
            return str << "Success";
×
1602
        case Telemetry::Result::NoSystem:
×
1603
            return str << "No System";
×
1604
        case Telemetry::Result::ConnectionError:
×
1605
            return str << "Connection Error";
×
1606
        case Telemetry::Result::Busy:
×
1607
            return str << "Busy";
×
1608
        case Telemetry::Result::CommandDenied:
×
1609
            return str << "Command Denied";
×
1610
        case Telemetry::Result::Timeout:
×
1611
            return str << "Timeout";
×
1612
        case Telemetry::Result::Unsupported:
×
1613
            return str << "Unsupported";
×
1614
        default:
×
1615
            return str << "Unknown";
×
1616
    }
1617
}
1618

NEW
1619
MAVSDK_PUBLIC std::ostream& operator<<(std::ostream& str, Telemetry::FixType const& fix_type)
×
1620
{
1621
    switch (fix_type) {
×
1622
        case Telemetry::FixType::NoGps:
×
1623
            return str << "No Gps";
×
1624
        case Telemetry::FixType::NoFix:
×
1625
            return str << "No Fix";
×
1626
        case Telemetry::FixType::Fix2D:
×
1627
            return str << "Fix 2D";
×
1628
        case Telemetry::FixType::Fix3D:
×
1629
            return str << "Fix 3D";
×
1630
        case Telemetry::FixType::FixDgps:
×
1631
            return str << "Fix Dgps";
×
1632
        case Telemetry::FixType::RtkFloat:
×
1633
            return str << "Rtk Float";
×
1634
        case Telemetry::FixType::RtkFixed:
×
1635
            return str << "Rtk Fixed";
×
1636
        default:
×
1637
            return str << "Unknown";
×
1638
    }
1639
}
1640

1641
MAVSDK_PUBLIC std::ostream&
NEW
1642
operator<<(std::ostream& str, Telemetry::BatteryFunction const& battery_function)
×
1643
{
1644
    switch (battery_function) {
×
1645
        case Telemetry::BatteryFunction::Unknown:
×
1646
            return str << "Unknown";
×
1647
        case Telemetry::BatteryFunction::All:
×
1648
            return str << "All";
×
1649
        case Telemetry::BatteryFunction::Propulsion:
×
1650
            return str << "Propulsion";
×
1651
        case Telemetry::BatteryFunction::Avionics:
×
1652
            return str << "Avionics";
×
1653
        case Telemetry::BatteryFunction::Payload:
×
1654
            return str << "Payload";
×
1655
        default:
×
1656
            return str << "Unknown";
×
1657
    }
1658
}
1659

NEW
1660
MAVSDK_PUBLIC std::ostream& operator<<(std::ostream& str, Telemetry::FlightMode const& flight_mode)
×
1661
{
1662
    switch (flight_mode) {
×
1663
        case Telemetry::FlightMode::Unknown:
×
1664
            return str << "Unknown";
×
1665
        case Telemetry::FlightMode::Ready:
×
1666
            return str << "Ready";
×
1667
        case Telemetry::FlightMode::Takeoff:
×
1668
            return str << "Takeoff";
×
1669
        case Telemetry::FlightMode::Hold:
×
1670
            return str << "Hold";
×
1671
        case Telemetry::FlightMode::Mission:
×
1672
            return str << "Mission";
×
1673
        case Telemetry::FlightMode::ReturnToLaunch:
×
1674
            return str << "Return To Launch";
×
1675
        case Telemetry::FlightMode::Land:
×
1676
            return str << "Land";
×
1677
        case Telemetry::FlightMode::Offboard:
×
1678
            return str << "Offboard";
×
1679
        case Telemetry::FlightMode::FollowMe:
×
1680
            return str << "Follow Me";
×
1681
        case Telemetry::FlightMode::Manual:
×
1682
            return str << "Manual";
×
1683
        case Telemetry::FlightMode::Altctl:
×
1684
            return str << "Altctl";
×
1685
        case Telemetry::FlightMode::Posctl:
×
1686
            return str << "Posctl";
×
1687
        case Telemetry::FlightMode::Acro:
×
1688
            return str << "Acro";
×
1689
        case Telemetry::FlightMode::Stabilized:
×
1690
            return str << "Stabilized";
×
1691
        case Telemetry::FlightMode::Rattitude:
×
1692
            return str << "Rattitude";
×
1693
        default:
×
1694
            return str << "Unknown";
×
1695
    }
1696
}
1697

1698
MAVSDK_PUBLIC std::ostream&
NEW
1699
operator<<(std::ostream& str, Telemetry::StatusTextType const& status_text_type)
×
1700
{
1701
    switch (status_text_type) {
×
1702
        case Telemetry::StatusTextType::Debug:
×
1703
            return str << "Debug";
×
1704
        case Telemetry::StatusTextType::Info:
×
1705
            return str << "Info";
×
1706
        case Telemetry::StatusTextType::Notice:
×
1707
            return str << "Notice";
×
1708
        case Telemetry::StatusTextType::Warning:
×
1709
            return str << "Warning";
×
1710
        case Telemetry::StatusTextType::Error:
×
1711
            return str << "Error";
×
1712
        case Telemetry::StatusTextType::Critical:
×
1713
            return str << "Critical";
×
1714
        case Telemetry::StatusTextType::Alert:
×
1715
            return str << "Alert";
×
1716
        case Telemetry::StatusTextType::Emergency:
×
1717
            return str << "Emergency";
×
1718
        default:
×
1719
            return str << "Unknown";
×
1720
    }
1721
}
1722

1723
MAVSDK_PUBLIC std::ostream&
NEW
1724
operator<<(std::ostream& str, Telemetry::LandedState const& landed_state)
×
1725
{
1726
    switch (landed_state) {
×
1727
        case Telemetry::LandedState::Unknown:
×
1728
            return str << "Unknown";
×
1729
        case Telemetry::LandedState::OnGround:
×
1730
            return str << "On Ground";
×
1731
        case Telemetry::LandedState::InAir:
×
1732
            return str << "In Air";
×
1733
        case Telemetry::LandedState::TakingOff:
×
1734
            return str << "Taking Off";
×
1735
        case Telemetry::LandedState::Landing:
×
1736
            return str << "Landing";
×
1737
        default:
×
1738
            return str << "Unknown";
×
1739
    }
1740
}
1741

NEW
1742
MAVSDK_PUBLIC std::ostream& operator<<(std::ostream& str, Telemetry::VtolState const& vtol_state)
×
1743
{
1744
    switch (vtol_state) {
×
1745
        case Telemetry::VtolState::Undefined:
×
1746
            return str << "Undefined";
×
1747
        case Telemetry::VtolState::TransitionToFw:
×
1748
            return str << "Transition To Fw";
×
1749
        case Telemetry::VtolState::TransitionToMc:
×
1750
            return str << "Transition To Mc";
×
1751
        case Telemetry::VtolState::Mc:
×
1752
            return str << "Mc";
×
1753
        case Telemetry::VtolState::Fw:
×
1754
            return str << "Fw";
×
1755
        default:
×
1756
            return str << "Unknown";
×
1757
    }
1758
}
1759

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