tarask
6 days ago 532005c6573d95199ce0ffbc33df4c7a0a4c3ef9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
#pragma once
// MESSAGE FW_SOARING_DATA PACKING
 
#define MAVLINK_MSG_ID_FW_SOARING_DATA 8011
 
 
typedef struct __mavlink_fw_soaring_data_t {
 uint64_t timestamp; /*< [ms] Timestamp*/
 uint64_t timestampModeChanged; /*< [ms] Timestamp since last mode change*/
 float xW; /*< [m/s] Thermal core updraft strength*/
 float xR; /*< [m] Thermal radius*/
 float xLat; /*< [deg] Thermal center latitude*/
 float xLon; /*< [deg] Thermal center longitude*/
 float VarW; /*<  Variance W*/
 float VarR; /*<  Variance R*/
 float VarLat; /*<  Variance Lat*/
 float VarLon; /*<  Variance Lon */
 float LoiterRadius; /*< [m] Suggested loiter radius*/
 float LoiterDirection; /*<  Suggested loiter direction*/
 float DistToSoarPoint; /*< [m] Distance to soar point*/
 float vSinkExp; /*< [m/s] Expected sink rate at current airspeed, roll and throttle*/
 float z1_LocalUpdraftSpeed; /*< [m/s] Measurement / updraft speed at current/local airplane position*/
 float z2_DeltaRoll; /*< [deg] Measurement / roll angle tracking error*/
 float z1_exp; /*<  Expected measurement 1*/
 float z2_exp; /*<  Expected measurement 2*/
 float ThermalGSNorth; /*< [m/s] Thermal drift (from estimator prediction step only)*/
 float ThermalGSEast; /*< [m/s] Thermal drift (from estimator prediction step only)*/
 float TSE_dot; /*< [m/s]  Total specific energy change (filtered)*/
 float DebugVar1; /*<   Debug variable 1*/
 float DebugVar2; /*<   Debug variable 2*/
 uint8_t ControlMode; /*<  Control Mode [-]*/
 uint8_t valid; /*<  Data valid [-]*/
} mavlink_fw_soaring_data_t;
 
#define MAVLINK_MSG_ID_FW_SOARING_DATA_LEN 102
#define MAVLINK_MSG_ID_FW_SOARING_DATA_MIN_LEN 102
#define MAVLINK_MSG_ID_8011_LEN 102
#define MAVLINK_MSG_ID_8011_MIN_LEN 102
 
#define MAVLINK_MSG_ID_FW_SOARING_DATA_CRC 20
#define MAVLINK_MSG_ID_8011_CRC 20
 
 
 
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_FW_SOARING_DATA { \
    8011, \
    "FW_SOARING_DATA", \
    25, \
    {  { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_fw_soaring_data_t, timestamp) }, \
         { "timestampModeChanged", NULL, MAVLINK_TYPE_UINT64_T, 0, 8, offsetof(mavlink_fw_soaring_data_t, timestampModeChanged) }, \
         { "xW", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_fw_soaring_data_t, xW) }, \
         { "xR", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_fw_soaring_data_t, xR) }, \
         { "xLat", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_fw_soaring_data_t, xLat) }, \
         { "xLon", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_fw_soaring_data_t, xLon) }, \
         { "VarW", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_fw_soaring_data_t, VarW) }, \
         { "VarR", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_fw_soaring_data_t, VarR) }, \
         { "VarLat", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_fw_soaring_data_t, VarLat) }, \
         { "VarLon", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_fw_soaring_data_t, VarLon) }, \
         { "LoiterRadius", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_fw_soaring_data_t, LoiterRadius) }, \
         { "LoiterDirection", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_fw_soaring_data_t, LoiterDirection) }, \
         { "DistToSoarPoint", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_fw_soaring_data_t, DistToSoarPoint) }, \
         { "vSinkExp", NULL, MAVLINK_TYPE_FLOAT, 0, 60, offsetof(mavlink_fw_soaring_data_t, vSinkExp) }, \
         { "z1_LocalUpdraftSpeed", NULL, MAVLINK_TYPE_FLOAT, 0, 64, offsetof(mavlink_fw_soaring_data_t, z1_LocalUpdraftSpeed) }, \
         { "z2_DeltaRoll", NULL, MAVLINK_TYPE_FLOAT, 0, 68, offsetof(mavlink_fw_soaring_data_t, z2_DeltaRoll) }, \
         { "z1_exp", NULL, MAVLINK_TYPE_FLOAT, 0, 72, offsetof(mavlink_fw_soaring_data_t, z1_exp) }, \
         { "z2_exp", NULL, MAVLINK_TYPE_FLOAT, 0, 76, offsetof(mavlink_fw_soaring_data_t, z2_exp) }, \
         { "ThermalGSNorth", NULL, MAVLINK_TYPE_FLOAT, 0, 80, offsetof(mavlink_fw_soaring_data_t, ThermalGSNorth) }, \
         { "ThermalGSEast", NULL, MAVLINK_TYPE_FLOAT, 0, 84, offsetof(mavlink_fw_soaring_data_t, ThermalGSEast) }, \
         { "TSE_dot", NULL, MAVLINK_TYPE_FLOAT, 0, 88, offsetof(mavlink_fw_soaring_data_t, TSE_dot) }, \
         { "DebugVar1", NULL, MAVLINK_TYPE_FLOAT, 0, 92, offsetof(mavlink_fw_soaring_data_t, DebugVar1) }, \
         { "DebugVar2", NULL, MAVLINK_TYPE_FLOAT, 0, 96, offsetof(mavlink_fw_soaring_data_t, DebugVar2) }, \
         { "ControlMode", NULL, MAVLINK_TYPE_UINT8_T, 0, 100, offsetof(mavlink_fw_soaring_data_t, ControlMode) }, \
         { "valid", NULL, MAVLINK_TYPE_UINT8_T, 0, 101, offsetof(mavlink_fw_soaring_data_t, valid) }, \
         } \
}
#else
#define MAVLINK_MESSAGE_INFO_FW_SOARING_DATA { \
    "FW_SOARING_DATA", \
    25, \
    {  { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_fw_soaring_data_t, timestamp) }, \
         { "timestampModeChanged", NULL, MAVLINK_TYPE_UINT64_T, 0, 8, offsetof(mavlink_fw_soaring_data_t, timestampModeChanged) }, \
         { "xW", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_fw_soaring_data_t, xW) }, \
         { "xR", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_fw_soaring_data_t, xR) }, \
         { "xLat", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_fw_soaring_data_t, xLat) }, \
         { "xLon", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_fw_soaring_data_t, xLon) }, \
         { "VarW", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_fw_soaring_data_t, VarW) }, \
         { "VarR", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_fw_soaring_data_t, VarR) }, \
         { "VarLat", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_fw_soaring_data_t, VarLat) }, \
         { "VarLon", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_fw_soaring_data_t, VarLon) }, \
         { "LoiterRadius", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_fw_soaring_data_t, LoiterRadius) }, \
         { "LoiterDirection", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_fw_soaring_data_t, LoiterDirection) }, \
         { "DistToSoarPoint", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_fw_soaring_data_t, DistToSoarPoint) }, \
         { "vSinkExp", NULL, MAVLINK_TYPE_FLOAT, 0, 60, offsetof(mavlink_fw_soaring_data_t, vSinkExp) }, \
         { "z1_LocalUpdraftSpeed", NULL, MAVLINK_TYPE_FLOAT, 0, 64, offsetof(mavlink_fw_soaring_data_t, z1_LocalUpdraftSpeed) }, \
         { "z2_DeltaRoll", NULL, MAVLINK_TYPE_FLOAT, 0, 68, offsetof(mavlink_fw_soaring_data_t, z2_DeltaRoll) }, \
         { "z1_exp", NULL, MAVLINK_TYPE_FLOAT, 0, 72, offsetof(mavlink_fw_soaring_data_t, z1_exp) }, \
         { "z2_exp", NULL, MAVLINK_TYPE_FLOAT, 0, 76, offsetof(mavlink_fw_soaring_data_t, z2_exp) }, \
         { "ThermalGSNorth", NULL, MAVLINK_TYPE_FLOAT, 0, 80, offsetof(mavlink_fw_soaring_data_t, ThermalGSNorth) }, \
         { "ThermalGSEast", NULL, MAVLINK_TYPE_FLOAT, 0, 84, offsetof(mavlink_fw_soaring_data_t, ThermalGSEast) }, \
         { "TSE_dot", NULL, MAVLINK_TYPE_FLOAT, 0, 88, offsetof(mavlink_fw_soaring_data_t, TSE_dot) }, \
         { "DebugVar1", NULL, MAVLINK_TYPE_FLOAT, 0, 92, offsetof(mavlink_fw_soaring_data_t, DebugVar1) }, \
         { "DebugVar2", NULL, MAVLINK_TYPE_FLOAT, 0, 96, offsetof(mavlink_fw_soaring_data_t, DebugVar2) }, \
         { "ControlMode", NULL, MAVLINK_TYPE_UINT8_T, 0, 100, offsetof(mavlink_fw_soaring_data_t, ControlMode) }, \
         { "valid", NULL, MAVLINK_TYPE_UINT8_T, 0, 101, offsetof(mavlink_fw_soaring_data_t, valid) }, \
         } \
}
#endif
 
/**
 * @brief Pack a fw_soaring_data message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 *
 * @param timestamp [ms] Timestamp
 * @param timestampModeChanged [ms] Timestamp since last mode change
 * @param xW [m/s] Thermal core updraft strength
 * @param xR [m] Thermal radius
 * @param xLat [deg] Thermal center latitude
 * @param xLon [deg] Thermal center longitude
 * @param VarW  Variance W
 * @param VarR  Variance R
 * @param VarLat  Variance Lat
 * @param VarLon  Variance Lon 
 * @param LoiterRadius [m] Suggested loiter radius
 * @param LoiterDirection  Suggested loiter direction
 * @param DistToSoarPoint [m] Distance to soar point
 * @param vSinkExp [m/s] Expected sink rate at current airspeed, roll and throttle
 * @param z1_LocalUpdraftSpeed [m/s] Measurement / updraft speed at current/local airplane position
 * @param z2_DeltaRoll [deg] Measurement / roll angle tracking error
 * @param z1_exp  Expected measurement 1
 * @param z2_exp  Expected measurement 2
 * @param ThermalGSNorth [m/s] Thermal drift (from estimator prediction step only)
 * @param ThermalGSEast [m/s] Thermal drift (from estimator prediction step only)
 * @param TSE_dot [m/s]  Total specific energy change (filtered)
 * @param DebugVar1   Debug variable 1
 * @param DebugVar2   Debug variable 2
 * @param ControlMode  Control Mode [-]
 * @param valid  Data valid [-]
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_fw_soaring_data_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
                               uint64_t timestamp, uint64_t timestampModeChanged, float xW, float xR, float xLat, float xLon, float VarW, float VarR, float VarLat, float VarLon, float LoiterRadius, float LoiterDirection, float DistToSoarPoint, float vSinkExp, float z1_LocalUpdraftSpeed, float z2_DeltaRoll, float z1_exp, float z2_exp, float ThermalGSNorth, float ThermalGSEast, float TSE_dot, float DebugVar1, float DebugVar2, uint8_t ControlMode, uint8_t valid)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_FW_SOARING_DATA_LEN];
    _mav_put_uint64_t(buf, 0, timestamp);
    _mav_put_uint64_t(buf, 8, timestampModeChanged);
    _mav_put_float(buf, 16, xW);
    _mav_put_float(buf, 20, xR);
    _mav_put_float(buf, 24, xLat);
    _mav_put_float(buf, 28, xLon);
    _mav_put_float(buf, 32, VarW);
    _mav_put_float(buf, 36, VarR);
    _mav_put_float(buf, 40, VarLat);
    _mav_put_float(buf, 44, VarLon);
    _mav_put_float(buf, 48, LoiterRadius);
    _mav_put_float(buf, 52, LoiterDirection);
    _mav_put_float(buf, 56, DistToSoarPoint);
    _mav_put_float(buf, 60, vSinkExp);
    _mav_put_float(buf, 64, z1_LocalUpdraftSpeed);
    _mav_put_float(buf, 68, z2_DeltaRoll);
    _mav_put_float(buf, 72, z1_exp);
    _mav_put_float(buf, 76, z2_exp);
    _mav_put_float(buf, 80, ThermalGSNorth);
    _mav_put_float(buf, 84, ThermalGSEast);
    _mav_put_float(buf, 88, TSE_dot);
    _mav_put_float(buf, 92, DebugVar1);
    _mav_put_float(buf, 96, DebugVar2);
    _mav_put_uint8_t(buf, 100, ControlMode);
    _mav_put_uint8_t(buf, 101, valid);
 
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN);
#else
    mavlink_fw_soaring_data_t packet;
    packet.timestamp = timestamp;
    packet.timestampModeChanged = timestampModeChanged;
    packet.xW = xW;
    packet.xR = xR;
    packet.xLat = xLat;
    packet.xLon = xLon;
    packet.VarW = VarW;
    packet.VarR = VarR;
    packet.VarLat = VarLat;
    packet.VarLon = VarLon;
    packet.LoiterRadius = LoiterRadius;
    packet.LoiterDirection = LoiterDirection;
    packet.DistToSoarPoint = DistToSoarPoint;
    packet.vSinkExp = vSinkExp;
    packet.z1_LocalUpdraftSpeed = z1_LocalUpdraftSpeed;
    packet.z2_DeltaRoll = z2_DeltaRoll;
    packet.z1_exp = z1_exp;
    packet.z2_exp = z2_exp;
    packet.ThermalGSNorth = ThermalGSNorth;
    packet.ThermalGSEast = ThermalGSEast;
    packet.TSE_dot = TSE_dot;
    packet.DebugVar1 = DebugVar1;
    packet.DebugVar2 = DebugVar2;
    packet.ControlMode = ControlMode;
    packet.valid = valid;
 
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN);
#endif
 
    msg->msgid = MAVLINK_MSG_ID_FW_SOARING_DATA;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FW_SOARING_DATA_MIN_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_CRC);
}
 
/**
 * @brief Pack a fw_soaring_data message on a channel
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param timestamp [ms] Timestamp
 * @param timestampModeChanged [ms] Timestamp since last mode change
 * @param xW [m/s] Thermal core updraft strength
 * @param xR [m] Thermal radius
 * @param xLat [deg] Thermal center latitude
 * @param xLon [deg] Thermal center longitude
 * @param VarW  Variance W
 * @param VarR  Variance R
 * @param VarLat  Variance Lat
 * @param VarLon  Variance Lon 
 * @param LoiterRadius [m] Suggested loiter radius
 * @param LoiterDirection  Suggested loiter direction
 * @param DistToSoarPoint [m] Distance to soar point
 * @param vSinkExp [m/s] Expected sink rate at current airspeed, roll and throttle
 * @param z1_LocalUpdraftSpeed [m/s] Measurement / updraft speed at current/local airplane position
 * @param z2_DeltaRoll [deg] Measurement / roll angle tracking error
 * @param z1_exp  Expected measurement 1
 * @param z2_exp  Expected measurement 2
 * @param ThermalGSNorth [m/s] Thermal drift (from estimator prediction step only)
 * @param ThermalGSEast [m/s] Thermal drift (from estimator prediction step only)
 * @param TSE_dot [m/s]  Total specific energy change (filtered)
 * @param DebugVar1   Debug variable 1
 * @param DebugVar2   Debug variable 2
 * @param ControlMode  Control Mode [-]
 * @param valid  Data valid [-]
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_fw_soaring_data_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
                               mavlink_message_t* msg,
                                   uint64_t timestamp,uint64_t timestampModeChanged,float xW,float xR,float xLat,float xLon,float VarW,float VarR,float VarLat,float VarLon,float LoiterRadius,float LoiterDirection,float DistToSoarPoint,float vSinkExp,float z1_LocalUpdraftSpeed,float z2_DeltaRoll,float z1_exp,float z2_exp,float ThermalGSNorth,float ThermalGSEast,float TSE_dot,float DebugVar1,float DebugVar2,uint8_t ControlMode,uint8_t valid)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_FW_SOARING_DATA_LEN];
    _mav_put_uint64_t(buf, 0, timestamp);
    _mav_put_uint64_t(buf, 8, timestampModeChanged);
    _mav_put_float(buf, 16, xW);
    _mav_put_float(buf, 20, xR);
    _mav_put_float(buf, 24, xLat);
    _mav_put_float(buf, 28, xLon);
    _mav_put_float(buf, 32, VarW);
    _mav_put_float(buf, 36, VarR);
    _mav_put_float(buf, 40, VarLat);
    _mav_put_float(buf, 44, VarLon);
    _mav_put_float(buf, 48, LoiterRadius);
    _mav_put_float(buf, 52, LoiterDirection);
    _mav_put_float(buf, 56, DistToSoarPoint);
    _mav_put_float(buf, 60, vSinkExp);
    _mav_put_float(buf, 64, z1_LocalUpdraftSpeed);
    _mav_put_float(buf, 68, z2_DeltaRoll);
    _mav_put_float(buf, 72, z1_exp);
    _mav_put_float(buf, 76, z2_exp);
    _mav_put_float(buf, 80, ThermalGSNorth);
    _mav_put_float(buf, 84, ThermalGSEast);
    _mav_put_float(buf, 88, TSE_dot);
    _mav_put_float(buf, 92, DebugVar1);
    _mav_put_float(buf, 96, DebugVar2);
    _mav_put_uint8_t(buf, 100, ControlMode);
    _mav_put_uint8_t(buf, 101, valid);
 
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN);
#else
    mavlink_fw_soaring_data_t packet;
    packet.timestamp = timestamp;
    packet.timestampModeChanged = timestampModeChanged;
    packet.xW = xW;
    packet.xR = xR;
    packet.xLat = xLat;
    packet.xLon = xLon;
    packet.VarW = VarW;
    packet.VarR = VarR;
    packet.VarLat = VarLat;
    packet.VarLon = VarLon;
    packet.LoiterRadius = LoiterRadius;
    packet.LoiterDirection = LoiterDirection;
    packet.DistToSoarPoint = DistToSoarPoint;
    packet.vSinkExp = vSinkExp;
    packet.z1_LocalUpdraftSpeed = z1_LocalUpdraftSpeed;
    packet.z2_DeltaRoll = z2_DeltaRoll;
    packet.z1_exp = z1_exp;
    packet.z2_exp = z2_exp;
    packet.ThermalGSNorth = ThermalGSNorth;
    packet.ThermalGSEast = ThermalGSEast;
    packet.TSE_dot = TSE_dot;
    packet.DebugVar1 = DebugVar1;
    packet.DebugVar2 = DebugVar2;
    packet.ControlMode = ControlMode;
    packet.valid = valid;
 
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN);
#endif
 
    msg->msgid = MAVLINK_MSG_ID_FW_SOARING_DATA;
    return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FW_SOARING_DATA_MIN_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_CRC);
}
 
/**
 * @brief Encode a fw_soaring_data struct
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 * @param fw_soaring_data C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_fw_soaring_data_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_fw_soaring_data_t* fw_soaring_data)
{
    return mavlink_msg_fw_soaring_data_pack(system_id, component_id, msg, fw_soaring_data->timestamp, fw_soaring_data->timestampModeChanged, fw_soaring_data->xW, fw_soaring_data->xR, fw_soaring_data->xLat, fw_soaring_data->xLon, fw_soaring_data->VarW, fw_soaring_data->VarR, fw_soaring_data->VarLat, fw_soaring_data->VarLon, fw_soaring_data->LoiterRadius, fw_soaring_data->LoiterDirection, fw_soaring_data->DistToSoarPoint, fw_soaring_data->vSinkExp, fw_soaring_data->z1_LocalUpdraftSpeed, fw_soaring_data->z2_DeltaRoll, fw_soaring_data->z1_exp, fw_soaring_data->z2_exp, fw_soaring_data->ThermalGSNorth, fw_soaring_data->ThermalGSEast, fw_soaring_data->TSE_dot, fw_soaring_data->DebugVar1, fw_soaring_data->DebugVar2, fw_soaring_data->ControlMode, fw_soaring_data->valid);
}
 
/**
 * @brief Encode a fw_soaring_data struct on a channel
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param fw_soaring_data C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_fw_soaring_data_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_fw_soaring_data_t* fw_soaring_data)
{
    return mavlink_msg_fw_soaring_data_pack_chan(system_id, component_id, chan, msg, fw_soaring_data->timestamp, fw_soaring_data->timestampModeChanged, fw_soaring_data->xW, fw_soaring_data->xR, fw_soaring_data->xLat, fw_soaring_data->xLon, fw_soaring_data->VarW, fw_soaring_data->VarR, fw_soaring_data->VarLat, fw_soaring_data->VarLon, fw_soaring_data->LoiterRadius, fw_soaring_data->LoiterDirection, fw_soaring_data->DistToSoarPoint, fw_soaring_data->vSinkExp, fw_soaring_data->z1_LocalUpdraftSpeed, fw_soaring_data->z2_DeltaRoll, fw_soaring_data->z1_exp, fw_soaring_data->z2_exp, fw_soaring_data->ThermalGSNorth, fw_soaring_data->ThermalGSEast, fw_soaring_data->TSE_dot, fw_soaring_data->DebugVar1, fw_soaring_data->DebugVar2, fw_soaring_data->ControlMode, fw_soaring_data->valid);
}
 
/**
 * @brief Send a fw_soaring_data message
 * @param chan MAVLink channel to send the message
 *
 * @param timestamp [ms] Timestamp
 * @param timestampModeChanged [ms] Timestamp since last mode change
 * @param xW [m/s] Thermal core updraft strength
 * @param xR [m] Thermal radius
 * @param xLat [deg] Thermal center latitude
 * @param xLon [deg] Thermal center longitude
 * @param VarW  Variance W
 * @param VarR  Variance R
 * @param VarLat  Variance Lat
 * @param VarLon  Variance Lon 
 * @param LoiterRadius [m] Suggested loiter radius
 * @param LoiterDirection  Suggested loiter direction
 * @param DistToSoarPoint [m] Distance to soar point
 * @param vSinkExp [m/s] Expected sink rate at current airspeed, roll and throttle
 * @param z1_LocalUpdraftSpeed [m/s] Measurement / updraft speed at current/local airplane position
 * @param z2_DeltaRoll [deg] Measurement / roll angle tracking error
 * @param z1_exp  Expected measurement 1
 * @param z2_exp  Expected measurement 2
 * @param ThermalGSNorth [m/s] Thermal drift (from estimator prediction step only)
 * @param ThermalGSEast [m/s] Thermal drift (from estimator prediction step only)
 * @param TSE_dot [m/s]  Total specific energy change (filtered)
 * @param DebugVar1   Debug variable 1
 * @param DebugVar2   Debug variable 2
 * @param ControlMode  Control Mode [-]
 * @param valid  Data valid [-]
 */
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_fw_soaring_data_send(mavlink_channel_t chan, uint64_t timestamp, uint64_t timestampModeChanged, float xW, float xR, float xLat, float xLon, float VarW, float VarR, float VarLat, float VarLon, float LoiterRadius, float LoiterDirection, float DistToSoarPoint, float vSinkExp, float z1_LocalUpdraftSpeed, float z2_DeltaRoll, float z1_exp, float z2_exp, float ThermalGSNorth, float ThermalGSEast, float TSE_dot, float DebugVar1, float DebugVar2, uint8_t ControlMode, uint8_t valid)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_FW_SOARING_DATA_LEN];
    _mav_put_uint64_t(buf, 0, timestamp);
    _mav_put_uint64_t(buf, 8, timestampModeChanged);
    _mav_put_float(buf, 16, xW);
    _mav_put_float(buf, 20, xR);
    _mav_put_float(buf, 24, xLat);
    _mav_put_float(buf, 28, xLon);
    _mav_put_float(buf, 32, VarW);
    _mav_put_float(buf, 36, VarR);
    _mav_put_float(buf, 40, VarLat);
    _mav_put_float(buf, 44, VarLon);
    _mav_put_float(buf, 48, LoiterRadius);
    _mav_put_float(buf, 52, LoiterDirection);
    _mav_put_float(buf, 56, DistToSoarPoint);
    _mav_put_float(buf, 60, vSinkExp);
    _mav_put_float(buf, 64, z1_LocalUpdraftSpeed);
    _mav_put_float(buf, 68, z2_DeltaRoll);
    _mav_put_float(buf, 72, z1_exp);
    _mav_put_float(buf, 76, z2_exp);
    _mav_put_float(buf, 80, ThermalGSNorth);
    _mav_put_float(buf, 84, ThermalGSEast);
    _mav_put_float(buf, 88, TSE_dot);
    _mav_put_float(buf, 92, DebugVar1);
    _mav_put_float(buf, 96, DebugVar2);
    _mav_put_uint8_t(buf, 100, ControlMode);
    _mav_put_uint8_t(buf, 101, valid);
 
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FW_SOARING_DATA, buf, MAVLINK_MSG_ID_FW_SOARING_DATA_MIN_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_CRC);
#else
    mavlink_fw_soaring_data_t packet;
    packet.timestamp = timestamp;
    packet.timestampModeChanged = timestampModeChanged;
    packet.xW = xW;
    packet.xR = xR;
    packet.xLat = xLat;
    packet.xLon = xLon;
    packet.VarW = VarW;
    packet.VarR = VarR;
    packet.VarLat = VarLat;
    packet.VarLon = VarLon;
    packet.LoiterRadius = LoiterRadius;
    packet.LoiterDirection = LoiterDirection;
    packet.DistToSoarPoint = DistToSoarPoint;
    packet.vSinkExp = vSinkExp;
    packet.z1_LocalUpdraftSpeed = z1_LocalUpdraftSpeed;
    packet.z2_DeltaRoll = z2_DeltaRoll;
    packet.z1_exp = z1_exp;
    packet.z2_exp = z2_exp;
    packet.ThermalGSNorth = ThermalGSNorth;
    packet.ThermalGSEast = ThermalGSEast;
    packet.TSE_dot = TSE_dot;
    packet.DebugVar1 = DebugVar1;
    packet.DebugVar2 = DebugVar2;
    packet.ControlMode = ControlMode;
    packet.valid = valid;
 
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FW_SOARING_DATA, (const char *)&packet, MAVLINK_MSG_ID_FW_SOARING_DATA_MIN_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_CRC);
#endif
}
 
/**
 * @brief Send a fw_soaring_data message
 * @param chan MAVLink channel to send the message
 * @param struct The MAVLink struct to serialize
 */
static inline void mavlink_msg_fw_soaring_data_send_struct(mavlink_channel_t chan, const mavlink_fw_soaring_data_t* fw_soaring_data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    mavlink_msg_fw_soaring_data_send(chan, fw_soaring_data->timestamp, fw_soaring_data->timestampModeChanged, fw_soaring_data->xW, fw_soaring_data->xR, fw_soaring_data->xLat, fw_soaring_data->xLon, fw_soaring_data->VarW, fw_soaring_data->VarR, fw_soaring_data->VarLat, fw_soaring_data->VarLon, fw_soaring_data->LoiterRadius, fw_soaring_data->LoiterDirection, fw_soaring_data->DistToSoarPoint, fw_soaring_data->vSinkExp, fw_soaring_data->z1_LocalUpdraftSpeed, fw_soaring_data->z2_DeltaRoll, fw_soaring_data->z1_exp, fw_soaring_data->z2_exp, fw_soaring_data->ThermalGSNorth, fw_soaring_data->ThermalGSEast, fw_soaring_data->TSE_dot, fw_soaring_data->DebugVar1, fw_soaring_data->DebugVar2, fw_soaring_data->ControlMode, fw_soaring_data->valid);
#else
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FW_SOARING_DATA, (const char *)fw_soaring_data, MAVLINK_MSG_ID_FW_SOARING_DATA_MIN_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_CRC);
#endif
}
 
#if MAVLINK_MSG_ID_FW_SOARING_DATA_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
  This variant of _send() can be used to save stack space by re-using
  memory from the receive buffer.  The caller provides a
  mavlink_message_t which is the size of a full mavlink message. This
  is usually the receive buffer for the channel, and allows a reply to an
  incoming message with minimum stack space usage.
 */
static inline void mavlink_msg_fw_soaring_data_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,  uint64_t timestamp, uint64_t timestampModeChanged, float xW, float xR, float xLat, float xLon, float VarW, float VarR, float VarLat, float VarLon, float LoiterRadius, float LoiterDirection, float DistToSoarPoint, float vSinkExp, float z1_LocalUpdraftSpeed, float z2_DeltaRoll, float z1_exp, float z2_exp, float ThermalGSNorth, float ThermalGSEast, float TSE_dot, float DebugVar1, float DebugVar2, uint8_t ControlMode, uint8_t valid)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char *buf = (char *)msgbuf;
    _mav_put_uint64_t(buf, 0, timestamp);
    _mav_put_uint64_t(buf, 8, timestampModeChanged);
    _mav_put_float(buf, 16, xW);
    _mav_put_float(buf, 20, xR);
    _mav_put_float(buf, 24, xLat);
    _mav_put_float(buf, 28, xLon);
    _mav_put_float(buf, 32, VarW);
    _mav_put_float(buf, 36, VarR);
    _mav_put_float(buf, 40, VarLat);
    _mav_put_float(buf, 44, VarLon);
    _mav_put_float(buf, 48, LoiterRadius);
    _mav_put_float(buf, 52, LoiterDirection);
    _mav_put_float(buf, 56, DistToSoarPoint);
    _mav_put_float(buf, 60, vSinkExp);
    _mav_put_float(buf, 64, z1_LocalUpdraftSpeed);
    _mav_put_float(buf, 68, z2_DeltaRoll);
    _mav_put_float(buf, 72, z1_exp);
    _mav_put_float(buf, 76, z2_exp);
    _mav_put_float(buf, 80, ThermalGSNorth);
    _mav_put_float(buf, 84, ThermalGSEast);
    _mav_put_float(buf, 88, TSE_dot);
    _mav_put_float(buf, 92, DebugVar1);
    _mav_put_float(buf, 96, DebugVar2);
    _mav_put_uint8_t(buf, 100, ControlMode);
    _mav_put_uint8_t(buf, 101, valid);
 
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FW_SOARING_DATA, buf, MAVLINK_MSG_ID_FW_SOARING_DATA_MIN_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_CRC);
#else
    mavlink_fw_soaring_data_t *packet = (mavlink_fw_soaring_data_t *)msgbuf;
    packet->timestamp = timestamp;
    packet->timestampModeChanged = timestampModeChanged;
    packet->xW = xW;
    packet->xR = xR;
    packet->xLat = xLat;
    packet->xLon = xLon;
    packet->VarW = VarW;
    packet->VarR = VarR;
    packet->VarLat = VarLat;
    packet->VarLon = VarLon;
    packet->LoiterRadius = LoiterRadius;
    packet->LoiterDirection = LoiterDirection;
    packet->DistToSoarPoint = DistToSoarPoint;
    packet->vSinkExp = vSinkExp;
    packet->z1_LocalUpdraftSpeed = z1_LocalUpdraftSpeed;
    packet->z2_DeltaRoll = z2_DeltaRoll;
    packet->z1_exp = z1_exp;
    packet->z2_exp = z2_exp;
    packet->ThermalGSNorth = ThermalGSNorth;
    packet->ThermalGSEast = ThermalGSEast;
    packet->TSE_dot = TSE_dot;
    packet->DebugVar1 = DebugVar1;
    packet->DebugVar2 = DebugVar2;
    packet->ControlMode = ControlMode;
    packet->valid = valid;
 
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FW_SOARING_DATA, (const char *)packet, MAVLINK_MSG_ID_FW_SOARING_DATA_MIN_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_CRC);
#endif
}
#endif
 
#endif
 
// MESSAGE FW_SOARING_DATA UNPACKING
 
 
/**
 * @brief Get field timestamp from fw_soaring_data message
 *
 * @return [ms] Timestamp
 */
static inline uint64_t mavlink_msg_fw_soaring_data_get_timestamp(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint64_t(msg,  0);
}
 
/**
 * @brief Get field timestampModeChanged from fw_soaring_data message
 *
 * @return [ms] Timestamp since last mode change
 */
static inline uint64_t mavlink_msg_fw_soaring_data_get_timestampModeChanged(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint64_t(msg,  8);
}
 
/**
 * @brief Get field xW from fw_soaring_data message
 *
 * @return [m/s] Thermal core updraft strength
 */
static inline float mavlink_msg_fw_soaring_data_get_xW(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  16);
}
 
/**
 * @brief Get field xR from fw_soaring_data message
 *
 * @return [m] Thermal radius
 */
static inline float mavlink_msg_fw_soaring_data_get_xR(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  20);
}
 
/**
 * @brief Get field xLat from fw_soaring_data message
 *
 * @return [deg] Thermal center latitude
 */
static inline float mavlink_msg_fw_soaring_data_get_xLat(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  24);
}
 
/**
 * @brief Get field xLon from fw_soaring_data message
 *
 * @return [deg] Thermal center longitude
 */
static inline float mavlink_msg_fw_soaring_data_get_xLon(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  28);
}
 
/**
 * @brief Get field VarW from fw_soaring_data message
 *
 * @return  Variance W
 */
static inline float mavlink_msg_fw_soaring_data_get_VarW(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  32);
}
 
/**
 * @brief Get field VarR from fw_soaring_data message
 *
 * @return  Variance R
 */
static inline float mavlink_msg_fw_soaring_data_get_VarR(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  36);
}
 
/**
 * @brief Get field VarLat from fw_soaring_data message
 *
 * @return  Variance Lat
 */
static inline float mavlink_msg_fw_soaring_data_get_VarLat(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  40);
}
 
/**
 * @brief Get field VarLon from fw_soaring_data message
 *
 * @return  Variance Lon 
 */
static inline float mavlink_msg_fw_soaring_data_get_VarLon(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  44);
}
 
/**
 * @brief Get field LoiterRadius from fw_soaring_data message
 *
 * @return [m] Suggested loiter radius
 */
static inline float mavlink_msg_fw_soaring_data_get_LoiterRadius(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  48);
}
 
/**
 * @brief Get field LoiterDirection from fw_soaring_data message
 *
 * @return  Suggested loiter direction
 */
static inline float mavlink_msg_fw_soaring_data_get_LoiterDirection(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  52);
}
 
/**
 * @brief Get field DistToSoarPoint from fw_soaring_data message
 *
 * @return [m] Distance to soar point
 */
static inline float mavlink_msg_fw_soaring_data_get_DistToSoarPoint(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  56);
}
 
/**
 * @brief Get field vSinkExp from fw_soaring_data message
 *
 * @return [m/s] Expected sink rate at current airspeed, roll and throttle
 */
static inline float mavlink_msg_fw_soaring_data_get_vSinkExp(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  60);
}
 
/**
 * @brief Get field z1_LocalUpdraftSpeed from fw_soaring_data message
 *
 * @return [m/s] Measurement / updraft speed at current/local airplane position
 */
static inline float mavlink_msg_fw_soaring_data_get_z1_LocalUpdraftSpeed(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  64);
}
 
/**
 * @brief Get field z2_DeltaRoll from fw_soaring_data message
 *
 * @return [deg] Measurement / roll angle tracking error
 */
static inline float mavlink_msg_fw_soaring_data_get_z2_DeltaRoll(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  68);
}
 
/**
 * @brief Get field z1_exp from fw_soaring_data message
 *
 * @return  Expected measurement 1
 */
static inline float mavlink_msg_fw_soaring_data_get_z1_exp(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  72);
}
 
/**
 * @brief Get field z2_exp from fw_soaring_data message
 *
 * @return  Expected measurement 2
 */
static inline float mavlink_msg_fw_soaring_data_get_z2_exp(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  76);
}
 
/**
 * @brief Get field ThermalGSNorth from fw_soaring_data message
 *
 * @return [m/s] Thermal drift (from estimator prediction step only)
 */
static inline float mavlink_msg_fw_soaring_data_get_ThermalGSNorth(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  80);
}
 
/**
 * @brief Get field ThermalGSEast from fw_soaring_data message
 *
 * @return [m/s] Thermal drift (from estimator prediction step only)
 */
static inline float mavlink_msg_fw_soaring_data_get_ThermalGSEast(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  84);
}
 
/**
 * @brief Get field TSE_dot from fw_soaring_data message
 *
 * @return [m/s]  Total specific energy change (filtered)
 */
static inline float mavlink_msg_fw_soaring_data_get_TSE_dot(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  88);
}
 
/**
 * @brief Get field DebugVar1 from fw_soaring_data message
 *
 * @return   Debug variable 1
 */
static inline float mavlink_msg_fw_soaring_data_get_DebugVar1(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  92);
}
 
/**
 * @brief Get field DebugVar2 from fw_soaring_data message
 *
 * @return   Debug variable 2
 */
static inline float mavlink_msg_fw_soaring_data_get_DebugVar2(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  96);
}
 
/**
 * @brief Get field ControlMode from fw_soaring_data message
 *
 * @return  Control Mode [-]
 */
static inline uint8_t mavlink_msg_fw_soaring_data_get_ControlMode(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  100);
}
 
/**
 * @brief Get field valid from fw_soaring_data message
 *
 * @return  Data valid [-]
 */
static inline uint8_t mavlink_msg_fw_soaring_data_get_valid(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  101);
}
 
/**
 * @brief Decode a fw_soaring_data message into a struct
 *
 * @param msg The message to decode
 * @param fw_soaring_data C-struct to decode the message contents into
 */
static inline void mavlink_msg_fw_soaring_data_decode(const mavlink_message_t* msg, mavlink_fw_soaring_data_t* fw_soaring_data)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    fw_soaring_data->timestamp = mavlink_msg_fw_soaring_data_get_timestamp(msg);
    fw_soaring_data->timestampModeChanged = mavlink_msg_fw_soaring_data_get_timestampModeChanged(msg);
    fw_soaring_data->xW = mavlink_msg_fw_soaring_data_get_xW(msg);
    fw_soaring_data->xR = mavlink_msg_fw_soaring_data_get_xR(msg);
    fw_soaring_data->xLat = mavlink_msg_fw_soaring_data_get_xLat(msg);
    fw_soaring_data->xLon = mavlink_msg_fw_soaring_data_get_xLon(msg);
    fw_soaring_data->VarW = mavlink_msg_fw_soaring_data_get_VarW(msg);
    fw_soaring_data->VarR = mavlink_msg_fw_soaring_data_get_VarR(msg);
    fw_soaring_data->VarLat = mavlink_msg_fw_soaring_data_get_VarLat(msg);
    fw_soaring_data->VarLon = mavlink_msg_fw_soaring_data_get_VarLon(msg);
    fw_soaring_data->LoiterRadius = mavlink_msg_fw_soaring_data_get_LoiterRadius(msg);
    fw_soaring_data->LoiterDirection = mavlink_msg_fw_soaring_data_get_LoiterDirection(msg);
    fw_soaring_data->DistToSoarPoint = mavlink_msg_fw_soaring_data_get_DistToSoarPoint(msg);
    fw_soaring_data->vSinkExp = mavlink_msg_fw_soaring_data_get_vSinkExp(msg);
    fw_soaring_data->z1_LocalUpdraftSpeed = mavlink_msg_fw_soaring_data_get_z1_LocalUpdraftSpeed(msg);
    fw_soaring_data->z2_DeltaRoll = mavlink_msg_fw_soaring_data_get_z2_DeltaRoll(msg);
    fw_soaring_data->z1_exp = mavlink_msg_fw_soaring_data_get_z1_exp(msg);
    fw_soaring_data->z2_exp = mavlink_msg_fw_soaring_data_get_z2_exp(msg);
    fw_soaring_data->ThermalGSNorth = mavlink_msg_fw_soaring_data_get_ThermalGSNorth(msg);
    fw_soaring_data->ThermalGSEast = mavlink_msg_fw_soaring_data_get_ThermalGSEast(msg);
    fw_soaring_data->TSE_dot = mavlink_msg_fw_soaring_data_get_TSE_dot(msg);
    fw_soaring_data->DebugVar1 = mavlink_msg_fw_soaring_data_get_DebugVar1(msg);
    fw_soaring_data->DebugVar2 = mavlink_msg_fw_soaring_data_get_DebugVar2(msg);
    fw_soaring_data->ControlMode = mavlink_msg_fw_soaring_data_get_ControlMode(msg);
    fw_soaring_data->valid = mavlink_msg_fw_soaring_data_get_valid(msg);
#else
        uint8_t len = msg->len < MAVLINK_MSG_ID_FW_SOARING_DATA_LEN? msg->len : MAVLINK_MSG_ID_FW_SOARING_DATA_LEN;
        memset(fw_soaring_data, 0, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN);
    memcpy(fw_soaring_data, _MAV_PAYLOAD(msg), len);
#endif
}