-
Notifications
You must be signed in to change notification settings - Fork 0
/
MAVLink20.js
13081 lines (10589 loc) · 740 KB
/
MAVLink20.js
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
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
MAVLink protocol implementation for node.js (auto-generated by mavgen_javascript.py)
Generated from: ardupilotmega.xml,common.xml,uAvionix.xml,icarous.xml,minimal.xml
Note: this file has been auto-generated. DO NOT EDIT
*/
const jspack = require("jspack").jspack,
_ = require("lodash"),
events = require("events"),
util = require("util");
// Add a convenience method to Buffer
Buffer.prototype.toByteArray = function () {
return Array.prototype.slice.call(this, 0)
}
const mavlink20 = function(){};
// Implement the X25CRC function (present in the Python version through the mavutil.py package)
mavlink20.x25Crc = function(buffer, crcIN) {
var bytes = buffer;
var crcOUT = crcIN || 0xffff;
_.each(bytes, function(e) {
var tmp = e ^ (crcOUT & 0xff);
tmp = (tmp ^ (tmp << 4)) & 0xff;
crcOUT = (crcOUT >> 8) ^ (tmp << 8) ^ (tmp << 3) ^ (tmp >> 4);
crcOUT = crcOUT & 0xffff;
});
return crcOUT;
}
mavlink20.WIRE_PROTOCOL_VERSION = "2.0";
mavlink20.HEADER_LEN = 10;
mavlink20.MAVLINK_TYPE_CHAR = 0
mavlink20.MAVLINK_TYPE_UINT8_T = 1
mavlink20.MAVLINK_TYPE_INT8_T = 2
mavlink20.MAVLINK_TYPE_UINT16_T = 3
mavlink20.MAVLINK_TYPE_INT16_T = 4
mavlink20.MAVLINK_TYPE_UINT32_T = 5
mavlink20.MAVLINK_TYPE_INT32_T = 6
mavlink20.MAVLINK_TYPE_UINT64_T = 7
mavlink20.MAVLINK_TYPE_INT64_T = 8
mavlink20.MAVLINK_TYPE_FLOAT = 9
mavlink20.MAVLINK_TYPE_DOUBLE = 10
mavlink20.MAVLINK_IFLAG_SIGNED = 0x01
// Mavlink headers incorporate sequence, source system (platform) and source component.
mavlink20.header = function(msgId, mlen, seq, srcSystem, srcComponent, incompat_flags=0, compat_flags=0,) {
this.mlen = ( typeof mlen === 'undefined' ) ? 0 : mlen;
this.seq = ( typeof seq === 'undefined' ) ? 0 : seq;
this.srcSystem = ( typeof srcSystem === 'undefined' ) ? 0 : srcSystem;
this.srcComponent = ( typeof srcComponent === 'undefined' ) ? 0 : srcComponent;
this.msgId = msgId
this.incompat_flags = incompat_flags
this.compat_flags = compat_flags
}
mavlink20.header.prototype.pack = function() {
return jspack.Pack('BBBBBBBHB', [253, this.mlen, this.incompat_flags, this.compat_flags, this.seq, this.srcSystem, this.srcComponent, ((this.msgId & 0xFF) << 8) | ((this.msgId >> 8) & 0xFF), this.msgId>>16]);
}
// Base class declaration: mavlink.message will be the parent class for each
// concrete implementation in mavlink.messages.
mavlink20.message = function() {};
// Convenience setter to facilitate turning the unpacked array of data into member properties
mavlink20.message.prototype.set = function(args) {
_.each(this.fieldnames, (e, i) => {
this[e] = args[i];
});
};
// This pack function builds the header and produces a complete MAVLink message,
// including header and message CRC.
mavlink20.message.prototype.pack = function(mav, crc_extra, payload) {
this.payload = payload;
var plen = this.payload.length;
//in MAVLink2 we can strip trailing zeros off payloads. This allows for simple
// variable length arrays and smaller packets
while (plen > 1 && this.payload[plen-1] == 0) {
plen = plen - 1;
}
this.payload = this.payload.slice(0, plen);
var incompat_flags = 0;
this.header = new mavlink20.header(this.id, this.payload.length, mav.seq, mav.srcSystem, mav.srcComponent, incompat_flags, 0,);
this.msgbuf = this.header.pack().concat(this.payload);
var crc = mavlink20.x25Crc(this.msgbuf.slice(1));
// For now, assume always using crc_extra = True. TODO: check/fix this.
crc = mavlink20.x25Crc([crc_extra], crc);
this.msgbuf = this.msgbuf.concat(jspack.Pack('<H', [crc] ) );
return this.msgbuf;
}
// enums
// ACCELCAL_VEHICLE_POS
mavlink20.ACCELCAL_VEHICLE_POS_LEVEL = 1 //
mavlink20.ACCELCAL_VEHICLE_POS_LEFT = 2 //
mavlink20.ACCELCAL_VEHICLE_POS_RIGHT = 3 //
mavlink20.ACCELCAL_VEHICLE_POS_NOSEDOWN = 4 //
mavlink20.ACCELCAL_VEHICLE_POS_NOSEUP = 5 //
mavlink20.ACCELCAL_VEHICLE_POS_BACK = 6 //
mavlink20.ACCELCAL_VEHICLE_POS_SUCCESS = 16777215 //
mavlink20.ACCELCAL_VEHICLE_POS_FAILED = 16777216 //
mavlink20.ACCELCAL_VEHICLE_POS_ENUM_END = 16777217 //
// MAV_CMD
mavlink20.MAV_CMD_NAV_WAYPOINT = 16 // Navigate to waypoint.
mavlink20.MAV_CMD_NAV_LOITER_UNLIM = 17 // Loiter around this waypoint an unlimited amount of time
mavlink20.MAV_CMD_NAV_LOITER_TURNS = 18 // Loiter around this waypoint for X turns
mavlink20.MAV_CMD_NAV_LOITER_TIME = 19 // Loiter at the specified latitude, longitude and altitude for a certain
// amount of time. Multicopter vehicles stop
// at the point (within a vehicle-specific
// acceptance radius). Forward-only moving
// vehicles (e.g. fixed-wing) circle the point
// with the specified radius/direction. If the
// Heading Required parameter (2) is non-zero
// forward moving aircraft will only leave the
// loiter circle once heading towards the next
// waypoint.
mavlink20.MAV_CMD_NAV_RETURN_TO_LAUNCH = 20 // Return to launch location
mavlink20.MAV_CMD_NAV_LAND = 21 // Land at location.
mavlink20.MAV_CMD_NAV_TAKEOFF = 22 // Takeoff from ground / hand. Vehicles that support multiple takeoff
// modes (e.g. VTOL quadplane) should take off
// using the currently configured mode.
mavlink20.MAV_CMD_NAV_LAND_LOCAL = 23 // Land at local position (local frame only)
mavlink20.MAV_CMD_NAV_TAKEOFF_LOCAL = 24 // Takeoff from local position (local frame only)
mavlink20.MAV_CMD_NAV_FOLLOW = 25 // Vehicle following, i.e. this waypoint represents the position of a
// moving vehicle
mavlink20.MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30 // Continue on the current course and climb/descend to specified
// altitude. When the altitude is reached
// continue to the next command (i.e., don't
// proceed to the next command until the
// desired altitude is reached.
mavlink20.MAV_CMD_NAV_LOITER_TO_ALT = 31 // Begin loiter at the specified Latitude and Longitude. If Lat=Lon=0,
// then loiter at the current position. Don't
// consider the navigation command complete
// (don't leave loiter) until the altitude has
// been reached. Additionally, if the Heading
// Required parameter is non-zero the aircraft
// will not leave the loiter until heading
// toward the next waypoint.
mavlink20.MAV_CMD_DO_FOLLOW = 32 // Begin following a target
mavlink20.MAV_CMD_DO_FOLLOW_REPOSITION = 33 // Reposition the MAV after a follow target command has been sent
mavlink20.MAV_CMD_DO_ORBIT = 34 // Start orbiting on the circumference of a circle defined by the
// parameters. Setting any value NaN results
// in using defaults.
mavlink20.MAV_CMD_NAV_ROI = 80 // Sets the region of interest (ROI) for a sensor set or the vehicle
// itself. This can then be used by the
// vehicle's control system to control the
// vehicle attitude and the attitude of
// various sensors such as cameras.
mavlink20.MAV_CMD_NAV_PATHPLANNING = 81 // Control autonomous path planning on the MAV.
mavlink20.MAV_CMD_NAV_SPLINE_WAYPOINT = 82 // Navigate to waypoint using a spline path.
mavlink20.MAV_CMD_NAV_ALTITUDE_WAIT = 83 // Mission command to wait for an altitude or downwards vertical speed.
// This is meant for high altitude balloon
// launches, allowing the aircraft to be idle
// until either an altitude is reached or a
// negative vertical speed is reached
// (indicating early balloon burst). The
// wiggle time is how often to wiggle the
// control surfaces to prevent them seizing
// up.
mavlink20.MAV_CMD_NAV_VTOL_TAKEOFF = 84 // Takeoff from ground using VTOL mode, and transition to forward flight
// with specified heading. The command should
// be ignored by vehicles that dont support
// both VTOL and fixed-wing flight
// (multicopters, boats,etc.).
mavlink20.MAV_CMD_NAV_VTOL_LAND = 85 // Land using VTOL mode
mavlink20.MAV_CMD_NAV_GUIDED_ENABLE = 92 // hand control over to an external controller
mavlink20.MAV_CMD_NAV_DELAY = 93 // Delay the next navigation command a number of seconds or until a
// specified time
mavlink20.MAV_CMD_NAV_PAYLOAD_PLACE = 94 // Descend and place payload. Vehicle moves to specified location,
// descends until it detects a hanging payload
// has reached the ground, and then releases
// the payload. If ground is not detected
// before the reaching the maximum descent
// value (param1), the command will complete
// without releasing the payload.
mavlink20.MAV_CMD_NAV_LAST = 95 // NOP - This command is only used to mark the upper limit of the
// NAV/ACTION commands in the enumeration
mavlink20.MAV_CMD_CONDITION_DELAY = 112 // Delay mission state machine.
mavlink20.MAV_CMD_CONDITION_CHANGE_ALT = 113 // Ascend/descend to target altitude at specified rate. Delay mission
// state machine until desired altitude
// reached.
mavlink20.MAV_CMD_CONDITION_DISTANCE = 114 // Delay mission state machine until within desired distance of next NAV
// point.
mavlink20.MAV_CMD_CONDITION_YAW = 115 // Reach a certain target angle.
mavlink20.MAV_CMD_CONDITION_LAST = 159 // NOP - This command is only used to mark the upper limit of the
// CONDITION commands in the enumeration
mavlink20.MAV_CMD_DO_SET_MODE = 176 // Set system mode.
mavlink20.MAV_CMD_DO_JUMP = 177 // Jump to the desired command in the mission list. Repeat this action
// only the specified number of times
mavlink20.MAV_CMD_DO_CHANGE_SPEED = 178 // Change speed and/or throttle set points.
mavlink20.MAV_CMD_DO_SET_HOME = 179 // Changes the home location either to the current location or a
// specified location.
mavlink20.MAV_CMD_DO_SET_PARAMETER = 180 // Set a system parameter. Caution! Use of this command requires
// knowledge of the numeric enumeration value
// of the parameter.
mavlink20.MAV_CMD_DO_SET_RELAY = 181 // Set a relay to a condition.
mavlink20.MAV_CMD_DO_REPEAT_RELAY = 182 // Cycle a relay on and off for a desired number of cycles with a desired
// period.
mavlink20.MAV_CMD_DO_SET_SERVO = 183 // Set a servo to a desired PWM value.
mavlink20.MAV_CMD_DO_REPEAT_SERVO = 184 // Cycle a between its nominal setting and a desired PWM for a desired
// number of cycles with a desired period.
mavlink20.MAV_CMD_DO_FLIGHTTERMINATION = 185 // Terminate flight immediately
mavlink20.MAV_CMD_DO_CHANGE_ALTITUDE = 186 // Change altitude set point.
mavlink20.MAV_CMD_DO_SET_ACTUATOR = 187 // Sets actuators (e.g. servos) to a desired value. The actuator numbers
// are mapped to specific outputs (e.g. on any
// MAIN or AUX PWM or UAVCAN) using a flight-
// stack specific mechanism (i.e. a
// parameter).
mavlink20.MAV_CMD_DO_LAND_START = 189 // Mission command to perform a landing. This is used as a marker in a
// mission to tell the autopilot where a
// sequence of mission items that represents a
// landing starts. It may also be sent via a
// COMMAND_LONG to trigger a landing, in which
// case the nearest (geographically) landing
// sequence in the mission will be used. The
// Latitude/Longitude is optional, and may be
// set to 0 if not needed. If specified then
// it will be used to help find the closest
// landing sequence.
mavlink20.MAV_CMD_DO_RALLY_LAND = 190 // Mission command to perform a landing from a rally point.
mavlink20.MAV_CMD_DO_GO_AROUND = 191 // Mission command to safely abort an autonomous landing.
mavlink20.MAV_CMD_DO_REPOSITION = 192 // Reposition the vehicle to a specific WGS84 global position.
mavlink20.MAV_CMD_DO_PAUSE_CONTINUE = 193 // If in a GPS controlled position mode, hold the current position or
// continue.
mavlink20.MAV_CMD_DO_SET_REVERSE = 194 // Set moving direction to forward or reverse.
mavlink20.MAV_CMD_DO_SET_ROI_LOCATION = 195 // Sets the region of interest (ROI) to a location. This can then be used
// by the vehicle's control system to control
// the vehicle attitude and the attitude of
// various sensors such as cameras. This
// command can be sent to a gimbal manager but
// not to a gimbal device. A gimbal is not to
// react to this message.
mavlink20.MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196 // Sets the region of interest (ROI) to be toward next waypoint, with
// optional pitch/roll/yaw offset. This can
// then be used by the vehicle's control
// system to control the vehicle attitude and
// the attitude of various sensors such as
// cameras. This command can be sent to a
// gimbal manager but not to a gimbal device.
// A gimbal device is not to react to this
// message.
mavlink20.MAV_CMD_DO_SET_ROI_NONE = 197 // Cancels any previous ROI command returning the vehicle/sensors to
// default flight characteristics. This can
// then be used by the vehicle's control
// system to control the vehicle attitude and
// the attitude of various sensors such as
// cameras. This command can be sent to a
// gimbal manager but not to a gimbal device.
// A gimbal device is not to react to this
// message. After this command the gimbal
// manager should go back to manual input if
// available, and otherwise assume a neutral
// position.
mavlink20.MAV_CMD_DO_SET_ROI_SYSID = 198 // Mount tracks system with specified system ID. Determination of target
// vehicle position may be done with
// GLOBAL_POSITION_INT or any other means.
// This command can be sent to a gimbal
// manager but not to a gimbal device. A
// gimbal device is not to react to this
// message.
mavlink20.MAV_CMD_DO_CONTROL_VIDEO = 200 // Control onboard camera system.
mavlink20.MAV_CMD_DO_SET_ROI = 201 // Sets the region of interest (ROI) for a sensor set or the vehicle
// itself. This can then be used by the
// vehicle's control system to control the
// vehicle attitude and the attitude of
// various sensors such as cameras.
mavlink20.MAV_CMD_DO_DIGICAM_CONFIGURE = 202 // Configure digital camera. This is a fallback message for systems that
// have not yet implemented PARAM_EXT_XXX
// messages and camera definition files (see h
// ttps://mavlink.io/en/services/camera_def.ht
// ml ).
mavlink20.MAV_CMD_DO_DIGICAM_CONTROL = 203 // Control digital camera. This is a fallback message for systems that
// have not yet implemented PARAM_EXT_XXX
// messages and camera definition files (see h
// ttps://mavlink.io/en/services/camera_def.ht
// ml ).
mavlink20.MAV_CMD_DO_MOUNT_CONFIGURE = 204 // Mission command to configure a camera or antenna mount
mavlink20.MAV_CMD_DO_MOUNT_CONTROL = 205 // Mission command to control a camera or antenna mount
mavlink20.MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206 // Mission command to set camera trigger distance for this flight. The
// camera is triggered each time this distance
// is exceeded. This command can also be used
// to set the shutter integration time for the
// camera.
mavlink20.MAV_CMD_DO_FENCE_ENABLE = 207 // Mission command to enable the geofence
mavlink20.MAV_CMD_DO_PARACHUTE = 208 // Mission item/command to release a parachute or enable/disable auto
// release.
mavlink20.MAV_CMD_DO_MOTOR_TEST = 209 // Mission command to perform motor test.
mavlink20.MAV_CMD_DO_INVERTED_FLIGHT = 210 // Change to/from inverted flight.
mavlink20.MAV_CMD_DO_GRIPPER = 211 // Mission command to operate a gripper.
mavlink20.MAV_CMD_DO_AUTOTUNE_ENABLE = 212 // Enable/disable autotune.
mavlink20.MAV_CMD_NAV_SET_YAW_SPEED = 213 // Sets a desired vehicle turn angle and speed change.
mavlink20.MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214 // Mission command to set camera trigger interval for this flight. If
// triggering is enabled, the camera is
// triggered each time this interval expires.
// This command can also be used to set the
// shutter integration time for the camera.
mavlink20.MAV_CMD_DO_SET_RESUME_REPEAT_DIST = 215 // Set the distance to be repeated on mission resume
mavlink20.MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220 // Mission command to control a camera or antenna mount, using a
// quaternion as reference.
mavlink20.MAV_CMD_DO_GUIDED_MASTER = 221 // set id of master controller
mavlink20.MAV_CMD_DO_GUIDED_LIMITS = 222 // Set limits for external control
mavlink20.MAV_CMD_DO_ENGINE_CONTROL = 223 // Control vehicle engine. This is interpreted by the vehicles engine
// controller to change the target engine
// state. It is intended for vehicles with
// internal combustion engines
mavlink20.MAV_CMD_DO_SET_MISSION_CURRENT = 224 // Set the mission item with sequence number seq as current item. This
// means that the MAV will continue to this
// mission item on the shortest path (not
// following the mission items in-between).
mavlink20.MAV_CMD_DO_LAST = 240 // NOP - This command is only used to mark the upper limit of the DO
// commands in the enumeration
mavlink20.MAV_CMD_PREFLIGHT_CALIBRATION = 241 // Trigger calibration. This command will be only accepted if in pre-
// flight mode. Except for Temperature
// Calibration, only one sensor should be set
// in a single message and all others should
// be zero.
mavlink20.MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242 // Set sensor offsets. This command will be only accepted if in pre-
// flight mode.
mavlink20.MAV_CMD_PREFLIGHT_UAVCAN = 243 // Trigger UAVCAN configuration (actuator ID assignment and direction
// mapping). Note that this maps to the legacy
// UAVCAN v0 function UAVCAN_ENUMERATE, which
// is intended to be executed just once during
// initial vehicle configuration (it is not a
// normal pre-flight command and has been
// poorly named).
mavlink20.MAV_CMD_PREFLIGHT_STORAGE = 245 // Request storage of different parameter values and logs. This command
// will be only accepted if in pre-flight
// mode.
mavlink20.MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246 // Request the reboot or shutdown of system components.
mavlink20.MAV_CMD_DO_UPGRADE = 247 // Request a target system to start an upgrade of one (or all) of its
// components. For example, the command might
// be sent to a companion computer to cause it
// to upgrade a connected flight controller.
// The system doing the upgrade will report
// progress using the normal command protocol
// sequence for a long running operation.
// Command protocol information: https://mavli
// nk.io/en/services/command.html.
mavlink20.MAV_CMD_OVERRIDE_GOTO = 252 // Override current mission with command to pause mission, pause mission
// and move to position, continue/resume
// mission. When param 1 indicates that the
// mission is paused (MAV_GOTO_DO_HOLD), param
// 2 defines whether it holds in place or
// moves to another position.
mavlink20.MAV_CMD_MISSION_START = 300 // start running a mission
mavlink20.MAV_CMD_COMPONENT_ARM_DISARM = 400 // Arms / Disarms a component
mavlink20.MAV_CMD_ILLUMINATOR_ON_OFF = 405 // Turns illuminators ON/OFF. An illuminator is a light source that is
// used for lighting up dark areas external to
// the sytstem: e.g. a torch or searchlight
// (as opposed to a light source for
// illuminating the system itself, e.g. an
// indicator light).
mavlink20.MAV_CMD_GET_HOME_POSITION = 410 // Request the home position from the vehicle.
mavlink20.MAV_CMD_INJECT_FAILURE = 420 // Inject artificial failure for testing purposes. Note that autopilots
// should implement an additional protection
// before accepting this command such as a
// specific param setting.
mavlink20.MAV_CMD_START_RX_PAIR = 500 // Starts receiver pairing.
mavlink20.MAV_CMD_GET_MESSAGE_INTERVAL = 510 // Request the interval between messages for a particular MAVLink message
// ID. The receiver should ACK the command and
// then emit its response in a
// MESSAGE_INTERVAL message.
mavlink20.MAV_CMD_SET_MESSAGE_INTERVAL = 511 // Set the interval between messages for a particular MAVLink message ID.
// This interface replaces
// REQUEST_DATA_STREAM.
mavlink20.MAV_CMD_REQUEST_MESSAGE = 512 // Request the target system(s) emit a single instance of a specified
// message (i.e. a "one-shot" version of
// MAV_CMD_SET_MESSAGE_INTERVAL).
mavlink20.MAV_CMD_REQUEST_PROTOCOL_VERSION = 519 // Request MAVLink protocol version compatibility. All receivers should
// ACK the command and then emit their
// capabilities in an PROTOCOL_VERSION message
mavlink20.MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520 // Request autopilot capabilities. The receiver should ACK the command
// and then emit its capabilities in an
// AUTOPILOT_VERSION message
mavlink20.MAV_CMD_REQUEST_CAMERA_INFORMATION = 521 // Request camera information (CAMERA_INFORMATION).
mavlink20.MAV_CMD_REQUEST_CAMERA_SETTINGS = 522 // Request camera settings (CAMERA_SETTINGS).
mavlink20.MAV_CMD_REQUEST_STORAGE_INFORMATION = 525 // Request storage information (STORAGE_INFORMATION). Use the command's
// target_component to target a specific
// component's storage.
mavlink20.MAV_CMD_STORAGE_FORMAT = 526 // Format a storage medium. Once format is complete, a
// STORAGE_INFORMATION message is sent. Use
// the command's target_component to target a
// specific component's storage.
mavlink20.MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527 // Request camera capture status (CAMERA_CAPTURE_STATUS)
mavlink20.MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528 // Request flight information (FLIGHT_INFORMATION)
mavlink20.MAV_CMD_RESET_CAMERA_SETTINGS = 529 // Reset all camera settings to Factory Default
mavlink20.MAV_CMD_SET_CAMERA_MODE = 530 // Set camera running mode. Use NaN for reserved values. GCS will send a
// MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command
// after a mode change if the camera supports
// video streaming.
mavlink20.MAV_CMD_SET_CAMERA_ZOOM = 531 // Set camera zoom. Camera must respond with a CAMERA_SETTINGS message
// (on success).
mavlink20.MAV_CMD_SET_CAMERA_FOCUS = 532 // Set camera focus. Camera must respond with a CAMERA_SETTINGS message
// (on success).
mavlink20.MAV_CMD_JUMP_TAG = 600 // Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG.
mavlink20.MAV_CMD_DO_JUMP_TAG = 601 // Jump to the matching tag in the mission list. Repeat this action for
// the specified number of times. A mission
// should contain a single matching tag for
// each jump. If this is not the case then a
// jump to a missing tag should complete the
// mission, and a jump where there are
// multiple matching tags should always select
// the one with the lowest mission sequence
// number.
mavlink20.MAV_CMD_PARAM_TRANSACTION = 900 // Request to start or end a parameter transaction. Multiple kinds of
// transport layers can be used to exchange
// parameters in the transaction (param,
// param_ext and mavftp). The command response
// can either be a success/failure or an in
// progress in case the receiving side takes
// some time to apply the parameters.
mavlink20.MAV_CMD_DO_GIMBAL_MANAGER_TILTPAN = 1000 // High level setpoint to be sent to a gimbal manager to set a gimbal
// attitude. It is possible to set
// combinations of the values below. E.g. an
// angle as well as a desired angular rate can
// be used to get to this angle at a certain
// angular rate, or an angular rate only will
// result in continuous turning. NaN is to be
// used to signal unset. Note: a gimbal is
// never to react to this command but only the
// gimbal manager.
mavlink20.MAV_CMD_IMAGE_START_CAPTURE = 2000 // Start image capture sequence. Sends CAMERA_IMAGE_CAPTURED after each
// capture. Use NaN for reserved values.
mavlink20.MAV_CMD_IMAGE_STOP_CAPTURE = 2001 // Stop image capture sequence Use NaN for reserved values.
mavlink20.MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002 // Re-request a CAMERA_IMAGE_CAPTURED message.
mavlink20.MAV_CMD_DO_TRIGGER_CONTROL = 2003 // Enable or disable on-board camera triggering system.
mavlink20.MAV_CMD_CAMERA_TRACK_POINT = 2004 // If the camera supports point visual tracking
// (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is
// set), this command allows to initiate the
// tracking.
mavlink20.MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005 // If the camera supports rectangle visual tracking
// (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is
// set), this command allows to initiate the
// tracking.
mavlink20.MAV_CMD_CAMERA_STOP_TRACKING = 2010 // Stops ongoing tracking.
mavlink20.MAV_CMD_VIDEO_START_CAPTURE = 2500 // Starts video capture (recording).
mavlink20.MAV_CMD_VIDEO_STOP_CAPTURE = 2501 // Stop the current video capture (recording).
mavlink20.MAV_CMD_VIDEO_START_STREAMING = 2502 // Start video streaming
mavlink20.MAV_CMD_VIDEO_STOP_STREAMING = 2503 // Stop the given video stream
mavlink20.MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504 // Request video stream information (VIDEO_STREAM_INFORMATION)
mavlink20.MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505 // Request video stream status (VIDEO_STREAM_STATUS)
mavlink20.MAV_CMD_LOGGING_START = 2510 // Request to start streaming logging data over MAVLink (see also
// LOGGING_DATA message)
mavlink20.MAV_CMD_LOGGING_STOP = 2511 // Request to stop streaming log data over MAVLink
mavlink20.MAV_CMD_AIRFRAME_CONFIGURATION = 2520 //
mavlink20.MAV_CMD_CONTROL_HIGH_LATENCY = 2600 // Request to start/stop transmitting over the high latency telemetry
mavlink20.MAV_CMD_PANORAMA_CREATE = 2800 // Create a panorama at the current position
mavlink20.MAV_CMD_DO_VTOL_TRANSITION = 3000 // Request VTOL transition
mavlink20.MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001 // Request authorization to arm the vehicle to a external entity, the arm
// authorizer is responsible to request all
// data that is needs from the vehicle before
// authorize or deny the request. If approved
// the progress of command_ack message should
// be set with period of time that this
// authorization is valid in seconds or in
// case it was denied it should be set with
// one of the reasons in
// ARM_AUTH_DENIED_REASON.
mavlink20.MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000 // This command sets the submode to standard guided when vehicle is in
// guided mode. The vehicle holds position and
// altitude and the user can input the desired
// velocities along all three axes.
mavlink20.MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001 // This command sets submode circle when vehicle is in guided mode.
// Vehicle flies along a circle facing the
// center of the circle. The user can input
// the velocity along the circle and change
// the radius. If no input is given the
// vehicle will hold position.
mavlink20.MAV_CMD_CONDITION_GATE = 4501 // Delay mission state machine until gate has been reached.
mavlink20.MAV_CMD_NAV_FENCE_RETURN_POINT = 5000 // Fence return point. There can only be one fence return point.
mavlink20.MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001 // Fence vertex for an inclusion polygon (the polygon must not be self-
// intersecting). The vehicle must stay within
// this area. Minimum of 3 vertices required.
mavlink20.MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002 // Fence vertex for an exclusion polygon (the polygon must not be self-
// intersecting). The vehicle must stay
// outside this area. Minimum of 3 vertices
// required.
mavlink20.MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003 // Circular fence area. The vehicle must stay inside this area.
mavlink20.MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004 // Circular fence area. The vehicle must stay outside this area.
mavlink20.MAV_CMD_NAV_RALLY_POINT = 5100 // Rally point. You can have multiple rally points defined.
mavlink20.MAV_CMD_UAVCAN_GET_NODE_INFO = 5200 // Commands the vehicle to respond with a sequence of messages
// UAVCAN_NODE_INFO, one message per every
// UAVCAN node that is online. Note that some
// of the response messages can be lost, which
// the receiver can detect easily by checking
// whether every received UAVCAN_NODE_STATUS
// has a matching message UAVCAN_NODE_INFO
// received earlier; if not, this command
// should be sent again in order to request
// re-transmission of the node information
// messages.
mavlink20.MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001 // Deploy payload on a Lat / Lon / Alt position. This includes the
// navigation to reach the required release
// position and velocity.
mavlink20.MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002 // Control the payload deployment.
mavlink20.MAV_CMD_WAYPOINT_USER_1 = 31000 // User defined waypoint item. Ground Station will show the Vehicle as
// flying through this item.
mavlink20.MAV_CMD_WAYPOINT_USER_2 = 31001 // User defined waypoint item. Ground Station will show the Vehicle as
// flying through this item.
mavlink20.MAV_CMD_WAYPOINT_USER_3 = 31002 // User defined waypoint item. Ground Station will show the Vehicle as
// flying through this item.
mavlink20.MAV_CMD_WAYPOINT_USER_4 = 31003 // User defined waypoint item. Ground Station will show the Vehicle as
// flying through this item.
mavlink20.MAV_CMD_WAYPOINT_USER_5 = 31004 // User defined waypoint item. Ground Station will show the Vehicle as
// flying through this item.
mavlink20.MAV_CMD_SPATIAL_USER_1 = 31005 // User defined spatial item. Ground Station will not show the Vehicle as
// flying through this item. Example: ROI
// item.
mavlink20.MAV_CMD_SPATIAL_USER_2 = 31006 // User defined spatial item. Ground Station will not show the Vehicle as
// flying through this item. Example: ROI
// item.
mavlink20.MAV_CMD_SPATIAL_USER_3 = 31007 // User defined spatial item. Ground Station will not show the Vehicle as
// flying through this item. Example: ROI
// item.
mavlink20.MAV_CMD_SPATIAL_USER_4 = 31008 // User defined spatial item. Ground Station will not show the Vehicle as
// flying through this item. Example: ROI
// item.
mavlink20.MAV_CMD_SPATIAL_USER_5 = 31009 // User defined spatial item. Ground Station will not show the Vehicle as
// flying through this item. Example: ROI
// item.
mavlink20.MAV_CMD_USER_1 = 31010 // User defined command. Ground Station will not show the Vehicle as
// flying through this item. Example:
// MAV_CMD_DO_SET_PARAMETER item.
mavlink20.MAV_CMD_USER_2 = 31011 // User defined command. Ground Station will not show the Vehicle as
// flying through this item. Example:
// MAV_CMD_DO_SET_PARAMETER item.
mavlink20.MAV_CMD_USER_3 = 31012 // User defined command. Ground Station will not show the Vehicle as
// flying through this item. Example:
// MAV_CMD_DO_SET_PARAMETER item.
mavlink20.MAV_CMD_USER_4 = 31013 // User defined command. Ground Station will not show the Vehicle as
// flying through this item. Example:
// MAV_CMD_DO_SET_PARAMETER item.
mavlink20.MAV_CMD_USER_5 = 31014 // User defined command. Ground Station will not show the Vehicle as
// flying through this item. Example:
// MAV_CMD_DO_SET_PARAMETER item.
mavlink20.MAV_CMD_POWER_OFF_INITIATED = 42000 // A system wide power-off event has been initiated.
mavlink20.MAV_CMD_SOLO_BTN_FLY_CLICK = 42001 // FLY button has been clicked.
mavlink20.MAV_CMD_SOLO_BTN_FLY_HOLD = 42002 // FLY button has been held for 1.5 seconds.
mavlink20.MAV_CMD_SOLO_BTN_PAUSE_CLICK = 42003 // PAUSE button has been clicked.
mavlink20.MAV_CMD_FIXED_MAG_CAL = 42004 // Magnetometer calibration based on fixed position in earth
// field given by inclination, declination and
// intensity.
mavlink20.MAV_CMD_FIXED_MAG_CAL_FIELD = 42005 // Magnetometer calibration based on fixed expected field values in
// milliGauss.
mavlink20.MAV_CMD_FIXED_MAG_CAL_YAW = 42006 // Magnetometer calibration based on provided known yaw. This allows for
// fast calibration using WMM field tables in
// the vehicle, given only the known yaw of
// the vehicle. If Latitude and longitude are
// both zero then use the current vehicle
// location.
mavlink20.MAV_CMD_DO_START_MAG_CAL = 42424 // Initiate a magnetometer calibration.
mavlink20.MAV_CMD_DO_ACCEPT_MAG_CAL = 42425 // Initiate a magnetometer calibration.
mavlink20.MAV_CMD_DO_CANCEL_MAG_CAL = 42426 // Cancel a running magnetometer calibration.
mavlink20.MAV_CMD_SET_FACTORY_TEST_MODE = 42427 // Command autopilot to get into factory test/diagnostic mode.
mavlink20.MAV_CMD_DO_SEND_BANNER = 42428 // Reply with the version banner.
mavlink20.MAV_CMD_ACCELCAL_VEHICLE_POS = 42429 // Used when doing accelerometer calibration. When sent to the GCS tells
// it what position to put the vehicle in.
// When sent to the vehicle says what position
// the vehicle is in.
mavlink20.MAV_CMD_GIMBAL_RESET = 42501 // Causes the gimbal to reset and boot as if it was just powered on.
mavlink20.MAV_CMD_GIMBAL_AXIS_CALIBRATION_STATUS = 42502 // Reports progress and success or failure of gimbal axis calibration
// procedure.
mavlink20.MAV_CMD_GIMBAL_REQUEST_AXIS_CALIBRATION = 42503 // Starts commutation calibration on the gimbal.
mavlink20.MAV_CMD_GIMBAL_FULL_RESET = 42505 // Erases gimbal application and parameters.
mavlink20.MAV_CMD_DO_WINCH = 42600 // Command to operate winch.
mavlink20.MAV_CMD_FLASH_BOOTLOADER = 42650 // Update the bootloader
mavlink20.MAV_CMD_BATTERY_RESET = 42651 // Reset battery capacity for batteries that accumulate consumed battery
// via integration.
mavlink20.MAV_CMD_DEBUG_TRAP = 42700 // Issue a trap signal to the autopilot process, presumably to enter the
// debugger.
mavlink20.MAV_CMD_SCRIPTING = 42701 // Control onboard scripting.
mavlink20.MAV_CMD_ENUM_END = 42702 //
// SCRIPTING_CMD
mavlink20.SCRIPTING_CMD_REPL_START = 0 // Start a REPL session.
mavlink20.SCRIPTING_CMD_REPL_STOP = 1 // End a REPL session.
mavlink20.SCRIPTING_CMD_ENUM_END = 2 //
// LIMITS_STATE
mavlink20.LIMITS_INIT = 0 // Pre-initialization.
mavlink20.LIMITS_DISABLED = 1 // Disabled.
mavlink20.LIMITS_ENABLED = 2 // Checking limits.
mavlink20.LIMITS_TRIGGERED = 3 // A limit has been breached.
mavlink20.LIMITS_RECOVERING = 4 // Taking action e.g. Return/RTL.
mavlink20.LIMITS_RECOVERED = 5 // We're no longer in breach of a limit.
mavlink20.LIMITS_STATE_ENUM_END = 6 //
// LIMIT_MODULE
mavlink20.LIMIT_GPSLOCK = 1 // Pre-initialization.
mavlink20.LIMIT_GEOFENCE = 2 // Disabled.
mavlink20.LIMIT_ALTITUDE = 4 // Checking limits.
mavlink20.LIMIT_MODULE_ENUM_END = 5 //
// RALLY_FLAGS
mavlink20.FAVORABLE_WIND = 1 // Flag set when requiring favorable winds for landing.
mavlink20.LAND_IMMEDIATELY = 2 // Flag set when plane is to immediately descend to break altitude and
// land without GCS intervention. Flag not set
// when plane is to loiter at Rally point
// until commanded to land.
mavlink20.RALLY_FLAGS_ENUM_END = 3 //
// CAMERA_STATUS_TYPES
mavlink20.CAMERA_STATUS_TYPE_HEARTBEAT = 0 // Camera heartbeat, announce camera component ID at 1Hz.
mavlink20.CAMERA_STATUS_TYPE_TRIGGER = 1 // Camera image triggered.
mavlink20.CAMERA_STATUS_TYPE_DISCONNECT = 2 // Camera connection lost.
mavlink20.CAMERA_STATUS_TYPE_ERROR = 3 // Camera unknown error.
mavlink20.CAMERA_STATUS_TYPE_LOWBATT = 4 // Camera battery low. Parameter p1 shows reported voltage.
mavlink20.CAMERA_STATUS_TYPE_LOWSTORE = 5 // Camera storage low. Parameter p1 shows reported shots remaining.
mavlink20.CAMERA_STATUS_TYPE_LOWSTOREV = 6 // Camera storage low. Parameter p1 shows reported video minutes
// remaining.
mavlink20.CAMERA_STATUS_TYPES_ENUM_END = 7 //
// CAMERA_FEEDBACK_FLAGS
mavlink20.CAMERA_FEEDBACK_PHOTO = 0 // Shooting photos, not video.
mavlink20.CAMERA_FEEDBACK_VIDEO = 1 // Shooting video, not stills.
mavlink20.CAMERA_FEEDBACK_BADEXPOSURE = 2 // Unable to achieve requested exposure (e.g. shutter speed too low).
mavlink20.CAMERA_FEEDBACK_CLOSEDLOOP = 3 // Closed loop feedback from camera, we know for sure it has successfully
// taken a picture.
mavlink20.CAMERA_FEEDBACK_OPENLOOP = 4 // Open loop camera, an image trigger has been requested but we can't
// know for sure it has successfully taken a
// picture.
mavlink20.CAMERA_FEEDBACK_FLAGS_ENUM_END = 5 //
// MAV_MODE_GIMBAL
mavlink20.MAV_MODE_GIMBAL_UNINITIALIZED = 0 // Gimbal is powered on but has not started initializing yet.
mavlink20.MAV_MODE_GIMBAL_CALIBRATING_PITCH = 1 // Gimbal is currently running calibration on the pitch axis.
mavlink20.MAV_MODE_GIMBAL_CALIBRATING_ROLL = 2 // Gimbal is currently running calibration on the roll axis.
mavlink20.MAV_MODE_GIMBAL_CALIBRATING_YAW = 3 // Gimbal is currently running calibration on the yaw axis.
mavlink20.MAV_MODE_GIMBAL_INITIALIZED = 4 // Gimbal has finished calibrating and initializing, but is relaxed
// pending reception of first rate command
// from copter.
mavlink20.MAV_MODE_GIMBAL_ACTIVE = 5 // Gimbal is actively stabilizing.
mavlink20.MAV_MODE_GIMBAL_RATE_CMD_TIMEOUT = 6 // Gimbal is relaxed because it missed more than 10 expected rate command
// messages in a row. Gimbal will move back to
// active mode when it receives a new rate
// command.
mavlink20.MAV_MODE_GIMBAL_ENUM_END = 7 //
// GIMBAL_AXIS
mavlink20.GIMBAL_AXIS_YAW = 0 // Gimbal yaw axis.
mavlink20.GIMBAL_AXIS_PITCH = 1 // Gimbal pitch axis.
mavlink20.GIMBAL_AXIS_ROLL = 2 // Gimbal roll axis.
mavlink20.GIMBAL_AXIS_ENUM_END = 3 //
// GIMBAL_AXIS_CALIBRATION_STATUS
mavlink20.GIMBAL_AXIS_CALIBRATION_STATUS_IN_PROGRESS = 0 // Axis calibration is in progress.
mavlink20.GIMBAL_AXIS_CALIBRATION_STATUS_SUCCEEDED = 1 // Axis calibration succeeded.
mavlink20.GIMBAL_AXIS_CALIBRATION_STATUS_FAILED = 2 // Axis calibration failed.
mavlink20.GIMBAL_AXIS_CALIBRATION_STATUS_ENUM_END = 3 //
// GIMBAL_AXIS_CALIBRATION_REQUIRED
mavlink20.GIMBAL_AXIS_CALIBRATION_REQUIRED_UNKNOWN = 0 // Whether or not this axis requires calibration is unknown at this time.
mavlink20.GIMBAL_AXIS_CALIBRATION_REQUIRED_TRUE = 1 // This axis requires calibration.
mavlink20.GIMBAL_AXIS_CALIBRATION_REQUIRED_FALSE = 2 // This axis does not require calibration.
mavlink20.GIMBAL_AXIS_CALIBRATION_REQUIRED_ENUM_END = 3 //
// GOPRO_HEARTBEAT_STATUS
mavlink20.GOPRO_HEARTBEAT_STATUS_DISCONNECTED = 0 // No GoPro connected.
mavlink20.GOPRO_HEARTBEAT_STATUS_INCOMPATIBLE = 1 // The detected GoPro is not HeroBus compatible.
mavlink20.GOPRO_HEARTBEAT_STATUS_CONNECTED = 2 // A HeroBus compatible GoPro is connected.
mavlink20.GOPRO_HEARTBEAT_STATUS_ERROR = 3 // An unrecoverable error was encountered with the connected GoPro, it
// may require a power cycle.
mavlink20.GOPRO_HEARTBEAT_STATUS_ENUM_END = 4 //
// GOPRO_HEARTBEAT_FLAGS
mavlink20.GOPRO_FLAG_RECORDING = 1 // GoPro is currently recording.
mavlink20.GOPRO_HEARTBEAT_FLAGS_ENUM_END = 2 //
// GOPRO_REQUEST_STATUS
mavlink20.GOPRO_REQUEST_SUCCESS = 0 // The write message with ID indicated succeeded.
mavlink20.GOPRO_REQUEST_FAILED = 1 // The write message with ID indicated failed.
mavlink20.GOPRO_REQUEST_STATUS_ENUM_END = 2 //
// GOPRO_COMMAND
mavlink20.GOPRO_COMMAND_POWER = 0 // (Get/Set).
mavlink20.GOPRO_COMMAND_CAPTURE_MODE = 1 // (Get/Set).
mavlink20.GOPRO_COMMAND_SHUTTER = 2 // (___/Set).
mavlink20.GOPRO_COMMAND_BATTERY = 3 // (Get/___).
mavlink20.GOPRO_COMMAND_MODEL = 4 // (Get/___).
mavlink20.GOPRO_COMMAND_VIDEO_SETTINGS = 5 // (Get/Set).
mavlink20.GOPRO_COMMAND_LOW_LIGHT = 6 // (Get/Set).
mavlink20.GOPRO_COMMAND_PHOTO_RESOLUTION = 7 // (Get/Set).
mavlink20.GOPRO_COMMAND_PHOTO_BURST_RATE = 8 // (Get/Set).
mavlink20.GOPRO_COMMAND_PROTUNE = 9 // (Get/Set).
mavlink20.GOPRO_COMMAND_PROTUNE_WHITE_BALANCE = 10 // (Get/Set) Hero 3+ Only.
mavlink20.GOPRO_COMMAND_PROTUNE_COLOUR = 11 // (Get/Set) Hero 3+ Only.
mavlink20.GOPRO_COMMAND_PROTUNE_GAIN = 12 // (Get/Set) Hero 3+ Only.
mavlink20.GOPRO_COMMAND_PROTUNE_SHARPNESS = 13 // (Get/Set) Hero 3+ Only.
mavlink20.GOPRO_COMMAND_PROTUNE_EXPOSURE = 14 // (Get/Set) Hero 3+ Only.
mavlink20.GOPRO_COMMAND_TIME = 15 // (Get/Set).
mavlink20.GOPRO_COMMAND_CHARGING = 16 // (Get/Set).
mavlink20.GOPRO_COMMAND_ENUM_END = 17 //
// GOPRO_CAPTURE_MODE
mavlink20.GOPRO_CAPTURE_MODE_VIDEO = 0 // Video mode.
mavlink20.GOPRO_CAPTURE_MODE_PHOTO = 1 // Photo mode.
mavlink20.GOPRO_CAPTURE_MODE_BURST = 2 // Burst mode, Hero 3+ only.
mavlink20.GOPRO_CAPTURE_MODE_TIME_LAPSE = 3 // Time lapse mode, Hero 3+ only.
mavlink20.GOPRO_CAPTURE_MODE_MULTI_SHOT = 4 // Multi shot mode, Hero 4 only.
mavlink20.GOPRO_CAPTURE_MODE_PLAYBACK = 5 // Playback mode, Hero 4 only, silver only except when LCD or HDMI is
// connected to black.
mavlink20.GOPRO_CAPTURE_MODE_SETUP = 6 // Playback mode, Hero 4 only.
mavlink20.GOPRO_CAPTURE_MODE_UNKNOWN = 255 // Mode not yet known.
mavlink20.GOPRO_CAPTURE_MODE_ENUM_END = 256 //
// GOPRO_RESOLUTION
mavlink20.GOPRO_RESOLUTION_480p = 0 // 848 x 480 (480p).
mavlink20.GOPRO_RESOLUTION_720p = 1 // 1280 x 720 (720p).
mavlink20.GOPRO_RESOLUTION_960p = 2 // 1280 x 960 (960p).
mavlink20.GOPRO_RESOLUTION_1080p = 3 // 1920 x 1080 (1080p).
mavlink20.GOPRO_RESOLUTION_1440p = 4 // 1920 x 1440 (1440p).
mavlink20.GOPRO_RESOLUTION_2_7k_17_9 = 5 // 2704 x 1440 (2.7k-17:9).
mavlink20.GOPRO_RESOLUTION_2_7k_16_9 = 6 // 2704 x 1524 (2.7k-16:9).
mavlink20.GOPRO_RESOLUTION_2_7k_4_3 = 7 // 2704 x 2028 (2.7k-4:3).
mavlink20.GOPRO_RESOLUTION_4k_16_9 = 8 // 3840 x 2160 (4k-16:9).
mavlink20.GOPRO_RESOLUTION_4k_17_9 = 9 // 4096 x 2160 (4k-17:9).
mavlink20.GOPRO_RESOLUTION_720p_SUPERVIEW = 10 // 1280 x 720 (720p-SuperView).
mavlink20.GOPRO_RESOLUTION_1080p_SUPERVIEW = 11 // 1920 x 1080 (1080p-SuperView).
mavlink20.GOPRO_RESOLUTION_2_7k_SUPERVIEW = 12 // 2704 x 1520 (2.7k-SuperView).
mavlink20.GOPRO_RESOLUTION_4k_SUPERVIEW = 13 // 3840 x 2160 (4k-SuperView).
mavlink20.GOPRO_RESOLUTION_ENUM_END = 14 //
// GOPRO_FRAME_RATE
mavlink20.GOPRO_FRAME_RATE_12 = 0 // 12 FPS.
mavlink20.GOPRO_FRAME_RATE_15 = 1 // 15 FPS.
mavlink20.GOPRO_FRAME_RATE_24 = 2 // 24 FPS.
mavlink20.GOPRO_FRAME_RATE_25 = 3 // 25 FPS.
mavlink20.GOPRO_FRAME_RATE_30 = 4 // 30 FPS.
mavlink20.GOPRO_FRAME_RATE_48 = 5 // 48 FPS.
mavlink20.GOPRO_FRAME_RATE_50 = 6 // 50 FPS.
mavlink20.GOPRO_FRAME_RATE_60 = 7 // 60 FPS.
mavlink20.GOPRO_FRAME_RATE_80 = 8 // 80 FPS.
mavlink20.GOPRO_FRAME_RATE_90 = 9 // 90 FPS.
mavlink20.GOPRO_FRAME_RATE_100 = 10 // 100 FPS.
mavlink20.GOPRO_FRAME_RATE_120 = 11 // 120 FPS.
mavlink20.GOPRO_FRAME_RATE_240 = 12 // 240 FPS.
mavlink20.GOPRO_FRAME_RATE_12_5 = 13 // 12.5 FPS.
mavlink20.GOPRO_FRAME_RATE_ENUM_END = 14 //
// GOPRO_FIELD_OF_VIEW
mavlink20.GOPRO_FIELD_OF_VIEW_WIDE = 0 // 0x00: Wide.
mavlink20.GOPRO_FIELD_OF_VIEW_MEDIUM = 1 // 0x01: Medium.
mavlink20.GOPRO_FIELD_OF_VIEW_NARROW = 2 // 0x02: Narrow.
mavlink20.GOPRO_FIELD_OF_VIEW_ENUM_END = 3 //
// GOPRO_VIDEO_SETTINGS_FLAGS
mavlink20.GOPRO_VIDEO_SETTINGS_TV_MODE = 1 // 0=NTSC, 1=PAL.
mavlink20.GOPRO_VIDEO_SETTINGS_FLAGS_ENUM_END = 2 //
// GOPRO_PHOTO_RESOLUTION
mavlink20.GOPRO_PHOTO_RESOLUTION_5MP_MEDIUM = 0 // 5MP Medium.
mavlink20.GOPRO_PHOTO_RESOLUTION_7MP_MEDIUM = 1 // 7MP Medium.
mavlink20.GOPRO_PHOTO_RESOLUTION_7MP_WIDE = 2 // 7MP Wide.
mavlink20.GOPRO_PHOTO_RESOLUTION_10MP_WIDE = 3 // 10MP Wide.
mavlink20.GOPRO_PHOTO_RESOLUTION_12MP_WIDE = 4 // 12MP Wide.
mavlink20.GOPRO_PHOTO_RESOLUTION_ENUM_END = 5 //
// GOPRO_PROTUNE_WHITE_BALANCE
mavlink20.GOPRO_PROTUNE_WHITE_BALANCE_AUTO = 0 // Auto.
mavlink20.GOPRO_PROTUNE_WHITE_BALANCE_3000K = 1 // 3000K.
mavlink20.GOPRO_PROTUNE_WHITE_BALANCE_5500K = 2 // 5500K.
mavlink20.GOPRO_PROTUNE_WHITE_BALANCE_6500K = 3 // 6500K.
mavlink20.GOPRO_PROTUNE_WHITE_BALANCE_RAW = 4 // Camera Raw.
mavlink20.GOPRO_PROTUNE_WHITE_BALANCE_ENUM_END = 5 //
// GOPRO_PROTUNE_COLOUR
mavlink20.GOPRO_PROTUNE_COLOUR_STANDARD = 0 // Auto.
mavlink20.GOPRO_PROTUNE_COLOUR_NEUTRAL = 1 // Neutral.
mavlink20.GOPRO_PROTUNE_COLOUR_ENUM_END = 2 //
// GOPRO_PROTUNE_GAIN
mavlink20.GOPRO_PROTUNE_GAIN_400 = 0 // ISO 400.
mavlink20.GOPRO_PROTUNE_GAIN_800 = 1 // ISO 800 (Only Hero 4).
mavlink20.GOPRO_PROTUNE_GAIN_1600 = 2 // ISO 1600.
mavlink20.GOPRO_PROTUNE_GAIN_3200 = 3 // ISO 3200 (Only Hero 4).
mavlink20.GOPRO_PROTUNE_GAIN_6400 = 4 // ISO 6400.
mavlink20.GOPRO_PROTUNE_GAIN_ENUM_END = 5 //
// GOPRO_PROTUNE_SHARPNESS
mavlink20.GOPRO_PROTUNE_SHARPNESS_LOW = 0 // Low Sharpness.
mavlink20.GOPRO_PROTUNE_SHARPNESS_MEDIUM = 1 // Medium Sharpness.
mavlink20.GOPRO_PROTUNE_SHARPNESS_HIGH = 2 // High Sharpness.
mavlink20.GOPRO_PROTUNE_SHARPNESS_ENUM_END = 3 //
// GOPRO_PROTUNE_EXPOSURE
mavlink20.GOPRO_PROTUNE_EXPOSURE_NEG_5_0 = 0 // -5.0 EV (Hero 3+ Only).
mavlink20.GOPRO_PROTUNE_EXPOSURE_NEG_4_5 = 1 // -4.5 EV (Hero 3+ Only).
mavlink20.GOPRO_PROTUNE_EXPOSURE_NEG_4_0 = 2 // -4.0 EV (Hero 3+ Only).
mavlink20.GOPRO_PROTUNE_EXPOSURE_NEG_3_5 = 3 // -3.5 EV (Hero 3+ Only).
mavlink20.GOPRO_PROTUNE_EXPOSURE_NEG_3_0 = 4 // -3.0 EV (Hero 3+ Only).
mavlink20.GOPRO_PROTUNE_EXPOSURE_NEG_2_5 = 5 // -2.5 EV (Hero 3+ Only).
mavlink20.GOPRO_PROTUNE_EXPOSURE_NEG_2_0 = 6 // -2.0 EV.
mavlink20.GOPRO_PROTUNE_EXPOSURE_NEG_1_5 = 7 // -1.5 EV.
mavlink20.GOPRO_PROTUNE_EXPOSURE_NEG_1_0 = 8 // -1.0 EV.
mavlink20.GOPRO_PROTUNE_EXPOSURE_NEG_0_5 = 9 // -0.5 EV.
mavlink20.GOPRO_PROTUNE_EXPOSURE_ZERO = 10 // 0.0 EV.
mavlink20.GOPRO_PROTUNE_EXPOSURE_POS_0_5 = 11 // +0.5 EV.
mavlink20.GOPRO_PROTUNE_EXPOSURE_POS_1_0 = 12 // +1.0 EV.
mavlink20.GOPRO_PROTUNE_EXPOSURE_POS_1_5 = 13 // +1.5 EV.
mavlink20.GOPRO_PROTUNE_EXPOSURE_POS_2_0 = 14 // +2.0 EV.
mavlink20.GOPRO_PROTUNE_EXPOSURE_POS_2_5 = 15 // +2.5 EV (Hero 3+ Only).
mavlink20.GOPRO_PROTUNE_EXPOSURE_POS_3_0 = 16 // +3.0 EV (Hero 3+ Only).
mavlink20.GOPRO_PROTUNE_EXPOSURE_POS_3_5 = 17 // +3.5 EV (Hero 3+ Only).
mavlink20.GOPRO_PROTUNE_EXPOSURE_POS_4_0 = 18 // +4.0 EV (Hero 3+ Only).
mavlink20.GOPRO_PROTUNE_EXPOSURE_POS_4_5 = 19 // +4.5 EV (Hero 3+ Only).
mavlink20.GOPRO_PROTUNE_EXPOSURE_POS_5_0 = 20 // +5.0 EV (Hero 3+ Only).
mavlink20.GOPRO_PROTUNE_EXPOSURE_ENUM_END = 21 //
// GOPRO_CHARGING
mavlink20.GOPRO_CHARGING_DISABLED = 0 // Charging disabled.
mavlink20.GOPRO_CHARGING_ENABLED = 1 // Charging enabled.
mavlink20.GOPRO_CHARGING_ENUM_END = 2 //
// GOPRO_MODEL
mavlink20.GOPRO_MODEL_UNKNOWN = 0 // Unknown gopro model.
mavlink20.GOPRO_MODEL_HERO_3_PLUS_SILVER = 1 // Hero 3+ Silver (HeroBus not supported by GoPro).
mavlink20.GOPRO_MODEL_HERO_3_PLUS_BLACK = 2 // Hero 3+ Black.
mavlink20.GOPRO_MODEL_HERO_4_SILVER = 3 // Hero 4 Silver.
mavlink20.GOPRO_MODEL_HERO_4_BLACK = 4 // Hero 4 Black.
mavlink20.GOPRO_MODEL_ENUM_END = 5 //
// GOPRO_BURST_RATE
mavlink20.GOPRO_BURST_RATE_3_IN_1_SECOND = 0 // 3 Shots / 1 Second.
mavlink20.GOPRO_BURST_RATE_5_IN_1_SECOND = 1 // 5 Shots / 1 Second.
mavlink20.GOPRO_BURST_RATE_10_IN_1_SECOND = 2 // 10 Shots / 1 Second.
mavlink20.GOPRO_BURST_RATE_10_IN_2_SECOND = 3 // 10 Shots / 2 Second.
mavlink20.GOPRO_BURST_RATE_10_IN_3_SECOND = 4 // 10 Shots / 3 Second (Hero 4 Only).
mavlink20.GOPRO_BURST_RATE_30_IN_1_SECOND = 5 // 30 Shots / 1 Second.
mavlink20.GOPRO_BURST_RATE_30_IN_2_SECOND = 6 // 30 Shots / 2 Second.
mavlink20.GOPRO_BURST_RATE_30_IN_3_SECOND = 7 // 30 Shots / 3 Second.
mavlink20.GOPRO_BURST_RATE_30_IN_6_SECOND = 8 // 30 Shots / 6 Second.
mavlink20.GOPRO_BURST_RATE_ENUM_END = 9 //
// LED_CONTROL_PATTERN
mavlink20.LED_CONTROL_PATTERN_OFF = 0 // LED patterns off (return control to regular vehicle control).
mavlink20.LED_CONTROL_PATTERN_FIRMWAREUPDATE = 1 // LEDs show pattern during firmware update.
mavlink20.LED_CONTROL_PATTERN_CUSTOM = 255 // Custom Pattern using custom bytes fields.
mavlink20.LED_CONTROL_PATTERN_ENUM_END = 256 //
// EKF_STATUS_FLAGS
mavlink20.EKF_ATTITUDE = 1 // Set if EKF's attitude estimate is good.
mavlink20.EKF_VELOCITY_HORIZ = 2 // Set if EKF's horizontal velocity estimate is good.
mavlink20.EKF_VELOCITY_VERT = 4 // Set if EKF's vertical velocity estimate is good.
mavlink20.EKF_POS_HORIZ_REL = 8 // Set if EKF's horizontal position (relative) estimate is good.
mavlink20.EKF_POS_HORIZ_ABS = 16 // Set if EKF's horizontal position (absolute) estimate is good.
mavlink20.EKF_POS_VERT_ABS = 32 // Set if EKF's vertical position (absolute) estimate is good.
mavlink20.EKF_POS_VERT_AGL = 64 // Set if EKF's vertical position (above ground) estimate is good.
mavlink20.EKF_CONST_POS_MODE = 128 // EKF is in constant position mode and does not know it's absolute or
// relative position.
mavlink20.EKF_PRED_POS_HORIZ_REL = 256 // Set if EKF's predicted horizontal position (relative) estimate is
// good.
mavlink20.EKF_PRED_POS_HORIZ_ABS = 512 // Set if EKF's predicted horizontal position (absolute) estimate is
// good.
mavlink20.EKF_UNINITIALIZED = 1024 // Set if EKF has never been healthy.
mavlink20.EKF_STATUS_FLAGS_ENUM_END = 1025 //
// PID_TUNING_AXIS
mavlink20.PID_TUNING_ROLL = 1 //
mavlink20.PID_TUNING_PITCH = 2 //
mavlink20.PID_TUNING_YAW = 3 //
mavlink20.PID_TUNING_ACCZ = 4 //
mavlink20.PID_TUNING_STEER = 5 //
mavlink20.PID_TUNING_LANDING = 6 //
mavlink20.PID_TUNING_AXIS_ENUM_END = 7 //
// MAV_REMOTE_LOG_DATA_BLOCK_COMMANDS
mavlink20.MAV_REMOTE_LOG_DATA_BLOCK_STOP = 2147483645 // UAV to stop sending DataFlash blocks.
mavlink20.MAV_REMOTE_LOG_DATA_BLOCK_START = 2147483646 // UAV to start sending DataFlash blocks.
mavlink20.MAV_REMOTE_LOG_DATA_BLOCK_COMMANDS_ENUM_END = 2147483647 //
// MAV_REMOTE_LOG_DATA_BLOCK_STATUSES
mavlink20.MAV_REMOTE_LOG_DATA_BLOCK_NACK = 0 // This block has NOT been received.
mavlink20.MAV_REMOTE_LOG_DATA_BLOCK_ACK = 1 // This block has been received.
mavlink20.MAV_REMOTE_LOG_DATA_BLOCK_STATUSES_ENUM_END = 2 //
// DEVICE_OP_BUSTYPE
mavlink20.DEVICE_OP_BUSTYPE_I2C = 0 // I2C Device operation.
mavlink20.DEVICE_OP_BUSTYPE_SPI = 1 // SPI Device operation.
mavlink20.DEVICE_OP_BUSTYPE_ENUM_END = 2 //
// DEEPSTALL_STAGE
mavlink20.DEEPSTALL_STAGE_FLY_TO_LANDING = 0 // Flying to the landing point.
mavlink20.DEEPSTALL_STAGE_ESTIMATE_WIND = 1 // Building an estimate of the wind.
mavlink20.DEEPSTALL_STAGE_WAIT_FOR_BREAKOUT = 2 // Waiting to breakout of the loiter to fly the approach.
mavlink20.DEEPSTALL_STAGE_FLY_TO_ARC = 3 // Flying to the first arc point to turn around to the landing point.
mavlink20.DEEPSTALL_STAGE_ARC = 4 // Turning around back to the deepstall landing point.
mavlink20.DEEPSTALL_STAGE_APPROACH = 5 // Approaching the landing point.
mavlink20.DEEPSTALL_STAGE_LAND = 6 // Stalling and steering towards the land point.
mavlink20.DEEPSTALL_STAGE_ENUM_END = 7 //
// PLANE_MODE
mavlink20.PLANE_MODE_MANUAL = 0 //
mavlink20.PLANE_MODE_CIRCLE = 1 //
mavlink20.PLANE_MODE_STABILIZE = 2 //
mavlink20.PLANE_MODE_TRAINING = 3 //
mavlink20.PLANE_MODE_ACRO = 4 //
mavlink20.PLANE_MODE_FLY_BY_WIRE_A = 5 //
mavlink20.PLANE_MODE_FLY_BY_WIRE_B = 6 //
mavlink20.PLANE_MODE_CRUISE = 7 //
mavlink20.PLANE_MODE_AUTOTUNE = 8 //
mavlink20.PLANE_MODE_AUTO = 10 //
mavlink20.PLANE_MODE_RTL = 11 //
mavlink20.PLANE_MODE_LOITER = 12 //
mavlink20.PLANE_MODE_TAKEOFF = 13 //
mavlink20.PLANE_MODE_AVOID_ADSB = 14 //
mavlink20.PLANE_MODE_GUIDED = 15 //
mavlink20.PLANE_MODE_INITIALIZING = 16 //
mavlink20.PLANE_MODE_QSTABILIZE = 17 //
mavlink20.PLANE_MODE_QHOVER = 18 //
mavlink20.PLANE_MODE_QLOITER = 19 //
mavlink20.PLANE_MODE_QLAND = 20 //
mavlink20.PLANE_MODE_QRTL = 21 //
mavlink20.PLANE_MODE_QAUTOTUNE = 22 //
mavlink20.PLANE_MODE_ENUM_END = 23 //
// COPTER_MODE
mavlink20.COPTER_MODE_STABILIZE = 0 //
mavlink20.COPTER_MODE_ACRO = 1 //
mavlink20.COPTER_MODE_ALT_HOLD = 2 //
mavlink20.COPTER_MODE_AUTO = 3 //
mavlink20.COPTER_MODE_GUIDED = 4 //
mavlink20.COPTER_MODE_LOITER = 5 //
mavlink20.COPTER_MODE_RTL = 6 //
mavlink20.COPTER_MODE_CIRCLE = 7 //
mavlink20.COPTER_MODE_LAND = 9 //
mavlink20.COPTER_MODE_DRIFT = 11 //
mavlink20.COPTER_MODE_SPORT = 13 //
mavlink20.COPTER_MODE_FLIP = 14 //
mavlink20.COPTER_MODE_AUTOTUNE = 15 //
mavlink20.COPTER_MODE_POSHOLD = 16 //
mavlink20.COPTER_MODE_BRAKE = 17 //
mavlink20.COPTER_MODE_THROW = 18 //
mavlink20.COPTER_MODE_AVOID_ADSB = 19 //
mavlink20.COPTER_MODE_GUIDED_NOGPS = 20 //
mavlink20.COPTER_MODE_SMART_RTL = 21 //
mavlink20.COPTER_MODE_ENUM_END = 22 //
// SUB_MODE
mavlink20.SUB_MODE_STABILIZE = 0 //
mavlink20.SUB_MODE_ACRO = 1 //
mavlink20.SUB_MODE_ALT_HOLD = 2 //
mavlink20.SUB_MODE_AUTO = 3 //
mavlink20.SUB_MODE_GUIDED = 4 //
mavlink20.SUB_MODE_CIRCLE = 7 //
mavlink20.SUB_MODE_SURFACE = 9 //
mavlink20.SUB_MODE_POSHOLD = 16 //
mavlink20.SUB_MODE_MANUAL = 19 //
mavlink20.SUB_MODE_ENUM_END = 20 //
// ROVER_MODE
mavlink20.ROVER_MODE_MANUAL = 0 //
mavlink20.ROVER_MODE_ACRO = 1 //
mavlink20.ROVER_MODE_STEERING = 3 //
mavlink20.ROVER_MODE_HOLD = 4 //
mavlink20.ROVER_MODE_LOITER = 5 //
mavlink20.ROVER_MODE_AUTO = 10 //
mavlink20.ROVER_MODE_RTL = 11 //
mavlink20.ROVER_MODE_SMART_RTL = 12 //
mavlink20.ROVER_MODE_GUIDED = 15 //
mavlink20.ROVER_MODE_INITIALIZING = 16 //
mavlink20.ROVER_MODE_ENUM_END = 17 //
// TRACKER_MODE
mavlink20.TRACKER_MODE_MANUAL = 0 //
mavlink20.TRACKER_MODE_STOP = 1 //
mavlink20.TRACKER_MODE_SCAN = 2 //
mavlink20.TRACKER_MODE_SERVO_TEST = 3 //
mavlink20.TRACKER_MODE_AUTO = 10 //
mavlink20.TRACKER_MODE_INITIALIZING = 16 //
mavlink20.TRACKER_MODE_ENUM_END = 17 //
// FIRMWARE_VERSION_TYPE
mavlink20.FIRMWARE_VERSION_TYPE_DEV = 0 // development release
mavlink20.FIRMWARE_VERSION_TYPE_ALPHA = 64 // alpha release
mavlink20.FIRMWARE_VERSION_TYPE_BETA = 128 // beta release
mavlink20.FIRMWARE_VERSION_TYPE_RC = 192 // release candidate
mavlink20.FIRMWARE_VERSION_TYPE_OFFICIAL = 255 // official stable release
mavlink20.FIRMWARE_VERSION_TYPE_ENUM_END = 256 //
// HL_FAILURE_FLAG
mavlink20.HL_FAILURE_FLAG_GPS = 1 // GPS failure.
mavlink20.HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 // Differential pressure sensor failure.
mavlink20.HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 // Absolute pressure sensor failure.
mavlink20.HL_FAILURE_FLAG_3D_ACCEL = 8 // Accelerometer sensor failure.
mavlink20.HL_FAILURE_FLAG_3D_GYRO = 16 // Gyroscope sensor failure.