Skip to content

definition

MAVLink protocol implementation (auto-generated by mavgen.py)

Generated from: ('swingby.xml,command.xml,diagnostics.xml,model.xml,sensor.xml,system.xml,transport.xml',)

Note: this file has been auto-generated. DO NOT EDIT

Classes:

MAVError

MAVError(msg: str)

              flowchart TD
              mavlink.definition.MAVError[MAVError]

              

              click mavlink.definition.MAVError href "" "mavlink.definition.MAVError"
            

MAVLink error class

Source code in src/mavlink/definition.py
4787
4788
4789
def __init__(self, msg: str) -> None:
    Exception.__init__(self, msg)
    self.message = msg
MAVLink(file: Any, srcSystem: int = 0, srcComponent: int = 0, use_native: bool = False)

              flowchart TD
              mavlink.definition.MAVLink[MAVLink]

              

              click mavlink.definition.MAVLink href "" "mavlink.definition.MAVLink"
            

MAVLink protocol handling class

Methods:

Source code in src/mavlink/definition.py
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
def __init__(self, file: Any, srcSystem: int = 0, srcComponent: int = 0, use_native: bool = False) -> None:
    self.seq = 0
    self.file = file
    self.srcSystem = srcSystem
    self.srcComponent = srcComponent
    self.callback: Optional[Callable[..., None]] = None
    self.callback_args: Optional[Iterable[Any]] = None
    self.callback_kwargs: Optional[Mapping[str, Any]] = None
    self.send_callback: Optional[Callable[..., None]] = None
    self.send_callback_args: Optional[Iterable[Any]] = None
    self.send_callback_kwargs: Optional[Mapping[str, Any]] = None
    self.buf = bytearray()
    self.buf_index = 0
    self.expected_length = HEADER_LEN_V1 + 2
    self.have_prefix_error = False
    self.robust_parsing = False
    self.protocol_marker = 253
    self.little_endian = True
    self.crc_extra = True
    self.sort_fields = True
    self.total_packets_sent = 0
    self.total_bytes_sent = 0
    self.total_packets_received = 0
    self.total_bytes_received = 0
    self.total_receive_errors = 0
    self.startup_time = time.time()
    self.signing = MAVLinkSigning()
    self.mav20_unpacker = struct.Struct("<cBBBBBBHB")
    self.mav10_unpacker = struct.Struct("<cBBBBB")
    self.mav20_h3_unpacker = struct.Struct("BBB")
    self.mav_csum_unpacker = struct.Struct("<H")
    self.mav_sign_unpacker = struct.Struct("<IH")

actuator_output_status_encode

actuator_output_status_encode(time_usec: int, active: int, actuator: Sequence[float]) -> MAVLink_actuator_output_status_message

The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW.

time_usec : Timestamp (since system boot). [us] (type:uint64_t) active : Active outputs (type:uint32_t) actuator : Servo / motor output array values. Zero values indicate unused channels. (type:float)

Source code in src/mavlink/definition.py
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
def actuator_output_status_encode(self, time_usec: int, active: int, actuator: Sequence[float]) -> MAVLink_actuator_output_status_message:
    """
    The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN,
    AUX ports). This message supersedes SERVO_OUTPUT_RAW.

    time_usec                 : Timestamp (since system boot). [us] (type:uint64_t)
    active                    : Active outputs (type:uint32_t)
    actuator                  : Servo / motor output array values. Zero values indicate unused channels. (type:float)

    """
    return MAVLink_actuator_output_status_message(time_usec, active, actuator)

actuator_output_status_send

actuator_output_status_send(time_usec: int, active: int, actuator: Sequence[float], force_mavlink1: bool = False) -> None

The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW.

time_usec : Timestamp (since system boot). [us] (type:uint64_t) active : Active outputs (type:uint32_t) actuator : Servo / motor output array values. Zero values indicate unused channels. (type:float)

Source code in src/mavlink/definition.py
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
def actuator_output_status_send(self, time_usec: int, active: int, actuator: Sequence[float], force_mavlink1: bool = False) -> None:
    """
    The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN,
    AUX ports). This message supersedes SERVO_OUTPUT_RAW.

    time_usec                 : Timestamp (since system boot). [us] (type:uint64_t)
    active                    : Active outputs (type:uint32_t)
    actuator                  : Servo / motor output array values. Zero values indicate unused channels. (type:float)

    """
    self.send(self.actuator_output_status_encode(time_usec, active, actuator), force_mavlink1=force_mavlink1)

airspeed_encode

airspeed_encode(id: int, airspeed: float, temperature: int, raw_press: float, flags: int) -> MAVLink_airspeed_message

Airspeed information from a sensor.

id : Sensor ID. (type:uint8_t) airspeed : Calibrated airspeed (CAS). [m/s] (type:float) temperature : Temperature. [cdegC] (type:int16_t) raw_press : Raw differential pressure. [hPa] (type:float) flags : Airspeed sensor flags. (type:uint8_t, values:AIRSPEED_SENSOR_FLAGS)

Source code in src/mavlink/definition.py
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
def airspeed_encode(self, id: int, airspeed: float, temperature: int, raw_press: float, flags: int) -> MAVLink_airspeed_message:
    """
    Airspeed information from a sensor.

    id                        : Sensor ID. (type:uint8_t)
    airspeed                  : Calibrated airspeed (CAS). [m/s] (type:float)
    temperature               : Temperature. [cdegC] (type:int16_t)
    raw_press                 : Raw differential pressure. [hPa] (type:float)
    flags                     : Airspeed sensor flags. (type:uint8_t, values:AIRSPEED_SENSOR_FLAGS)

    """
    return MAVLink_airspeed_message(id, airspeed, temperature, raw_press, flags)

airspeed_send

airspeed_send(id: int, airspeed: float, temperature: int, raw_press: float, flags: int, force_mavlink1: bool = False) -> None

Airspeed information from a sensor.

id : Sensor ID. (type:uint8_t) airspeed : Calibrated airspeed (CAS). [m/s] (type:float) temperature : Temperature. [cdegC] (type:int16_t) raw_press : Raw differential pressure. [hPa] (type:float) flags : Airspeed sensor flags. (type:uint8_t, values:AIRSPEED_SENSOR_FLAGS)

Source code in src/mavlink/definition.py
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
def airspeed_send(self, id: int, airspeed: float, temperature: int, raw_press: float, flags: int, force_mavlink1: bool = False) -> None:
    """
    Airspeed information from a sensor.

    id                        : Sensor ID. (type:uint8_t)
    airspeed                  : Calibrated airspeed (CAS). [m/s] (type:float)
    temperature               : Temperature. [cdegC] (type:int16_t)
    raw_press                 : Raw differential pressure. [hPa] (type:float)
    flags                     : Airspeed sensor flags. (type:uint8_t, values:AIRSPEED_SENSOR_FLAGS)

    """
    self.send(self.airspeed_encode(id, airspeed, temperature, raw_press, flags), force_mavlink1=force_mavlink1)

altitude_encode

altitude_encode(time_usec: int, altitude_monotonic: float, altitude_amsl: float, altitude_local: float, altitude_relative: float, altitude_terrain: float, bottom_clearance: float) -> MAVLink_altitude_message

The current system altitude.

time_usec : Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. [us] (type:uint64_t) altitude_monotonic : This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights. [m] (type:float) altitude_amsl : This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is not the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude. [m] (type:float) altitude_local : This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive. [m] (type:float) altitude_relative : This is the altitude above the home position. It resets on each change of the current home position. [m] (type:float) altitude_terrain : This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown. [m] (type:float) bottom_clearance : This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available. [m] (type:float)

Source code in src/mavlink/definition.py
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
def altitude_encode(self, time_usec: int, altitude_monotonic: float, altitude_amsl: float, altitude_local: float, altitude_relative: float, altitude_terrain: float, bottom_clearance: float) -> MAVLink_altitude_message:
    """
    The current system altitude.

    time_usec                 : Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. [us] (type:uint64_t)
    altitude_monotonic        : This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights. [m] (type:float)
    altitude_amsl             : This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude. [m] (type:float)
    altitude_local            : This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive. [m] (type:float)
    altitude_relative         : This is the altitude above the home position. It resets on each change of the current home position. [m] (type:float)
    altitude_terrain          : This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown. [m] (type:float)
    bottom_clearance          : This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available. [m] (type:float)

    """
    return MAVLink_altitude_message(time_usec, altitude_monotonic, altitude_amsl, altitude_local, altitude_relative, altitude_terrain, bottom_clearance)

altitude_send

altitude_send(time_usec: int, altitude_monotonic: float, altitude_amsl: float, altitude_local: float, altitude_relative: float, altitude_terrain: float, bottom_clearance: float, force_mavlink1: bool = False) -> None

The current system altitude.

time_usec : Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. [us] (type:uint64_t) altitude_monotonic : This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights. [m] (type:float) altitude_amsl : This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is not the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude. [m] (type:float) altitude_local : This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive. [m] (type:float) altitude_relative : This is the altitude above the home position. It resets on each change of the current home position. [m] (type:float) altitude_terrain : This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown. [m] (type:float) bottom_clearance : This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available. [m] (type:float)

Source code in src/mavlink/definition.py
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
def altitude_send(self, time_usec: int, altitude_monotonic: float, altitude_amsl: float, altitude_local: float, altitude_relative: float, altitude_terrain: float, bottom_clearance: float, force_mavlink1: bool = False) -> None:
    """
    The current system altitude.

    time_usec                 : Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. [us] (type:uint64_t)
    altitude_monotonic        : This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights. [m] (type:float)
    altitude_amsl             : This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude. [m] (type:float)
    altitude_local            : This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive. [m] (type:float)
    altitude_relative         : This is the altitude above the home position. It resets on each change of the current home position. [m] (type:float)
    altitude_terrain          : This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown. [m] (type:float)
    bottom_clearance          : This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available. [m] (type:float)

    """
    self.send(self.altitude_encode(time_usec, altitude_monotonic, altitude_amsl, altitude_local, altitude_relative, altitude_terrain, bottom_clearance), force_mavlink1=force_mavlink1)

angle_of_attack_encode

angle_of_attack_encode(time_boot_ms: int, aoa: float) -> MAVLink_angle_of_attack_message

Angle of Attack

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) aoa : Angle of attack [deg] (type:float)

Source code in src/mavlink/definition.py
5953
5954
5955
5956
5957
5958
5959
5960
5961
def angle_of_attack_encode(self, time_boot_ms: int, aoa: float) -> MAVLink_angle_of_attack_message:
    """
    Angle of Attack

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    aoa                       : Angle of attack [deg] (type:float)

    """
    return MAVLink_angle_of_attack_message(time_boot_ms, aoa)

angle_of_attack_send

angle_of_attack_send(time_boot_ms: int, aoa: float, force_mavlink1: bool = False) -> None

Angle of Attack

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) aoa : Angle of attack [deg] (type:float)

Source code in src/mavlink/definition.py
5963
5964
5965
5966
5967
5968
5969
5970
5971
def angle_of_attack_send(self, time_boot_ms: int, aoa: float, force_mavlink1: bool = False) -> None:
    """
    Angle of Attack

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    aoa                       : Angle of attack [deg] (type:float)

    """
    self.send(self.angle_of_attack_encode(time_boot_ms, aoa), force_mavlink1=force_mavlink1)

angle_of_slideslip_encode

angle_of_slideslip_encode(time_boot_ms: int, aos: float) -> MAVLink_angle_of_slideslip_message

Angle of Slideslip

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) aos : Angle of slideslip [deg] (type:float)

Source code in src/mavlink/definition.py
5973
5974
5975
5976
5977
5978
5979
5980
5981
def angle_of_slideslip_encode(self, time_boot_ms: int, aos: float) -> MAVLink_angle_of_slideslip_message:
    """
    Angle of Slideslip

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    aos                       : Angle of slideslip [deg] (type:float)

    """
    return MAVLink_angle_of_slideslip_message(time_boot_ms, aos)

angle_of_slideslip_send

angle_of_slideslip_send(time_boot_ms: int, aos: float, force_mavlink1: bool = False) -> None

Angle of Slideslip

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) aos : Angle of slideslip [deg] (type:float)

Source code in src/mavlink/definition.py
5983
5984
5985
5986
5987
5988
5989
5990
5991
def angle_of_slideslip_send(self, time_boot_ms: int, aos: float, force_mavlink1: bool = False) -> None:
    """
    Angle of Slideslip

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    aos                       : Angle of slideslip [deg] (type:float)

    """
    self.send(self.angle_of_slideslip_encode(time_boot_ms, aos), force_mavlink1=force_mavlink1)

attitude_encode

attitude_encode(time_boot_ms: int, roll: float, pitch: float, yaw: float, rollspeed: float, pitchspeed: float, yawspeed: float) -> MAVLink_attitude_message

The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic).

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) roll : Roll angle (-pi..+pi) [rad] (type:float) pitch : Pitch angle (-pi..+pi) [rad] (type:float) yaw : Yaw angle (-pi..+pi) [rad] (type:float) rollspeed : Roll angular speed [rad/s] (type:float) pitchspeed : Pitch angular speed [rad/s] (type:float) yawspeed : Yaw angular speed [rad/s] (type:float)

Source code in src/mavlink/definition.py
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
def attitude_encode(self, time_boot_ms: int, roll: float, pitch: float, yaw: float, rollspeed: float, pitchspeed: float, yawspeed: float) -> MAVLink_attitude_message:
    """
    The attitude in the aeronautical frame (right-handed, Z-down, Y-right,
    X-front, ZYX, intrinsic).

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    roll                      : Roll angle (-pi..+pi) [rad] (type:float)
    pitch                     : Pitch angle (-pi..+pi) [rad] (type:float)
    yaw                       : Yaw angle (-pi..+pi) [rad] (type:float)
    rollspeed                 : Roll angular speed [rad/s] (type:float)
    pitchspeed                : Pitch angular speed [rad/s] (type:float)
    yawspeed                  : Yaw angular speed [rad/s] (type:float)

    """
    return MAVLink_attitude_message(time_boot_ms, roll, pitch, yaw, rollspeed, pitchspeed, yawspeed)

attitude_quaternion_encode

attitude_quaternion_encode(time_boot_ms: int, q1: float, q2: float, q3: float, q4: float, rollspeed: float, pitchspeed: float, yawspeed: float, repr_offset_q: Sequence[float] = (0, 0, 0, 0)) -> MAVLink_attitude_quaternion_message

The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0).

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) q1 : Quaternion component 1, w (1 in null-rotation) (type:float) q2 : Quaternion component 2, x (0 in null-rotation) (type:float) q3 : Quaternion component 3, y (0 in null-rotation) (type:float) q4 : Quaternion component 4, z (0 in null-rotation) (type:float) rollspeed : Roll angular speed [rad/s] (type:float) pitchspeed : Pitch angular speed [rad/s] (type:float) yawspeed : Yaw angular speed [rad/s] (type:float) repr_offset_q : Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode. (type:float)

Source code in src/mavlink/definition.py
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
def attitude_quaternion_encode(self, time_boot_ms: int, q1: float, q2: float, q3: float, q4: float, rollspeed: float, pitchspeed: float, yawspeed: float, repr_offset_q: Sequence[float] = (0, 0, 0, 0)) -> MAVLink_attitude_quaternion_message:
    """
    The attitude in the aeronautical frame (right-handed, Z-down, X-front,
    Y-right), expressed as quaternion. Quaternion order is w, x,
    y, z and a zero rotation would be expressed as (1 0 0 0).

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    q1                        : Quaternion component 1, w (1 in null-rotation) (type:float)
    q2                        : Quaternion component 2, x (0 in null-rotation) (type:float)
    q3                        : Quaternion component 3, y (0 in null-rotation) (type:float)
    q4                        : Quaternion component 4, z (0 in null-rotation) (type:float)
    rollspeed                 : Roll angular speed [rad/s] (type:float)
    pitchspeed                : Pitch angular speed [rad/s] (type:float)
    yawspeed                  : Yaw angular speed [rad/s] (type:float)
    repr_offset_q             : Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode. (type:float)

    """
    return MAVLink_attitude_quaternion_message(time_boot_ms, q1, q2, q3, q4, rollspeed, pitchspeed, yawspeed, repr_offset_q)

attitude_quaternion_send

attitude_quaternion_send(time_boot_ms: int, q1: float, q2: float, q3: float, q4: float, rollspeed: float, pitchspeed: float, yawspeed: float, repr_offset_q: Sequence[float] = (0, 0, 0, 0), force_mavlink1: bool = False) -> None

The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0).

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) q1 : Quaternion component 1, w (1 in null-rotation) (type:float) q2 : Quaternion component 2, x (0 in null-rotation) (type:float) q3 : Quaternion component 3, y (0 in null-rotation) (type:float) q4 : Quaternion component 4, z (0 in null-rotation) (type:float) rollspeed : Roll angular speed [rad/s] (type:float) pitchspeed : Pitch angular speed [rad/s] (type:float) yawspeed : Yaw angular speed [rad/s] (type:float) repr_offset_q : Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode. (type:float)

Source code in src/mavlink/definition.py
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
def attitude_quaternion_send(self, time_boot_ms: int, q1: float, q2: float, q3: float, q4: float, rollspeed: float, pitchspeed: float, yawspeed: float, repr_offset_q: Sequence[float] = (0, 0, 0, 0), force_mavlink1: bool = False) -> None:
    """
    The attitude in the aeronautical frame (right-handed, Z-down, X-front,
    Y-right), expressed as quaternion. Quaternion order is w, x,
    y, z and a zero rotation would be expressed as (1 0 0 0).

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    q1                        : Quaternion component 1, w (1 in null-rotation) (type:float)
    q2                        : Quaternion component 2, x (0 in null-rotation) (type:float)
    q3                        : Quaternion component 3, y (0 in null-rotation) (type:float)
    q4                        : Quaternion component 4, z (0 in null-rotation) (type:float)
    rollspeed                 : Roll angular speed [rad/s] (type:float)
    pitchspeed                : Pitch angular speed [rad/s] (type:float)
    yawspeed                  : Yaw angular speed [rad/s] (type:float)
    repr_offset_q             : Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode. (type:float)

    """
    self.send(self.attitude_quaternion_encode(time_boot_ms, q1, q2, q3, q4, rollspeed, pitchspeed, yawspeed, repr_offset_q), force_mavlink1=force_mavlink1)

attitude_send

attitude_send(time_boot_ms: int, roll: float, pitch: float, yaw: float, rollspeed: float, pitchspeed: float, yawspeed: float, force_mavlink1: bool = False) -> None

The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic).

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) roll : Roll angle (-pi..+pi) [rad] (type:float) pitch : Pitch angle (-pi..+pi) [rad] (type:float) yaw : Yaw angle (-pi..+pi) [rad] (type:float) rollspeed : Roll angular speed [rad/s] (type:float) pitchspeed : Pitch angular speed [rad/s] (type:float) yawspeed : Yaw angular speed [rad/s] (type:float)

Source code in src/mavlink/definition.py
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
def attitude_send(self, time_boot_ms: int, roll: float, pitch: float, yaw: float, rollspeed: float, pitchspeed: float, yawspeed: float, force_mavlink1: bool = False) -> None:
    """
    The attitude in the aeronautical frame (right-handed, Z-down, Y-right,
    X-front, ZYX, intrinsic).

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    roll                      : Roll angle (-pi..+pi) [rad] (type:float)
    pitch                     : Pitch angle (-pi..+pi) [rad] (type:float)
    yaw                       : Yaw angle (-pi..+pi) [rad] (type:float)
    rollspeed                 : Roll angular speed [rad/s] (type:float)
    pitchspeed                : Pitch angular speed [rad/s] (type:float)
    yawspeed                  : Yaw angular speed [rad/s] (type:float)

    """
    self.send(self.attitude_encode(time_boot_ms, roll, pitch, yaw, rollspeed, pitchspeed, yawspeed), force_mavlink1=force_mavlink1)

autopilot_version_encode

autopilot_version_encode(capabilities: int, flight_sw_version: int, middleware_sw_version: int, os_sw_version: int, board_version: int, flight_custom_version: Sequence[int], middleware_custom_version: Sequence[int], os_custom_version: Sequence[int], vendor_id: int, product_id: int, uid: int, uid2: Sequence[int] = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) -> MAVLink_autopilot_version_message

Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE.

capabilities : Bitmap of capabilities (type:uint64_t, values:MAV_PROTOCOL_CAPABILITY) flight_sw_version : Firmware version number. The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE). (type:uint32_t) middleware_sw_version : Middleware version number (type:uint32_t) os_sw_version : Operating system version number (type:uint32_t) board_version : HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify a board type from an enumeration stored at https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt and with extensive additions at https://github.com/ArduPilot/ardupilot/blob/master/Tools/AP_Bootloader/board_types.txt (type:uint32_t) flight_custom_version : Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. (type:uint8_t) middleware_custom_version : Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. (type:uint8_t) os_custom_version : Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. (type:uint8_t) vendor_id : ID of the board vendor (type:uint16_t) product_id : ID of the product (type:uint16_t) uid : UID if provided by hardware (see uid2) (type:uint64_t) uid2 : UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid) (type:uint8_t)

Source code in src/mavlink/definition.py
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
def autopilot_version_encode(self, capabilities: int, flight_sw_version: int, middleware_sw_version: int, os_sw_version: int, board_version: int, flight_custom_version: Sequence[int], middleware_custom_version: Sequence[int], os_custom_version: Sequence[int], vendor_id: int, product_id: int, uid: int, uid2: Sequence[int] = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) -> MAVLink_autopilot_version_message:
    """
    Version and capability of autopilot software. This should be emitted
    in response to a request with MAV_CMD_REQUEST_MESSAGE.

    capabilities              : Bitmap of capabilities (type:uint64_t, values:MAV_PROTOCOL_CAPABILITY)
    flight_sw_version         : Firmware version number.
    The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE). (type:uint32_t)
    middleware_sw_version        : Middleware version number (type:uint32_t)
    os_sw_version             : Operating system version number (type:uint32_t)
    board_version             : HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify a board type from an enumeration stored at https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt and with extensive additions at https://github.com/ArduPilot/ardupilot/blob/master/Tools/AP_Bootloader/board_types.txt (type:uint32_t)
    flight_custom_version        : Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. (type:uint8_t)
    middleware_custom_version        : Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. (type:uint8_t)
    os_custom_version         : Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. (type:uint8_t)
    vendor_id                 : ID of the board vendor (type:uint16_t)
    product_id                : ID of the product (type:uint16_t)
    uid                       : UID if provided by hardware (see uid2) (type:uint64_t)
    uid2                      : UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid) (type:uint8_t)

    """
    return MAVLink_autopilot_version_message(capabilities, flight_sw_version, middleware_sw_version, os_sw_version, board_version, flight_custom_version, middleware_custom_version, os_custom_version, vendor_id, product_id, uid, uid2)

autopilot_version_send

autopilot_version_send(capabilities: int, flight_sw_version: int, middleware_sw_version: int, os_sw_version: int, board_version: int, flight_custom_version: Sequence[int], middleware_custom_version: Sequence[int], os_custom_version: Sequence[int], vendor_id: int, product_id: int, uid: int, uid2: Sequence[int] = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), force_mavlink1: bool = False) -> None

Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE.

capabilities : Bitmap of capabilities (type:uint64_t, values:MAV_PROTOCOL_CAPABILITY) flight_sw_version : Firmware version number. The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE). (type:uint32_t) middleware_sw_version : Middleware version number (type:uint32_t) os_sw_version : Operating system version number (type:uint32_t) board_version : HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify a board type from an enumeration stored at https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt and with extensive additions at https://github.com/ArduPilot/ardupilot/blob/master/Tools/AP_Bootloader/board_types.txt (type:uint32_t) flight_custom_version : Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. (type:uint8_t) middleware_custom_version : Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. (type:uint8_t) os_custom_version : Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. (type:uint8_t) vendor_id : ID of the board vendor (type:uint16_t) product_id : ID of the product (type:uint16_t) uid : UID if provided by hardware (see uid2) (type:uint64_t) uid2 : UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid) (type:uint8_t)

Source code in src/mavlink/definition.py
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
def autopilot_version_send(self, capabilities: int, flight_sw_version: int, middleware_sw_version: int, os_sw_version: int, board_version: int, flight_custom_version: Sequence[int], middleware_custom_version: Sequence[int], os_custom_version: Sequence[int], vendor_id: int, product_id: int, uid: int, uid2: Sequence[int] = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), force_mavlink1: bool = False) -> None:
    """
    Version and capability of autopilot software. This should be emitted
    in response to a request with MAV_CMD_REQUEST_MESSAGE.

    capabilities              : Bitmap of capabilities (type:uint64_t, values:MAV_PROTOCOL_CAPABILITY)
    flight_sw_version         : Firmware version number.
    The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE). (type:uint32_t)
    middleware_sw_version        : Middleware version number (type:uint32_t)
    os_sw_version             : Operating system version number (type:uint32_t)
    board_version             : HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify a board type from an enumeration stored at https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt and with extensive additions at https://github.com/ArduPilot/ardupilot/blob/master/Tools/AP_Bootloader/board_types.txt (type:uint32_t)
    flight_custom_version        : Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. (type:uint8_t)
    middleware_custom_version        : Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. (type:uint8_t)
    os_custom_version         : Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases. (type:uint8_t)
    vendor_id                 : ID of the board vendor (type:uint16_t)
    product_id                : ID of the product (type:uint16_t)
    uid                       : UID if provided by hardware (see uid2) (type:uint64_t)
    uid2                      : UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid) (type:uint8_t)

    """
    self.send(self.autopilot_version_encode(capabilities, flight_sw_version, middleware_sw_version, os_sw_version, board_version, flight_custom_version, middleware_custom_version, os_custom_version, vendor_id, product_id, uid, uid2), force_mavlink1=force_mavlink1)

battery_status_encode

battery_status_encode(id: int, battery_function: int, type: int, temperature: int, voltages: Sequence[int], current_battery: int, current_consumed: int, energy_consumed: int, battery_remaining: int, time_remaining: int = 0, charge_state: int = 0, voltages_ext: Sequence[int] = (0, 0, 0, 0), mode: int = 0, fault_bitmask: int = 0) -> MAVLink_battery_status_message

Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO.

id : Battery ID (type:uint8_t) battery_function : Function of the battery (type:uint8_t, values:MAV_BATTERY_FUNCTION) type : Type (chemistry) of the battery (type:uint8_t, values:MAV_BATTERY_TYPE) temperature : Temperature of the battery. INT16_MAX for unknown temperature. [cdegC] (type:int16_t) voltages : Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1). [mV] (type:uint16_t) current_battery : Battery current, -1: autopilot does not measure the current. Value may overflow/rollover for very high currents (> 327.67A) [cA] (type:int16_t) current_consumed : Consumed charge, -1: autopilot does not provide consumption estimate [mAh] (type:int32_t) energy_consumed : Consumed energy, -1: autopilot does not provide energy consumption estimate [hJ] (type:int32_t) battery_remaining : Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery. [%] (type:int8_t) time_remaining : Remaining battery time, 0: autopilot does not provide remaining battery time estimate [s] (type:int32_t) charge_state : State for extent of discharge, provided by autopilot for warning or external reactions (type:uint8_t, values:MAV_BATTERY_CHARGE_STATE) voltages_ext : Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead. [mV] (type:uint16_t) mode : Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode. (type:uint8_t, values:MAV_BATTERY_MODE) fault_bitmask : Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported). (type:uint32_t, values:MAV_BATTERY_FAULT)

Source code in src/mavlink/definition.py
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
def battery_status_encode(self, id: int, battery_function: int, type: int, temperature: int, voltages: Sequence[int], current_battery: int, current_consumed: int, energy_consumed: int, battery_remaining: int, time_remaining: int = 0, charge_state: int = 0, voltages_ext: Sequence[int] = (0, 0, 0, 0), mode: int = 0, fault_bitmask: int = 0) -> MAVLink_battery_status_message:
    """
    Battery information. Updates GCS with flight controller battery
    status. Smart batteries also use this message, but may
    additionally send BATTERY_INFO.

    id                        : Battery ID (type:uint8_t)
    battery_function          : Function of the battery (type:uint8_t, values:MAV_BATTERY_FUNCTION)
    type                      : Type (chemistry) of the battery (type:uint8_t, values:MAV_BATTERY_TYPE)
    temperature               : Temperature of the battery. INT16_MAX for unknown temperature. [cdegC] (type:int16_t)
    voltages                  : Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1). [mV] (type:uint16_t)
    current_battery           : Battery current, -1: autopilot does not measure the current. Value may overflow/rollover for very high currents (> 327.67A) [cA] (type:int16_t)
    current_consumed          : Consumed charge, -1: autopilot does not provide consumption estimate [mAh] (type:int32_t)
    energy_consumed           : Consumed energy, -1: autopilot does not provide energy consumption estimate [hJ] (type:int32_t)
    battery_remaining         : Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery. [%] (type:int8_t)
    time_remaining            : Remaining battery time, 0: autopilot does not provide remaining battery time estimate [s] (type:int32_t)
    charge_state              : State for extent of discharge, provided by autopilot for warning or external reactions (type:uint8_t, values:MAV_BATTERY_CHARGE_STATE)
    voltages_ext              : Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead. [mV] (type:uint16_t)
    mode                      : Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode. (type:uint8_t, values:MAV_BATTERY_MODE)
    fault_bitmask             : Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported). (type:uint32_t, values:MAV_BATTERY_FAULT)

    """
    return MAVLink_battery_status_message(id, battery_function, type, temperature, voltages, current_battery, current_consumed, energy_consumed, battery_remaining, time_remaining, charge_state, voltages_ext, mode, fault_bitmask)

battery_status_send

battery_status_send(id: int, battery_function: int, type: int, temperature: int, voltages: Sequence[int], current_battery: int, current_consumed: int, energy_consumed: int, battery_remaining: int, time_remaining: int = 0, charge_state: int = 0, voltages_ext: Sequence[int] = (0, 0, 0, 0), mode: int = 0, fault_bitmask: int = 0, force_mavlink1: bool = False) -> None

Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO.

id : Battery ID (type:uint8_t) battery_function : Function of the battery (type:uint8_t, values:MAV_BATTERY_FUNCTION) type : Type (chemistry) of the battery (type:uint8_t, values:MAV_BATTERY_TYPE) temperature : Temperature of the battery. INT16_MAX for unknown temperature. [cdegC] (type:int16_t) voltages : Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1). [mV] (type:uint16_t) current_battery : Battery current, -1: autopilot does not measure the current. Value may overflow/rollover for very high currents (> 327.67A) [cA] (type:int16_t) current_consumed : Consumed charge, -1: autopilot does not provide consumption estimate [mAh] (type:int32_t) energy_consumed : Consumed energy, -1: autopilot does not provide energy consumption estimate [hJ] (type:int32_t) battery_remaining : Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery. [%] (type:int8_t) time_remaining : Remaining battery time, 0: autopilot does not provide remaining battery time estimate [s] (type:int32_t) charge_state : State for extent of discharge, provided by autopilot for warning or external reactions (type:uint8_t, values:MAV_BATTERY_CHARGE_STATE) voltages_ext : Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead. [mV] (type:uint16_t) mode : Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode. (type:uint8_t, values:MAV_BATTERY_MODE) fault_bitmask : Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported). (type:uint32_t, values:MAV_BATTERY_FAULT)

Source code in src/mavlink/definition.py
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
def battery_status_send(self, id: int, battery_function: int, type: int, temperature: int, voltages: Sequence[int], current_battery: int, current_consumed: int, energy_consumed: int, battery_remaining: int, time_remaining: int = 0, charge_state: int = 0, voltages_ext: Sequence[int] = (0, 0, 0, 0), mode: int = 0, fault_bitmask: int = 0, force_mavlink1: bool = False) -> None:
    """
    Battery information. Updates GCS with flight controller battery
    status. Smart batteries also use this message, but may
    additionally send BATTERY_INFO.

    id                        : Battery ID (type:uint8_t)
    battery_function          : Function of the battery (type:uint8_t, values:MAV_BATTERY_FUNCTION)
    type                      : Type (chemistry) of the battery (type:uint8_t, values:MAV_BATTERY_TYPE)
    temperature               : Temperature of the battery. INT16_MAX for unknown temperature. [cdegC] (type:int16_t)
    voltages                  : Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1). [mV] (type:uint16_t)
    current_battery           : Battery current, -1: autopilot does not measure the current. Value may overflow/rollover for very high currents (> 327.67A) [cA] (type:int16_t)
    current_consumed          : Consumed charge, -1: autopilot does not provide consumption estimate [mAh] (type:int32_t)
    energy_consumed           : Consumed energy, -1: autopilot does not provide energy consumption estimate [hJ] (type:int32_t)
    battery_remaining         : Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery. [%] (type:int8_t)
    time_remaining            : Remaining battery time, 0: autopilot does not provide remaining battery time estimate [s] (type:int32_t)
    charge_state              : State for extent of discharge, provided by autopilot for warning or external reactions (type:uint8_t, values:MAV_BATTERY_CHARGE_STATE)
    voltages_ext              : Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead. [mV] (type:uint16_t)
    mode                      : Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode. (type:uint8_t, values:MAV_BATTERY_MODE)
    fault_bitmask             : Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported). (type:uint32_t, values:MAV_BATTERY_FAULT)

    """
    self.send(self.battery_status_encode(id, battery_function, type, temperature, voltages, current_battery, current_consumed, energy_consumed, battery_remaining, time_remaining, charge_state, voltages_ext, mode, fault_bitmask), force_mavlink1=force_mavlink1)

button_change_encode

button_change_encode(time_boot_ms: int, last_change_ms: int, state: int) -> MAVLink_button_change_message

Report button state change.

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) last_change_ms : Time of last change of button state. [ms] (type:uint32_t) state : Bitmap for state of buttons. (type:uint8_t)

Source code in src/mavlink/definition.py
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
def button_change_encode(self, time_boot_ms: int, last_change_ms: int, state: int) -> MAVLink_button_change_message:
    """
    Report button state change.

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    last_change_ms            : Time of last change of button state. [ms] (type:uint32_t)
    state                     : Bitmap for state of buttons. (type:uint8_t)

    """
    return MAVLink_button_change_message(time_boot_ms, last_change_ms, state)

button_change_send

button_change_send(time_boot_ms: int, last_change_ms: int, state: int, force_mavlink1: bool = False) -> None

Report button state change.

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) last_change_ms : Time of last change of button state. [ms] (type:uint32_t) state : Bitmap for state of buttons. (type:uint8_t)

Source code in src/mavlink/definition.py
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
def button_change_send(self, time_boot_ms: int, last_change_ms: int, state: int, force_mavlink1: bool = False) -> None:
    """
    Report button state change.

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    last_change_ms            : Time of last change of button state. [ms] (type:uint32_t)
    state                     : Bitmap for state of buttons. (type:uint8_t)

    """
    self.send(self.button_change_encode(time_boot_ms, last_change_ms, state), force_mavlink1=force_mavlink1)

bytes_needed

bytes_needed() -> int

return number of bytes needed for next parsing stage

Source code in src/mavlink/definition.py
4908
4909
4910
4911
4912
4913
4914
def bytes_needed(self) -> int:
    """return number of bytes needed for next parsing stage"""
    ret = self.expected_length - self.buf_len()

    if ret <= 0:
        return 1
    return ret

can_filter_modify_encode

can_filter_modify_encode(target_system: int, target_component: int, bus: int, operation: int, num_ids: int, ids: Sequence[int]) -> MAVLink_can_filter_modify_message

Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages.

target_system : System ID. (type:uint8_t) target_component : Component ID. (type:uint8_t) bus : bus number (type:uint8_t) operation : what operation to perform on the filter list. See CAN_FILTER_OP enum. (type:uint8_t, values:CAN_FILTER_OP) num_ids : number of IDs in filter list (type:uint8_t) ids : filter IDs, length num_ids (type:uint16_t)

Source code in src/mavlink/definition.py
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
def can_filter_modify_encode(self, target_system: int, target_component: int, bus: int, operation: int, num_ids: int, ids: Sequence[int]) -> MAVLink_can_filter_modify_message:
    """
    Modify the filter of what CAN messages to forward over the mavlink.
    This can be used to make CAN forwarding work well on low
    bandwidth links. The filtering is applied on bits 8 to 24 of
    the CAN id (2nd and 3rd bytes) which corresponds to the
    DroneCAN message ID for DroneCAN. Filters with more than 16
    IDs can be constructed by sending multiple CAN_FILTER_MODIFY
    messages.

    target_system             : System ID. (type:uint8_t)
    target_component          : Component ID. (type:uint8_t)
    bus                       : bus number (type:uint8_t)
    operation                 : what operation to perform on the filter list. See CAN_FILTER_OP enum. (type:uint8_t, values:CAN_FILTER_OP)
    num_ids                   : number of IDs in filter list (type:uint8_t)
    ids                       : filter IDs, length num_ids (type:uint16_t)

    """
    return MAVLink_can_filter_modify_message(target_system, target_component, bus, operation, num_ids, ids)

can_filter_modify_send

can_filter_modify_send(target_system: int, target_component: int, bus: int, operation: int, num_ids: int, ids: Sequence[int], force_mavlink1: bool = False) -> None

Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages.

target_system : System ID. (type:uint8_t) target_component : Component ID. (type:uint8_t) bus : bus number (type:uint8_t) operation : what operation to perform on the filter list. See CAN_FILTER_OP enum. (type:uint8_t, values:CAN_FILTER_OP) num_ids : number of IDs in filter list (type:uint8_t) ids : filter IDs, length num_ids (type:uint16_t)

Source code in src/mavlink/definition.py
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
def can_filter_modify_send(self, target_system: int, target_component: int, bus: int, operation: int, num_ids: int, ids: Sequence[int], force_mavlink1: bool = False) -> None:
    """
    Modify the filter of what CAN messages to forward over the mavlink.
    This can be used to make CAN forwarding work well on low
    bandwidth links. The filtering is applied on bits 8 to 24 of
    the CAN id (2nd and 3rd bytes) which corresponds to the
    DroneCAN message ID for DroneCAN. Filters with more than 16
    IDs can be constructed by sending multiple CAN_FILTER_MODIFY
    messages.

    target_system             : System ID. (type:uint8_t)
    target_component          : Component ID. (type:uint8_t)
    bus                       : bus number (type:uint8_t)
    operation                 : what operation to perform on the filter list. See CAN_FILTER_OP enum. (type:uint8_t, values:CAN_FILTER_OP)
    num_ids                   : number of IDs in filter list (type:uint8_t)
    ids                       : filter IDs, length num_ids (type:uint16_t)

    """
    self.send(self.can_filter_modify_encode(target_system, target_component, bus, operation, num_ids, ids), force_mavlink1=force_mavlink1)

can_frame_encode

can_frame_encode(target_system: int, target_component: int, bus: int, len: int, id: int, data: Sequence[int]) -> MAVLink_can_frame_message

A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD.

target_system : System ID. (type:uint8_t) target_component : Component ID. (type:uint8_t) bus : Bus number (type:uint8_t) len : Frame length (type:uint8_t) id : Frame ID (type:uint32_t) data : Frame data (type:uint8_t)

Source code in src/mavlink/definition.py
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
def can_frame_encode(self, target_system: int, target_component: int, bus: int, len: int, id: int, data: Sequence[int]) -> MAVLink_can_frame_message:
    """
    A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD.

    target_system             : System ID. (type:uint8_t)
    target_component          : Component ID. (type:uint8_t)
    bus                       : Bus number (type:uint8_t)
    len                       : Frame length (type:uint8_t)
    id                        : Frame ID (type:uint32_t)
    data                      : Frame data (type:uint8_t)

    """
    return MAVLink_can_frame_message(target_system, target_component, bus, len, id, data)

can_frame_send

can_frame_send(target_system: int, target_component: int, bus: int, len: int, id: int, data: Sequence[int], force_mavlink1: bool = False) -> None

A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD.

target_system : System ID. (type:uint8_t) target_component : Component ID. (type:uint8_t) bus : Bus number (type:uint8_t) len : Frame length (type:uint8_t) id : Frame ID (type:uint32_t) data : Frame data (type:uint8_t)

Source code in src/mavlink/definition.py
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
def can_frame_send(self, target_system: int, target_component: int, bus: int, len: int, id: int, data: Sequence[int], force_mavlink1: bool = False) -> None:
    """
    A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD.

    target_system             : System ID. (type:uint8_t)
    target_component          : Component ID. (type:uint8_t)
    bus                       : Bus number (type:uint8_t)
    len                       : Frame length (type:uint8_t)
    id                        : Frame ID (type:uint32_t)
    data                      : Frame data (type:uint8_t)

    """
    self.send(self.can_frame_encode(target_system, target_component, bus, len, id, data), force_mavlink1=force_mavlink1)

canfd_frame_encode

canfd_frame_encode(target_system: int, target_component: int, bus: int, len: int, id: int, data: Sequence[int]) -> MAVLink_canfd_frame_message

A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)

target_system : System ID. (type:uint8_t) target_component : Component ID. (type:uint8_t) bus : bus number (type:uint8_t) len : Frame length (type:uint8_t) id : Frame ID (type:uint32_t) data : Frame data (type:uint8_t)

Source code in src/mavlink/definition.py
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
def canfd_frame_encode(self, target_system: int, target_component: int, bus: int, len: int, id: int, data: Sequence[int]) -> MAVLink_canfd_frame_message:
    """
    A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are
    separated from CAN_FRAME as they need different handling (eg.
    TAO handling)

    target_system             : System ID. (type:uint8_t)
    target_component          : Component ID. (type:uint8_t)
    bus                       : bus number (type:uint8_t)
    len                       : Frame length (type:uint8_t)
    id                        : Frame ID (type:uint32_t)
    data                      : Frame data (type:uint8_t)

    """
    return MAVLink_canfd_frame_message(target_system, target_component, bus, len, id, data)

canfd_frame_send

canfd_frame_send(target_system: int, target_component: int, bus: int, len: int, id: int, data: Sequence[int], force_mavlink1: bool = False) -> None

A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)

target_system : System ID. (type:uint8_t) target_component : Component ID. (type:uint8_t) bus : bus number (type:uint8_t) len : Frame length (type:uint8_t) id : Frame ID (type:uint32_t) data : Frame data (type:uint8_t)

Source code in src/mavlink/definition.py
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
def canfd_frame_send(self, target_system: int, target_component: int, bus: int, len: int, id: int, data: Sequence[int], force_mavlink1: bool = False) -> None:
    """
    A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are
    separated from CAN_FRAME as they need different handling (eg.
    TAO handling)

    target_system             : System ID. (type:uint8_t)
    target_component          : Component ID. (type:uint8_t)
    bus                       : bus number (type:uint8_t)
    len                       : Frame length (type:uint8_t)
    id                        : Frame ID (type:uint32_t)
    data                      : Frame data (type:uint8_t)

    """
    self.send(self.canfd_frame_encode(target_system, target_component, bus, len, id, data), force_mavlink1=force_mavlink1)

check_signature

check_signature(msgbuf: bytearray, srcSystem: int, srcComponent: int) -> bool

check signature on incoming message

Source code in src/mavlink/definition.py
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
def check_signature(self, msgbuf: bytearray, srcSystem: int, srcComponent: int) -> bool:
    """check signature on incoming message"""
    assert self.signing.secret_key is not None

    timestamp_buf = msgbuf[-12:-6]
    link_id = msgbuf[-13]
    tbytes: Tuple[int, int] = self.mav_sign_unpacker.unpack(timestamp_buf)
    tlow, thigh = tbytes
    timestamp = tlow + (thigh << 32)

    # see if the timestamp is acceptable
    stream_key = (link_id, srcSystem, srcComponent)
    if stream_key in self.signing.stream_timestamps:
        if timestamp <= self.signing.stream_timestamps[stream_key]:
            # reject old timestamp
            logger.info("old timestamp")
            return False
    else:
        # a new stream has appeared. Accept the timestamp if it is at most
        # one minute behind our current timestamp
        if timestamp + 6000 * 1000 < self.signing.timestamp:
            logger.info("bad new stream %s %s", timestamp / (100.0 * 1000 * 60 * 60 * 24 * 365), self.signing.timestamp / (100.0 * 1000 * 60 * 60 * 24 * 365))
            return False
        logger.info("new stream")

    # set the streams timestamp so we reject timestamps that go backwards
    self.signing.stream_timestamps[stream_key] = timestamp

    h = hashlib.new("sha256")
    h.update(self.signing.secret_key)
    h.update(msgbuf[:-6])
    sig1 = h.digest()[:6]
    sig2 = msgbuf[-6:]
    if sig1 != sig2:
        logger.info("sig mismatch")
        return False

    # the timestamp we next send with is the max of the received timestamp and
    # our current timestamp
    self.signing.timestamp = max(self.signing.timestamp, timestamp)
    return True

command_ack_encode

command_ack_encode(command: int, result: int, progress: int = 0, result_param2: int = 0, target_system: int = 0, target_component: int = 0) -> MAVLink_command_ack_message

Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at https://mavlink.io/en/services/command.html

command : Command ID (of acknowledged command). (type:uint16_t, values:MAV_CMD) result : Result of command. (type:uint8_t, values:MAV_RESULT) progress : The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown. [%] (type:uint8_t) result_param2 : Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate "unused" or "unknown"). (type:int32_t) target_system : System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement. (type:uint8_t) target_component : Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement. (type:uint8_t)

Source code in src/mavlink/definition.py
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
def command_ack_encode(self, command: int, result: int, progress: int = 0, result_param2: int = 0, target_system: int = 0, target_component: int = 0) -> MAVLink_command_ack_message:
    """
    Report status of a command. Includes feedback whether the command was
    executed. The command microservice is documented at
    https://mavlink.io/en/services/command.html

    command                   : Command ID (of acknowledged command). (type:uint16_t, values:MAV_CMD)
    result                    : Result of command. (type:uint8_t, values:MAV_RESULT)
    progress                  : The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown. [%] (type:uint8_t)
    result_param2             : Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate "unused" or "unknown"). (type:int32_t)
    target_system             : System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement. (type:uint8_t)
    target_component          : Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement. (type:uint8_t)

    """
    return MAVLink_command_ack_message(command, result, progress, result_param2, target_system, target_component)

command_ack_send

command_ack_send(command: int, result: int, progress: int = 0, result_param2: int = 0, target_system: int = 0, target_component: int = 0, force_mavlink1: bool = False) -> None

Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at https://mavlink.io/en/services/command.html

command : Command ID (of acknowledged command). (type:uint16_t, values:MAV_CMD) result : Result of command. (type:uint8_t, values:MAV_RESULT) progress : The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown. [%] (type:uint8_t) result_param2 : Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate "unused" or "unknown"). (type:int32_t) target_system : System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement. (type:uint8_t) target_component : Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement. (type:uint8_t)

Source code in src/mavlink/definition.py
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
def command_ack_send(self, command: int, result: int, progress: int = 0, result_param2: int = 0, target_system: int = 0, target_component: int = 0, force_mavlink1: bool = False) -> None:
    """
    Report status of a command. Includes feedback whether the command was
    executed. The command microservice is documented at
    https://mavlink.io/en/services/command.html

    command                   : Command ID (of acknowledged command). (type:uint16_t, values:MAV_CMD)
    result                    : Result of command. (type:uint8_t, values:MAV_RESULT)
    progress                  : The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown. [%] (type:uint8_t)
    result_param2             : Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate "unused" or "unknown"). (type:int32_t)
    target_system             : System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement. (type:uint8_t)
    target_component          : Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement. (type:uint8_t)

    """
    self.send(self.command_ack_encode(command, result, progress, result_param2, target_system, target_component), force_mavlink1=force_mavlink1)

command_int_encode

command_int_encode(target_system: int, target_component: int, frame: int, command: int, current: int, autocontinue: int, param1: float, param2: float, param3: float, param4: float, x: int, y: int, z: float) -> MAVLink_command_int_message

Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at https://mavlink.io/en/services/command.html

target_system : System ID (type:uint8_t) target_component : Component ID (type:uint8_t) frame : The coordinate system of the COMMAND. (type:uint8_t, values:MAV_FRAME) command : The scheduled action for the mission item. (type:uint16_t, values:MAV_CMD) current : Not used. (type:uint8_t) autocontinue : Not used (set 0). (type:uint8_t) param1 : PARAM1, see MAV_CMD enum (type:float) param2 : PARAM2, see MAV_CMD enum (type:float) param3 : PARAM3, see MAV_CMD enum (type:float) param4 : PARAM4, see MAV_CMD enum (type:float) x : PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7 (type:int32_t) y : PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7 (type:int32_t) z : PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame). (type:float)

Source code in src/mavlink/definition.py
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
def command_int_encode(self, target_system: int, target_component: int, frame: int, command: int, current: int, autocontinue: int, param1: float, param2: float, param3: float, param4: float, x: int, y: int, z: float) -> MAVLink_command_int_message:
    """
    Send a command with up to seven parameters to the MAV, where params 5
    and 6 are integers and the other values are floats. This is
    preferred over COMMAND_LONG as it allows the MAV_FRAME to be
    specified for interpreting positional information, such as
    altitude. COMMAND_INT is also preferred when sending latitude
    and longitude data in params 5 and 6, as it allows for greater
    precision. Param 5 and 6 encode positional data as scaled
    integers, where the scaling depends on the actual command
    value. NaN or INT32_MAX may be used in float/integer params
    (respectively) to indicate optional/default values (e.g. to
    use the component's current latitude, yaw rather than a
    specific value). The command microservice is documented at
    https://mavlink.io/en/services/command.html

    target_system             : System ID (type:uint8_t)
    target_component          : Component ID (type:uint8_t)
    frame                     : The coordinate system of the COMMAND. (type:uint8_t, values:MAV_FRAME)
    command                   : The scheduled action for the mission item. (type:uint16_t, values:MAV_CMD)
    current                   : Not used. (type:uint8_t)
    autocontinue              : Not used (set 0). (type:uint8_t)
    param1                    : PARAM1, see MAV_CMD enum (type:float)
    param2                    : PARAM2, see MAV_CMD enum (type:float)
    param3                    : PARAM3, see MAV_CMD enum (type:float)
    param4                    : PARAM4, see MAV_CMD enum (type:float)
    x                         : PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7 (type:int32_t)
    y                         : PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7 (type:int32_t)
    z                         : PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame). (type:float)

    """
    return MAVLink_command_int_message(target_system, target_component, frame, command, current, autocontinue, param1, param2, param3, param4, x, y, z)

command_int_send

command_int_send(target_system: int, target_component: int, frame: int, command: int, current: int, autocontinue: int, param1: float, param2: float, param3: float, param4: float, x: int, y: int, z: float, force_mavlink1: bool = False) -> None

Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at https://mavlink.io/en/services/command.html

target_system : System ID (type:uint8_t) target_component : Component ID (type:uint8_t) frame : The coordinate system of the COMMAND. (type:uint8_t, values:MAV_FRAME) command : The scheduled action for the mission item. (type:uint16_t, values:MAV_CMD) current : Not used. (type:uint8_t) autocontinue : Not used (set 0). (type:uint8_t) param1 : PARAM1, see MAV_CMD enum (type:float) param2 : PARAM2, see MAV_CMD enum (type:float) param3 : PARAM3, see MAV_CMD enum (type:float) param4 : PARAM4, see MAV_CMD enum (type:float) x : PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7 (type:int32_t) y : PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7 (type:int32_t) z : PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame). (type:float)

Source code in src/mavlink/definition.py
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
def command_int_send(self, target_system: int, target_component: int, frame: int, command: int, current: int, autocontinue: int, param1: float, param2: float, param3: float, param4: float, x: int, y: int, z: float, force_mavlink1: bool = False) -> None:
    """
    Send a command with up to seven parameters to the MAV, where params 5
    and 6 are integers and the other values are floats. This is
    preferred over COMMAND_LONG as it allows the MAV_FRAME to be
    specified for interpreting positional information, such as
    altitude. COMMAND_INT is also preferred when sending latitude
    and longitude data in params 5 and 6, as it allows for greater
    precision. Param 5 and 6 encode positional data as scaled
    integers, where the scaling depends on the actual command
    value. NaN or INT32_MAX may be used in float/integer params
    (respectively) to indicate optional/default values (e.g. to
    use the component's current latitude, yaw rather than a
    specific value). The command microservice is documented at
    https://mavlink.io/en/services/command.html

    target_system             : System ID (type:uint8_t)
    target_component          : Component ID (type:uint8_t)
    frame                     : The coordinate system of the COMMAND. (type:uint8_t, values:MAV_FRAME)
    command                   : The scheduled action for the mission item. (type:uint16_t, values:MAV_CMD)
    current                   : Not used. (type:uint8_t)
    autocontinue              : Not used (set 0). (type:uint8_t)
    param1                    : PARAM1, see MAV_CMD enum (type:float)
    param2                    : PARAM2, see MAV_CMD enum (type:float)
    param3                    : PARAM3, see MAV_CMD enum (type:float)
    param4                    : PARAM4, see MAV_CMD enum (type:float)
    x                         : PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7 (type:int32_t)
    y                         : PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7 (type:int32_t)
    z                         : PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame). (type:float)

    """
    self.send(self.command_int_encode(target_system, target_component, frame, command, current, autocontinue, param1, param2, param3, param4, x, y, z), force_mavlink1=force_mavlink1)

command_long_encode

command_long_encode(target_system: int, target_component: int, command: int, confirmation: int, param1: float, param2: float, param3: float, param4: float, param5: float, param6: float, param7: float) -> MAVLink_command_long_message

Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at https://mavlink.io/en/services/command.html

target_system : System which should execute the command (type:uint8_t) target_component : Component which should execute the command, 0 for all components (type:uint8_t) command : Command ID (of command to send). (type:uint16_t, values:MAV_CMD) confirmation : 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command) (type:uint8_t) param1 : Parameter 1 (for the specific command). (type:float) param2 : Parameter 2 (for the specific command). (type:float) param3 : Parameter 3 (for the specific command). (type:float) param4 : Parameter 4 (for the specific command). (type:float) param5 : Parameter 5 (for the specific command). (type:float) param6 : Parameter 6 (for the specific command). (type:float) param7 : Parameter 7 (for the specific command). (type:float)

Source code in src/mavlink/definition.py
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
def command_long_encode(self, target_system: int, target_component: int, command: int, confirmation: int, param1: float, param2: float, param3: float, param4: float, param5: float, param6: float, param7: float) -> MAVLink_command_long_message:
    """
    Send a command with up to seven parameters to the MAV. COMMAND_INT is
    generally preferred when sending MAV_CMD commands that include
    positional information; it offers higher precision and allows
    the MAV_FRAME to be specified (which may otherwise be
    ambiguous, particularly for altitude). The command
    microservice is documented at
    https://mavlink.io/en/services/command.html

    target_system             : System which should execute the command (type:uint8_t)
    target_component          : Component which should execute the command, 0 for all components (type:uint8_t)
    command                   : Command ID (of command to send). (type:uint16_t, values:MAV_CMD)
    confirmation              : 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command) (type:uint8_t)
    param1                    : Parameter 1 (for the specific command). (type:float)
    param2                    : Parameter 2 (for the specific command). (type:float)
    param3                    : Parameter 3 (for the specific command). (type:float)
    param4                    : Parameter 4 (for the specific command). (type:float)
    param5                    : Parameter 5 (for the specific command). (type:float)
    param6                    : Parameter 6 (for the specific command). (type:float)
    param7                    : Parameter 7 (for the specific command). (type:float)

    """
    return MAVLink_command_long_message(target_system, target_component, command, confirmation, param1, param2, param3, param4, param5, param6, param7)

command_long_send

command_long_send(target_system: int, target_component: int, command: int, confirmation: int, param1: float, param2: float, param3: float, param4: float, param5: float, param6: float, param7: float, force_mavlink1: bool = False) -> None

Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at https://mavlink.io/en/services/command.html

target_system : System which should execute the command (type:uint8_t) target_component : Component which should execute the command, 0 for all components (type:uint8_t) command : Command ID (of command to send). (type:uint16_t, values:MAV_CMD) confirmation : 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command) (type:uint8_t) param1 : Parameter 1 (for the specific command). (type:float) param2 : Parameter 2 (for the specific command). (type:float) param3 : Parameter 3 (for the specific command). (type:float) param4 : Parameter 4 (for the specific command). (type:float) param5 : Parameter 5 (for the specific command). (type:float) param6 : Parameter 6 (for the specific command). (type:float) param7 : Parameter 7 (for the specific command). (type:float)

Source code in src/mavlink/definition.py
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
def command_long_send(self, target_system: int, target_component: int, command: int, confirmation: int, param1: float, param2: float, param3: float, param4: float, param5: float, param6: float, param7: float, force_mavlink1: bool = False) -> None:
    """
    Send a command with up to seven parameters to the MAV. COMMAND_INT is
    generally preferred when sending MAV_CMD commands that include
    positional information; it offers higher precision and allows
    the MAV_FRAME to be specified (which may otherwise be
    ambiguous, particularly for altitude). The command
    microservice is documented at
    https://mavlink.io/en/services/command.html

    target_system             : System which should execute the command (type:uint8_t)
    target_component          : Component which should execute the command, 0 for all components (type:uint8_t)
    command                   : Command ID (of command to send). (type:uint16_t, values:MAV_CMD)
    confirmation              : 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command) (type:uint8_t)
    param1                    : Parameter 1 (for the specific command). (type:float)
    param2                    : Parameter 2 (for the specific command). (type:float)
    param3                    : Parameter 3 (for the specific command). (type:float)
    param4                    : Parameter 4 (for the specific command). (type:float)
    param5                    : Parameter 5 (for the specific command). (type:float)
    param6                    : Parameter 6 (for the specific command). (type:float)
    param7                    : Parameter 7 (for the specific command). (type:float)

    """
    self.send(self.command_long_encode(target_system, target_component, command, confirmation, param1, param2, param3, param4, param5, param6, param7), force_mavlink1=force_mavlink1)

control_system_state_encode

control_system_state_encode(time_usec: int, x_acc: float, y_acc: float, z_acc: float, x_vel: float, y_vel: float, z_vel: float, x_pos: float, y_pos: float, z_pos: float, airspeed: float, vel_variance: Sequence[float], pos_variance: Sequence[float], q: Sequence[float], roll_rate: float, pitch_rate: float, yaw_rate: float) -> MAVLink_control_system_state_message

The smoothed, monotonic system state used to feed the control loops of the system.

time_usec : Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. [us] (type:uint64_t) x_acc : X acceleration in body frame [m/s/s] (type:float) y_acc : Y acceleration in body frame [m/s/s] (type:float) z_acc : Z acceleration in body frame [m/s/s] (type:float) x_vel : X velocity in body frame [m/s] (type:float) y_vel : Y velocity in body frame [m/s] (type:float) z_vel : Z velocity in body frame [m/s] (type:float) x_pos : X position in local frame [m] (type:float) y_pos : Y position in local frame [m] (type:float) z_pos : Z position in local frame [m] (type:float) airspeed : Airspeed, set to -1 if unknown [m/s] (type:float) vel_variance : Variance of body velocity estimate (type:float) pos_variance : Variance in local position (type:float) q : The attitude, represented as Quaternion (type:float) roll_rate : Angular rate in roll axis [rad/s] (type:float) pitch_rate : Angular rate in pitch axis [rad/s] (type:float) yaw_rate : Angular rate in yaw axis [rad/s] (type:float)

Source code in src/mavlink/definition.py
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
def control_system_state_encode(self, time_usec: int, x_acc: float, y_acc: float, z_acc: float, x_vel: float, y_vel: float, z_vel: float, x_pos: float, y_pos: float, z_pos: float, airspeed: float, vel_variance: Sequence[float], pos_variance: Sequence[float], q: Sequence[float], roll_rate: float, pitch_rate: float, yaw_rate: float) -> MAVLink_control_system_state_message:
    """
    The smoothed, monotonic system state used to feed the control loops of
    the system.

    time_usec                 : Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. [us] (type:uint64_t)
    x_acc                     : X acceleration in body frame [m/s/s] (type:float)
    y_acc                     : Y acceleration in body frame [m/s/s] (type:float)
    z_acc                     : Z acceleration in body frame [m/s/s] (type:float)
    x_vel                     : X velocity in body frame [m/s] (type:float)
    y_vel                     : Y velocity in body frame [m/s] (type:float)
    z_vel                     : Z velocity in body frame [m/s] (type:float)
    x_pos                     : X position in local frame [m] (type:float)
    y_pos                     : Y position in local frame [m] (type:float)
    z_pos                     : Z position in local frame [m] (type:float)
    airspeed                  : Airspeed, set to -1 if unknown [m/s] (type:float)
    vel_variance              : Variance of body velocity estimate (type:float)
    pos_variance              : Variance in local position (type:float)
    q                         : The attitude, represented as Quaternion (type:float)
    roll_rate                 : Angular rate in roll axis [rad/s] (type:float)
    pitch_rate                : Angular rate in pitch axis [rad/s] (type:float)
    yaw_rate                  : Angular rate in yaw axis [rad/s] (type:float)

    """
    return MAVLink_control_system_state_message(time_usec, x_acc, y_acc, z_acc, x_vel, y_vel, z_vel, x_pos, y_pos, z_pos, airspeed, vel_variance, pos_variance, q, roll_rate, pitch_rate, yaw_rate)

control_system_state_send

control_system_state_send(time_usec: int, x_acc: float, y_acc: float, z_acc: float, x_vel: float, y_vel: float, z_vel: float, x_pos: float, y_pos: float, z_pos: float, airspeed: float, vel_variance: Sequence[float], pos_variance: Sequence[float], q: Sequence[float], roll_rate: float, pitch_rate: float, yaw_rate: float, force_mavlink1: bool = False) -> None

The smoothed, monotonic system state used to feed the control loops of the system.

time_usec : Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. [us] (type:uint64_t) x_acc : X acceleration in body frame [m/s/s] (type:float) y_acc : Y acceleration in body frame [m/s/s] (type:float) z_acc : Z acceleration in body frame [m/s/s] (type:float) x_vel : X velocity in body frame [m/s] (type:float) y_vel : Y velocity in body frame [m/s] (type:float) z_vel : Z velocity in body frame [m/s] (type:float) x_pos : X position in local frame [m] (type:float) y_pos : Y position in local frame [m] (type:float) z_pos : Z position in local frame [m] (type:float) airspeed : Airspeed, set to -1 if unknown [m/s] (type:float) vel_variance : Variance of body velocity estimate (type:float) pos_variance : Variance in local position (type:float) q : The attitude, represented as Quaternion (type:float) roll_rate : Angular rate in roll axis [rad/s] (type:float) pitch_rate : Angular rate in pitch axis [rad/s] (type:float) yaw_rate : Angular rate in yaw axis [rad/s] (type:float)

Source code in src/mavlink/definition.py
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
def control_system_state_send(self, time_usec: int, x_acc: float, y_acc: float, z_acc: float, x_vel: float, y_vel: float, z_vel: float, x_pos: float, y_pos: float, z_pos: float, airspeed: float, vel_variance: Sequence[float], pos_variance: Sequence[float], q: Sequence[float], roll_rate: float, pitch_rate: float, yaw_rate: float, force_mavlink1: bool = False) -> None:
    """
    The smoothed, monotonic system state used to feed the control loops of
    the system.

    time_usec                 : Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. [us] (type:uint64_t)
    x_acc                     : X acceleration in body frame [m/s/s] (type:float)
    y_acc                     : Y acceleration in body frame [m/s/s] (type:float)
    z_acc                     : Z acceleration in body frame [m/s/s] (type:float)
    x_vel                     : X velocity in body frame [m/s] (type:float)
    y_vel                     : Y velocity in body frame [m/s] (type:float)
    z_vel                     : Z velocity in body frame [m/s] (type:float)
    x_pos                     : X position in local frame [m] (type:float)
    y_pos                     : Y position in local frame [m] (type:float)
    z_pos                     : Z position in local frame [m] (type:float)
    airspeed                  : Airspeed, set to -1 if unknown [m/s] (type:float)
    vel_variance              : Variance of body velocity estimate (type:float)
    pos_variance              : Variance in local position (type:float)
    q                         : The attitude, represented as Quaternion (type:float)
    roll_rate                 : Angular rate in roll axis [rad/s] (type:float)
    pitch_rate                : Angular rate in pitch axis [rad/s] (type:float)
    yaw_rate                  : Angular rate in yaw axis [rad/s] (type:float)

    """
    self.send(self.control_system_state_encode(time_usec, x_acc, y_acc, z_acc, x_vel, y_vel, z_vel, x_pos, y_pos, z_pos, airspeed, vel_variance, pos_variance, q, roll_rate, pitch_rate, yaw_rate), force_mavlink1=force_mavlink1)

decode

decode(msgbuf: bytearray) -> MAVLink_message

decode a buffer as a MAVLink message

Source code in src/mavlink/definition.py
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
def decode(self, msgbuf: bytearray) -> MAVLink_message:
    """decode a buffer as a MAVLink message"""
    # decode the header
    if msgbuf[0] != PROTOCOL_MARKER_V1:
        headerlen = 10
        try:
            header_v2: MAVLinkV2Header = self.mav20_unpacker.unpack(msgbuf[:headerlen])
        except struct.error as emsg:
            raise MAVError("Unable to unpack MAVLink header: %s" % emsg)
        magic, mlen, incompat_flags, compat_flags, seq, srcSystem, srcComponent, msgIdlow, msgIdhigh = header_v2
        msgId = msgIdlow | (msgIdhigh << 16)
    else:
        headerlen = 6
        try:
            header_v1: MAVLinkV1Header = self.mav10_unpacker.unpack(msgbuf[:headerlen])
        except struct.error as emsg:
            raise MAVError("Unable to unpack MAVLink header: %s" % emsg)
        magic, mlen, seq, srcSystem, srcComponent, msgId = header_v1
        incompat_flags = 0
        compat_flags = 0
    mapkey = msgId
    if (incompat_flags & MAVLINK_IFLAG_SIGNED) != 0:
        signature_len = MAVLINK_SIGNATURE_BLOCK_LEN
    else:
        signature_len = 0

    if ord(magic) != PROTOCOL_MARKER_V1 and ord(magic) != PROTOCOL_MARKER_V2:
        raise MAVError("invalid MAVLink prefix '{}'".format(hex(ord(magic))))
    if mlen != len(msgbuf) - (headerlen + 2 + signature_len):
        raise MAVError("invalid MAVLink message length. Got %u expected %u, msgId=%u headerlen=%u" % (len(msgbuf) - (headerlen + 2 + signature_len), mlen, msgId, headerlen))

    if mapkey not in mavlink_map:
        return MAVLink_unknown(msgId, msgbuf)

    # decode the payload
    msgtype = mavlink_map[mapkey]
    order_map = msgtype.orders
    len_map = msgtype.lengths
    crc_extra = msgtype.crc_extra

    # decode the checksum
    try:
        crc: int = self.mav_csum_unpacker.unpack(msgbuf[-(2 + signature_len) :][:2])[0]
    except struct.error as emsg:
        raise MAVError("Unable to unpack MAVLink CRC: %s" % emsg)
    crcbuf = msgbuf[1 : -(2 + signature_len)]
    if True:
        # using CRC extra
        crcbuf.append(crc_extra)
    crc2 = x25crc(crcbuf)
    if crc != crc2.crc and not MAVLINK_IGNORE_CRC:
        raise MAVError("invalid MAVLink CRC in msgID %u 0x%04x should be 0x%04x" % (msgId, crc, crc2.crc))

    sig_ok = False
    if signature_len == MAVLINK_SIGNATURE_BLOCK_LEN:
        self.signing.sig_count += 1
    if self.signing.secret_key is not None:
        accept_signature = False
        if signature_len == MAVLINK_SIGNATURE_BLOCK_LEN:
            sig_ok = self.check_signature(msgbuf, srcSystem, srcComponent)
            accept_signature = sig_ok
            if sig_ok:
                self.signing.goodsig_count += 1
            else:
                self.signing.badsig_count += 1
            if not accept_signature and self.signing.allow_unsigned_callback is not None:
                accept_signature = self.signing.allow_unsigned_callback(self, msgId)
                if accept_signature:
                    self.signing.unsigned_count += 1
                else:
                    self.signing.reject_count += 1
        elif self.signing.allow_unsigned_callback is not None:
            accept_signature = self.signing.allow_unsigned_callback(self, msgId)
            if accept_signature:
                self.signing.unsigned_count += 1
            else:
                self.signing.reject_count += 1
        if not accept_signature:
            raise MAVError("Invalid signature")

    csize = msgtype.unpacker.size
    mbuf = msgbuf[headerlen : -(2 + signature_len)]
    if len(mbuf) < csize:
        # zero pad to give right size
        mbuf.extend([0] * (csize - len(mbuf)))
    if len(mbuf) < csize:
        raise MAVError("Bad message of type %s length %u needs %s" % (msgtype, len(mbuf), csize))
    mbuf = mbuf[:csize]
    try:
        t: Tuple[Union[bytes, int, float], ...] = msgtype.unpacker.unpack(mbuf)
    except struct.error as emsg:
        raise MAVError("Unable to unpack MAVLink payload type=%s payloadLength=%u: %s" % (msgtype, len(mbuf), emsg))

    tlist: List[Union[bytes, float, int, Sequence[Union[bytes, float, int]]]] = list(t)
    # handle sorted fields
    if True:
        if sum(len_map) == len(len_map):
            # message has no arrays in it
            for i in range(0, len(tlist)):
                tlist[i] = t[order_map[i]]
        else:
            # message has some arrays
            tlist = []
            for i in range(0, len(order_map)):
                order = order_map[i]
                L = len_map[order]
                tip = sum(len_map[:order])
                field = t[tip]
                if L == 1 or isinstance(field, bytes):
                    tlist.append(field)
                else:
                    tlist.append(list(t[tip : (tip + L)]))

    # terminate any strings
    for i, elem in enumerate(tlist):
        if isinstance(elem, bytes):
            tlist[i] = elem.rstrip(b"\x00")

    # construct the message object
    try:
        # Note that initializers don't follow the Liskov Substitution Principle
        # therefore it can't be typechecked
        m = msgtype(*tlist)  # type: ignore
    except Exception as emsg:
        raise MAVError("Unable to instantiate MAVLink message of type %s : %s" % (msgtype, emsg))
    m._signed = sig_ok
    if m._signed:
        m._link_id = msgbuf[-13]
    m._msgbuf = msgbuf
    m._payload = msgbuf[6 : -(2 + signature_len)]
    m._crc = crc
    m._header = MAVLink_header(msgId, incompat_flags, compat_flags, mlen, seq, srcSystem, srcComponent)
    return m

empennage_command_encode

empennage_command_encode(time_boot_ms: int, elevator: float, rudder: float, elevator_trim: float) -> MAVLink_empennage_command_message

Command to the empennage.

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) elevator : Elevator position command. [deg] (type:float) rudder : Rudder position command. [deg] (type:float) elevator_trim : Elevator trim command. [deg] (type:float)

Source code in src/mavlink/definition.py
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
def empennage_command_encode(self, time_boot_ms: int, elevator: float, rudder: float, elevator_trim: float) -> MAVLink_empennage_command_message:
    """
    Command to the empennage.

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    elevator                  : Elevator position command. [deg] (type:float)
    rudder                    : Rudder position command. [deg] (type:float)
    elevator_trim             : Elevator trim command. [deg] (type:float)

    """
    return MAVLink_empennage_command_message(time_boot_ms, elevator, rudder, elevator_trim)

empennage_command_send

empennage_command_send(time_boot_ms: int, elevator: float, rudder: float, elevator_trim: float, force_mavlink1: bool = False) -> None

Command to the empennage.

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) elevator : Elevator position command. [deg] (type:float) rudder : Rudder position command. [deg] (type:float) elevator_trim : Elevator trim command. [deg] (type:float)

Source code in src/mavlink/definition.py
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
def empennage_command_send(self, time_boot_ms: int, elevator: float, rudder: float, elevator_trim: float, force_mavlink1: bool = False) -> None:
    """
    Command to the empennage.

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    elevator                  : Elevator position command. [deg] (type:float)
    rudder                    : Rudder position command. [deg] (type:float)
    elevator_trim             : Elevator trim command. [deg] (type:float)

    """
    self.send(self.empennage_command_encode(time_boot_ms, elevator, rudder, elevator_trim), force_mavlink1=force_mavlink1)

empennage_status_encode

empennage_status_encode(time_boot_ms: int, elevator: float, rudder: float) -> MAVLink_empennage_status_message

Output status of the empennage.

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) elevator : Elevator position. [deg] (type:float) rudder : Rudder position. [deg] (type:float)

Source code in src/mavlink/definition.py
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
def empennage_status_encode(self, time_boot_ms: int, elevator: float, rudder: float) -> MAVLink_empennage_status_message:
    """
    Output status of the empennage.

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    elevator                  : Elevator position. [deg] (type:float)
    rudder                    : Rudder position. [deg] (type:float)

    """
    return MAVLink_empennage_status_message(time_boot_ms, elevator, rudder)

empennage_status_send

empennage_status_send(time_boot_ms: int, elevator: float, rudder: float, force_mavlink1: bool = False) -> None

Output status of the empennage.

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) elevator : Elevator position. [deg] (type:float) rudder : Rudder position. [deg] (type:float)

Source code in src/mavlink/definition.py
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
def empennage_status_send(self, time_boot_ms: int, elevator: float, rudder: float, force_mavlink1: bool = False) -> None:
    """
    Output status of the empennage.

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    elevator                  : Elevator position. [deg] (type:float)
    rudder                    : Rudder position. [deg] (type:float)

    """
    self.send(self.empennage_status_encode(time_boot_ms, elevator, rudder), force_mavlink1=force_mavlink1)

flight_information_encode

flight_information_encode(time_boot_ms: int, arming_time_utc: int, takeoff_time_utc: int, flight_uuid: int, landing_time: int = 0) -> MAVLink_flight_information_message

Flight information. This includes time since boot for arm, takeoff, and land, and a flight number. Takeoff and landing values reset to zero on arm. This can be requested using MAV_CMD_REQUEST_MESSAGE. Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number.

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) arming_time_utc : Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC. [us] (type:uint64_t) takeoff_time_utc : Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC. [us] (type:uint64_t) flight_uuid : Flight number. Note, field is misnamed UUID. (type:uint64_t) landing_time : Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming. [ms] (type:uint32_t)

Source code in src/mavlink/definition.py
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
def flight_information_encode(self, time_boot_ms: int, arming_time_utc: int, takeoff_time_utc: int, flight_uuid: int, landing_time: int = 0) -> MAVLink_flight_information_message:
    """
    Flight information.         This includes time since boot for arm,
    takeoff, and land, and a flight number.         Takeoff and
    landing values reset to zero on arm.         This can be
    requested using MAV_CMD_REQUEST_MESSAGE.         Note, some
    fields are misnamed - timestamps are from boot (not UTC) and
    the flight_uuid is a sequence number.

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    arming_time_utc           : Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC. [us] (type:uint64_t)
    takeoff_time_utc          : Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC. [us] (type:uint64_t)
    flight_uuid               : Flight number. Note, field is misnamed UUID. (type:uint64_t)
    landing_time              : Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming. [ms] (type:uint32_t)

    """
    return MAVLink_flight_information_message(time_boot_ms, arming_time_utc, takeoff_time_utc, flight_uuid, landing_time)

flight_information_send

flight_information_send(time_boot_ms: int, arming_time_utc: int, takeoff_time_utc: int, flight_uuid: int, landing_time: int = 0, force_mavlink1: bool = False) -> None

Flight information. This includes time since boot for arm, takeoff, and land, and a flight number. Takeoff and landing values reset to zero on arm. This can be requested using MAV_CMD_REQUEST_MESSAGE. Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number.

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) arming_time_utc : Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC. [us] (type:uint64_t) takeoff_time_utc : Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC. [us] (type:uint64_t) flight_uuid : Flight number. Note, field is misnamed UUID. (type:uint64_t) landing_time : Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming. [ms] (type:uint32_t)

Source code in src/mavlink/definition.py
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
def flight_information_send(self, time_boot_ms: int, arming_time_utc: int, takeoff_time_utc: int, flight_uuid: int, landing_time: int = 0, force_mavlink1: bool = False) -> None:
    """
    Flight information.         This includes time since boot for arm,
    takeoff, and land, and a flight number.         Takeoff and
    landing values reset to zero on arm.         This can be
    requested using MAV_CMD_REQUEST_MESSAGE.         Note, some
    fields are misnamed - timestamps are from boot (not UTC) and
    the flight_uuid is a sequence number.

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    arming_time_utc           : Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC. [us] (type:uint64_t)
    takeoff_time_utc          : Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC. [us] (type:uint64_t)
    flight_uuid               : Flight number. Note, field is misnamed UUID. (type:uint64_t)
    landing_time              : Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming. [ms] (type:uint32_t)

    """
    self.send(self.flight_information_encode(time_boot_ms, arming_time_utc, takeoff_time_utc, flight_uuid, landing_time), force_mavlink1=force_mavlink1)

global_position_int_encode

global_position_int_encode(time_boot_ms: int, lat: int, lon: int, alt: int, relative_alt: int, vx: int, vy: int, vz: int, hdg: int) -> MAVLink_global_position_int_message

The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It is designed as scaled integer message since the resolution of float is not sufficient.

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) lat : Latitude, expressed [degE7] (type:int32_t) lon : Longitude, expressed [degE7] (type:int32_t) alt : Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL. [mm] (type:int32_t) relative_alt : Altitude above home [mm] (type:int32_t) vx : Ground X Speed (Latitude, positive north) [cm/s] (type:int16_t) vy : Ground Y Speed (Longitude, positive east) [cm/s] (type:int16_t) vz : Ground Z Speed (Altitude, positive down) [cm/s] (type:int16_t) hdg : Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX [cdeg] (type:uint16_t)

Source code in src/mavlink/definition.py
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
def global_position_int_encode(self, time_boot_ms: int, lat: int, lon: int, alt: int, relative_alt: int, vx: int, vy: int, vz: int, hdg: int) -> MAVLink_global_position_int_message:
    """
    The filtered global position (e.g. fused GPS and accelerometers). The
    position is in GPS-frame (right-handed, Z-up). It is designed
    as scaled integer message since the resolution of float is not
    sufficient.

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    lat                       : Latitude, expressed [degE7] (type:int32_t)
    lon                       : Longitude, expressed [degE7] (type:int32_t)
    alt                       : Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL. [mm] (type:int32_t)
    relative_alt              : Altitude above home [mm] (type:int32_t)
    vx                        : Ground X Speed (Latitude, positive north) [cm/s] (type:int16_t)
    vy                        : Ground Y Speed (Longitude, positive east) [cm/s] (type:int16_t)
    vz                        : Ground Z Speed (Altitude, positive down) [cm/s] (type:int16_t)
    hdg                       : Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX [cdeg] (type:uint16_t)

    """
    return MAVLink_global_position_int_message(time_boot_ms, lat, lon, alt, relative_alt, vx, vy, vz, hdg)

global_position_int_send

global_position_int_send(time_boot_ms: int, lat: int, lon: int, alt: int, relative_alt: int, vx: int, vy: int, vz: int, hdg: int, force_mavlink1: bool = False) -> None

The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It is designed as scaled integer message since the resolution of float is not sufficient.

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) lat : Latitude, expressed [degE7] (type:int32_t) lon : Longitude, expressed [degE7] (type:int32_t) alt : Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL. [mm] (type:int32_t) relative_alt : Altitude above home [mm] (type:int32_t) vx : Ground X Speed (Latitude, positive north) [cm/s] (type:int16_t) vy : Ground Y Speed (Longitude, positive east) [cm/s] (type:int16_t) vz : Ground Z Speed (Altitude, positive down) [cm/s] (type:int16_t) hdg : Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX [cdeg] (type:uint16_t)

Source code in src/mavlink/definition.py
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
def global_position_int_send(self, time_boot_ms: int, lat: int, lon: int, alt: int, relative_alt: int, vx: int, vy: int, vz: int, hdg: int, force_mavlink1: bool = False) -> None:
    """
    The filtered global position (e.g. fused GPS and accelerometers). The
    position is in GPS-frame (right-handed, Z-up). It is designed
    as scaled integer message since the resolution of float is not
    sufficient.

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    lat                       : Latitude, expressed [degE7] (type:int32_t)
    lon                       : Longitude, expressed [degE7] (type:int32_t)
    alt                       : Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL. [mm] (type:int32_t)
    relative_alt              : Altitude above home [mm] (type:int32_t)
    vx                        : Ground X Speed (Latitude, positive north) [cm/s] (type:int16_t)
    vy                        : Ground Y Speed (Longitude, positive east) [cm/s] (type:int16_t)
    vz                        : Ground Z Speed (Altitude, positive down) [cm/s] (type:int16_t)
    hdg                       : Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX [cdeg] (type:uint16_t)

    """
    self.send(self.global_position_int_encode(time_boot_ms, lat, lon, alt, relative_alt, vx, vy, vz, hdg), force_mavlink1=force_mavlink1)

gps_raw_int_encode

gps_raw_int_encode(time_usec: int, fix_type: int, lat: int, lon: int, alt: int, eph: int, epv: int, vel: int, cog: int, satellites_visible: int, alt_ellipsoid: int = 0, h_acc: int = 0, v_acc: int = 0, vel_acc: int = 0, hdg_acc: int = 0, yaw: int = 0) -> MAVLink_gps_raw_int_message

The global position, as returned by the Global Positioning System (GPS). This is NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate.

time_usec : Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. [us] (type:uint64_t) fix_type : GPS fix type. (type:uint8_t, values:GPS_FIX_TYPE) lat : Latitude (WGS84, EGM96 ellipsoid) [degE7] (type:int32_t) lon : Longitude (WGS84, EGM96 ellipsoid) [degE7] (type:int32_t) alt : Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude. [mm] (type:int32_t) eph : GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX (type:uint16_t) epv : GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX (type:uint16_t) vel : GPS ground speed. If unknown, set to: UINT16_MAX [cm/s] (type:uint16_t) cog : Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX [cdeg] (type:uint16_t) satellites_visible : Number of satellites visible. If unknown, set to UINT8_MAX (type:uint8_t) alt_ellipsoid : Altitude (above WGS84, EGM96 ellipsoid). Positive for up. [mm] (type:int32_t) h_acc : Position uncertainty. [mm] (type:uint32_t) v_acc : Altitude uncertainty. [mm] (type:uint32_t) vel_acc : Speed uncertainty. [mm/s] (type:uint32_t) hdg_acc : Heading / track uncertainty [degE5] (type:uint32_t) yaw : Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. [cdeg] (type:uint16_t)

Source code in src/mavlink/definition.py
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
def gps_raw_int_encode(self, time_usec: int, fix_type: int, lat: int, lon: int, alt: int, eph: int, epv: int, vel: int, cog: int, satellites_visible: int, alt_ellipsoid: int = 0, h_acc: int = 0, v_acc: int = 0, vel_acc: int = 0, hdg_acc: int = 0, yaw: int = 0) -> MAVLink_gps_raw_int_message:
    """
    The global position, as returned by the Global Positioning System
    (GPS). This is                 NOT the global position
    estimate of the system, but rather a RAW sensor value. See
    message GLOBAL_POSITION_INT for the global position estimate.

    time_usec                 : Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. [us] (type:uint64_t)
    fix_type                  : GPS fix type. (type:uint8_t, values:GPS_FIX_TYPE)
    lat                       : Latitude (WGS84, EGM96 ellipsoid) [degE7] (type:int32_t)
    lon                       : Longitude (WGS84, EGM96 ellipsoid) [degE7] (type:int32_t)
    alt                       : Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude. [mm] (type:int32_t)
    eph                       : GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX (type:uint16_t)
    epv                       : GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX (type:uint16_t)
    vel                       : GPS ground speed. If unknown, set to: UINT16_MAX [cm/s] (type:uint16_t)
    cog                       : Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX [cdeg] (type:uint16_t)
    satellites_visible        : Number of satellites visible. If unknown, set to UINT8_MAX (type:uint8_t)
    alt_ellipsoid             : Altitude (above WGS84, EGM96 ellipsoid). Positive for up. [mm] (type:int32_t)
    h_acc                     : Position uncertainty. [mm] (type:uint32_t)
    v_acc                     : Altitude uncertainty. [mm] (type:uint32_t)
    vel_acc                   : Speed uncertainty. [mm/s] (type:uint32_t)
    hdg_acc                   : Heading / track uncertainty [degE5] (type:uint32_t)
    yaw                       : Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. [cdeg] (type:uint16_t)

    """
    return MAVLink_gps_raw_int_message(time_usec, fix_type, lat, lon, alt, eph, epv, vel, cog, satellites_visible, alt_ellipsoid, h_acc, v_acc, vel_acc, hdg_acc, yaw)

gps_raw_int_send

gps_raw_int_send(time_usec: int, fix_type: int, lat: int, lon: int, alt: int, eph: int, epv: int, vel: int, cog: int, satellites_visible: int, alt_ellipsoid: int = 0, h_acc: int = 0, v_acc: int = 0, vel_acc: int = 0, hdg_acc: int = 0, yaw: int = 0, force_mavlink1: bool = False) -> None

The global position, as returned by the Global Positioning System (GPS). This is NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate.

time_usec : Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. [us] (type:uint64_t) fix_type : GPS fix type. (type:uint8_t, values:GPS_FIX_TYPE) lat : Latitude (WGS84, EGM96 ellipsoid) [degE7] (type:int32_t) lon : Longitude (WGS84, EGM96 ellipsoid) [degE7] (type:int32_t) alt : Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude. [mm] (type:int32_t) eph : GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX (type:uint16_t) epv : GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX (type:uint16_t) vel : GPS ground speed. If unknown, set to: UINT16_MAX [cm/s] (type:uint16_t) cog : Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX [cdeg] (type:uint16_t) satellites_visible : Number of satellites visible. If unknown, set to UINT8_MAX (type:uint8_t) alt_ellipsoid : Altitude (above WGS84, EGM96 ellipsoid). Positive for up. [mm] (type:int32_t) h_acc : Position uncertainty. [mm] (type:uint32_t) v_acc : Altitude uncertainty. [mm] (type:uint32_t) vel_acc : Speed uncertainty. [mm/s] (type:uint32_t) hdg_acc : Heading / track uncertainty [degE5] (type:uint32_t) yaw : Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. [cdeg] (type:uint16_t)

Source code in src/mavlink/definition.py
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
def gps_raw_int_send(self, time_usec: int, fix_type: int, lat: int, lon: int, alt: int, eph: int, epv: int, vel: int, cog: int, satellites_visible: int, alt_ellipsoid: int = 0, h_acc: int = 0, v_acc: int = 0, vel_acc: int = 0, hdg_acc: int = 0, yaw: int = 0, force_mavlink1: bool = False) -> None:
    """
    The global position, as returned by the Global Positioning System
    (GPS). This is                 NOT the global position
    estimate of the system, but rather a RAW sensor value. See
    message GLOBAL_POSITION_INT for the global position estimate.

    time_usec                 : Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number. [us] (type:uint64_t)
    fix_type                  : GPS fix type. (type:uint8_t, values:GPS_FIX_TYPE)
    lat                       : Latitude (WGS84, EGM96 ellipsoid) [degE7] (type:int32_t)
    lon                       : Longitude (WGS84, EGM96 ellipsoid) [degE7] (type:int32_t)
    alt                       : Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude. [mm] (type:int32_t)
    eph                       : GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX (type:uint16_t)
    epv                       : GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX (type:uint16_t)
    vel                       : GPS ground speed. If unknown, set to: UINT16_MAX [cm/s] (type:uint16_t)
    cog                       : Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX [cdeg] (type:uint16_t)
    satellites_visible        : Number of satellites visible. If unknown, set to UINT8_MAX (type:uint8_t)
    alt_ellipsoid             : Altitude (above WGS84, EGM96 ellipsoid). Positive for up. [mm] (type:int32_t)
    h_acc                     : Position uncertainty. [mm] (type:uint32_t)
    v_acc                     : Altitude uncertainty. [mm] (type:uint32_t)
    vel_acc                   : Speed uncertainty. [mm/s] (type:uint32_t)
    hdg_acc                   : Heading / track uncertainty [degE5] (type:uint32_t)
    yaw                       : Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. [cdeg] (type:uint16_t)

    """
    self.send(self.gps_raw_int_encode(time_usec, fix_type, lat, lon, alt, eph, epv, vel, cog, satellites_visible, alt_ellipsoid, h_acc, v_acc, vel_acc, hdg_acc, yaw), force_mavlink1=force_mavlink1)

gps_rtk_encode

gps_rtk_encode(time_last_baseline_ms: int, rtk_receiver_id: int, wn: int, tow: int, rtk_health: int, rtk_rate: int, nsats: int, baseline_coords_type: int, baseline_a_mm: int, baseline_b_mm: int, baseline_c_mm: int, accuracy: int, iar_num_hypotheses: int) -> MAVLink_gps_rtk_message

RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting

time_last_baseline_ms : Time since boot of last baseline message received. [ms] (type:uint32_t) rtk_receiver_id : Identification of connected RTK receiver. (type:uint8_t) wn : GPS Week Number of last baseline (type:uint16_t) tow : GPS Time of Week of last baseline [ms] (type:uint32_t) rtk_health : GPS-specific health report for RTK data. (type:uint8_t) rtk_rate : Rate of baseline messages being received by GPS [Hz] (type:uint8_t) nsats : Current number of sats used for RTK calculation. (type:uint8_t) baseline_coords_type : Coordinate system of baseline (type:uint8_t, values:RTK_BASELINE_COORDINATE_SYSTEM) baseline_a_mm : Current baseline in ECEF x or NED north component. [mm] (type:int32_t) baseline_b_mm : Current baseline in ECEF y or NED east component. [mm] (type:int32_t) baseline_c_mm : Current baseline in ECEF z or NED down component. [mm] (type:int32_t) accuracy : Current estimate of baseline accuracy. (type:uint32_t) iar_num_hypotheses : Current number of integer ambiguity hypotheses. (type:int32_t)

Source code in src/mavlink/definition.py
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
def gps_rtk_encode(self, time_last_baseline_ms: int, rtk_receiver_id: int, wn: int, tow: int, rtk_health: int, rtk_rate: int, nsats: int, baseline_coords_type: int, baseline_a_mm: int, baseline_b_mm: int, baseline_c_mm: int, accuracy: int, iar_num_hypotheses: int) -> MAVLink_gps_rtk_message:
    """
    RTK GPS data. Gives information on the relative baseline calculation
    the GPS is reporting

    time_last_baseline_ms        : Time since boot of last baseline message received. [ms] (type:uint32_t)
    rtk_receiver_id           : Identification of connected RTK receiver. (type:uint8_t)
    wn                        : GPS Week Number of last baseline (type:uint16_t)
    tow                       : GPS Time of Week of last baseline [ms] (type:uint32_t)
    rtk_health                : GPS-specific health report for RTK data. (type:uint8_t)
    rtk_rate                  : Rate of baseline messages being received by GPS [Hz] (type:uint8_t)
    nsats                     : Current number of sats used for RTK calculation. (type:uint8_t)
    baseline_coords_type        : Coordinate system of baseline (type:uint8_t, values:RTK_BASELINE_COORDINATE_SYSTEM)
    baseline_a_mm             : Current baseline in ECEF x or NED north component. [mm] (type:int32_t)
    baseline_b_mm             : Current baseline in ECEF y or NED east component. [mm] (type:int32_t)
    baseline_c_mm             : Current baseline in ECEF z or NED down component. [mm] (type:int32_t)
    accuracy                  : Current estimate of baseline accuracy. (type:uint32_t)
    iar_num_hypotheses        : Current number of integer ambiguity hypotheses. (type:int32_t)

    """
    return MAVLink_gps_rtk_message(time_last_baseline_ms, rtk_receiver_id, wn, tow, rtk_health, rtk_rate, nsats, baseline_coords_type, baseline_a_mm, baseline_b_mm, baseline_c_mm, accuracy, iar_num_hypotheses)

gps_rtk_send

gps_rtk_send(time_last_baseline_ms: int, rtk_receiver_id: int, wn: int, tow: int, rtk_health: int, rtk_rate: int, nsats: int, baseline_coords_type: int, baseline_a_mm: int, baseline_b_mm: int, baseline_c_mm: int, accuracy: int, iar_num_hypotheses: int, force_mavlink1: bool = False) -> None

RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting

time_last_baseline_ms : Time since boot of last baseline message received. [ms] (type:uint32_t) rtk_receiver_id : Identification of connected RTK receiver. (type:uint8_t) wn : GPS Week Number of last baseline (type:uint16_t) tow : GPS Time of Week of last baseline [ms] (type:uint32_t) rtk_health : GPS-specific health report for RTK data. (type:uint8_t) rtk_rate : Rate of baseline messages being received by GPS [Hz] (type:uint8_t) nsats : Current number of sats used for RTK calculation. (type:uint8_t) baseline_coords_type : Coordinate system of baseline (type:uint8_t, values:RTK_BASELINE_COORDINATE_SYSTEM) baseline_a_mm : Current baseline in ECEF x or NED north component. [mm] (type:int32_t) baseline_b_mm : Current baseline in ECEF y or NED east component. [mm] (type:int32_t) baseline_c_mm : Current baseline in ECEF z or NED down component. [mm] (type:int32_t) accuracy : Current estimate of baseline accuracy. (type:uint32_t) iar_num_hypotheses : Current number of integer ambiguity hypotheses. (type:int32_t)

Source code in src/mavlink/definition.py
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
def gps_rtk_send(self, time_last_baseline_ms: int, rtk_receiver_id: int, wn: int, tow: int, rtk_health: int, rtk_rate: int, nsats: int, baseline_coords_type: int, baseline_a_mm: int, baseline_b_mm: int, baseline_c_mm: int, accuracy: int, iar_num_hypotheses: int, force_mavlink1: bool = False) -> None:
    """
    RTK GPS data. Gives information on the relative baseline calculation
    the GPS is reporting

    time_last_baseline_ms        : Time since boot of last baseline message received. [ms] (type:uint32_t)
    rtk_receiver_id           : Identification of connected RTK receiver. (type:uint8_t)
    wn                        : GPS Week Number of last baseline (type:uint16_t)
    tow                       : GPS Time of Week of last baseline [ms] (type:uint32_t)
    rtk_health                : GPS-specific health report for RTK data. (type:uint8_t)
    rtk_rate                  : Rate of baseline messages being received by GPS [Hz] (type:uint8_t)
    nsats                     : Current number of sats used for RTK calculation. (type:uint8_t)
    baseline_coords_type        : Coordinate system of baseline (type:uint8_t, values:RTK_BASELINE_COORDINATE_SYSTEM)
    baseline_a_mm             : Current baseline in ECEF x or NED north component. [mm] (type:int32_t)
    baseline_b_mm             : Current baseline in ECEF y or NED east component. [mm] (type:int32_t)
    baseline_c_mm             : Current baseline in ECEF z or NED down component. [mm] (type:int32_t)
    accuracy                  : Current estimate of baseline accuracy. (type:uint32_t)
    iar_num_hypotheses        : Current number of integer ambiguity hypotheses. (type:int32_t)

    """
    self.send(self.gps_rtk_encode(time_last_baseline_ms, rtk_receiver_id, wn, tow, rtk_health, rtk_rate, nsats, baseline_coords_type, baseline_a_mm, baseline_b_mm, baseline_c_mm, accuracy, iar_num_hypotheses), force_mavlink1=force_mavlink1)

gps_status_encode

gps_status_encode(satellites_visible: int, satellite_prn: Sequence[int], satellite_used: Sequence[int], satellite_elevation: Sequence[int], satellite_azimuth: Sequence[int], satellite_snr: Sequence[int]) -> MAVLink_gps_status_message

The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites.

satellites_visible : Number of satellites visible (type:uint8_t) satellite_prn : Global satellite ID (type:uint8_t) satellite_used : 0: Satellite not used, 1: used for localization (type:uint8_t) satellite_elevation : Elevation (0: right on top of receiver, 90: on the horizon) of satellite [deg] (type:uint8_t) satellite_azimuth : Direction of satellite, 0: 0 deg, 255: 360 deg. [deg] (type:uint8_t) satellite_snr : Signal to noise ratio of satellite [dB] (type:uint8_t)

Source code in src/mavlink/definition.py
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
def gps_status_encode(self, satellites_visible: int, satellite_prn: Sequence[int], satellite_used: Sequence[int], satellite_elevation: Sequence[int], satellite_azimuth: Sequence[int], satellite_snr: Sequence[int]) -> MAVLink_gps_status_message:
    """
    The positioning status, as reported by GPS. This message is intended
    to display status information about each satellite visible to
    the receiver. See message GLOBAL_POSITION_INT for the global
    position estimate. This message can contain information for up
    to 20 satellites.

    satellites_visible        : Number of satellites visible (type:uint8_t)
    satellite_prn             : Global satellite ID (type:uint8_t)
    satellite_used            : 0: Satellite not used, 1: used for localization (type:uint8_t)
    satellite_elevation        : Elevation (0: right on top of receiver, 90: on the horizon) of satellite [deg] (type:uint8_t)
    satellite_azimuth         : Direction of satellite, 0: 0 deg, 255: 360 deg. [deg] (type:uint8_t)
    satellite_snr             : Signal to noise ratio of satellite [dB] (type:uint8_t)

    """
    return MAVLink_gps_status_message(satellites_visible, satellite_prn, satellite_used, satellite_elevation, satellite_azimuth, satellite_snr)

gps_status_send

gps_status_send(satellites_visible: int, satellite_prn: Sequence[int], satellite_used: Sequence[int], satellite_elevation: Sequence[int], satellite_azimuth: Sequence[int], satellite_snr: Sequence[int], force_mavlink1: bool = False) -> None

The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites.

satellites_visible : Number of satellites visible (type:uint8_t) satellite_prn : Global satellite ID (type:uint8_t) satellite_used : 0: Satellite not used, 1: used for localization (type:uint8_t) satellite_elevation : Elevation (0: right on top of receiver, 90: on the horizon) of satellite [deg] (type:uint8_t) satellite_azimuth : Direction of satellite, 0: 0 deg, 255: 360 deg. [deg] (type:uint8_t) satellite_snr : Signal to noise ratio of satellite [dB] (type:uint8_t)

Source code in src/mavlink/definition.py
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
def gps_status_send(self, satellites_visible: int, satellite_prn: Sequence[int], satellite_used: Sequence[int], satellite_elevation: Sequence[int], satellite_azimuth: Sequence[int], satellite_snr: Sequence[int], force_mavlink1: bool = False) -> None:
    """
    The positioning status, as reported by GPS. This message is intended
    to display status information about each satellite visible to
    the receiver. See message GLOBAL_POSITION_INT for the global
    position estimate. This message can contain information for up
    to 20 satellites.

    satellites_visible        : Number of satellites visible (type:uint8_t)
    satellite_prn             : Global satellite ID (type:uint8_t)
    satellite_used            : 0: Satellite not used, 1: used for localization (type:uint8_t)
    satellite_elevation        : Elevation (0: right on top of receiver, 90: on the horizon) of satellite [deg] (type:uint8_t)
    satellite_azimuth         : Direction of satellite, 0: 0 deg, 255: 360 deg. [deg] (type:uint8_t)
    satellite_snr             : Signal to noise ratio of satellite [dB] (type:uint8_t)

    """
    self.send(self.gps_status_encode(satellites_visible, satellite_prn, satellite_used, satellite_elevation, satellite_azimuth, satellite_snr), force_mavlink1=force_mavlink1)

heartbeat_encode

heartbeat_encode(type: int, autopilot: int, base_mode: int, custom_mode: int, system_status: int, mavlink_version: int = 3) -> MAVLink_heartbeat_message

The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at https://mavlink.io/en/services/heartbeat.html

type : Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type. (type:uint8_t, values:MAV_TYPE) autopilot : Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers. (type:uint8_t, values:MAV_AUTOPILOT) base_mode : System mode bitmap. (type:uint8_t, values:MAV_MODE_FLAG) custom_mode : A bitfield for use for autopilot-specific flags (type:uint32_t) system_status : System status flag. (type:uint8_t, values:MAV_STATE) mavlink_version : MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version (type:uint8_t)

Source code in src/mavlink/definition.py
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
def heartbeat_encode(self, type: int, autopilot: int, base_mode: int, custom_mode: int, system_status: int, mavlink_version: int = 3) -> MAVLink_heartbeat_message:
    """
    The heartbeat message shows that a system or component is present and
    responding. The type and autopilot fields (along with the
    message component id), allow the receiving system to treat
    further messages from this system appropriately (e.g. by
    laying out the user interface based on the autopilot). This
    microservice is documented at
    https://mavlink.io/en/services/heartbeat.html

    type                      : Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type. (type:uint8_t, values:MAV_TYPE)
    autopilot                 : Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers. (type:uint8_t, values:MAV_AUTOPILOT)
    base_mode                 : System mode bitmap. (type:uint8_t, values:MAV_MODE_FLAG)
    custom_mode               : A bitfield for use for autopilot-specific flags (type:uint32_t)
    system_status             : System status flag. (type:uint8_t, values:MAV_STATE)
    mavlink_version           : MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version (type:uint8_t)

    """
    return MAVLink_heartbeat_message(type, autopilot, base_mode, custom_mode, system_status, mavlink_version)

heartbeat_send

heartbeat_send(type: int, autopilot: int, base_mode: int, custom_mode: int, system_status: int, mavlink_version: int = 3, force_mavlink1: bool = False) -> None

The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at https://mavlink.io/en/services/heartbeat.html

type : Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type. (type:uint8_t, values:MAV_TYPE) autopilot : Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers. (type:uint8_t, values:MAV_AUTOPILOT) base_mode : System mode bitmap. (type:uint8_t, values:MAV_MODE_FLAG) custom_mode : A bitfield for use for autopilot-specific flags (type:uint32_t) system_status : System status flag. (type:uint8_t, values:MAV_STATE) mavlink_version : MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version (type:uint8_t)

Source code in src/mavlink/definition.py
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
def heartbeat_send(self, type: int, autopilot: int, base_mode: int, custom_mode: int, system_status: int, mavlink_version: int = 3, force_mavlink1: bool = False) -> None:
    """
    The heartbeat message shows that a system or component is present and
    responding. The type and autopilot fields (along with the
    message component id), allow the receiving system to treat
    further messages from this system appropriately (e.g. by
    laying out the user interface based on the autopilot). This
    microservice is documented at
    https://mavlink.io/en/services/heartbeat.html

    type                      : Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type. (type:uint8_t, values:MAV_TYPE)
    autopilot                 : Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers. (type:uint8_t, values:MAV_AUTOPILOT)
    base_mode                 : System mode bitmap. (type:uint8_t, values:MAV_MODE_FLAG)
    custom_mode               : A bitfield for use for autopilot-specific flags (type:uint32_t)
    system_status             : System status flag. (type:uint8_t, values:MAV_STATE)
    mavlink_version           : MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version (type:uint8_t)

    """
    self.send(self.heartbeat_encode(type, autopilot, base_mode, custom_mode, system_status, mavlink_version), force_mavlink1=force_mavlink1)

hygrometer_sensor_encode

hygrometer_sensor_encode(id: int, temperature: int, humidity: int) -> MAVLink_hygrometer_sensor_message

Temperature and humidity from hygrometer.

id : Hygrometer ID (type:uint8_t) temperature : Temperature [cdegC] (type:int16_t) humidity : Humidity [c%] (type:uint16_t)

Source code in src/mavlink/definition.py
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
def hygrometer_sensor_encode(self, id: int, temperature: int, humidity: int) -> MAVLink_hygrometer_sensor_message:
    """
    Temperature and humidity from hygrometer.

    id                        : Hygrometer ID (type:uint8_t)
    temperature               : Temperature [cdegC] (type:int16_t)
    humidity                  : Humidity [c%] (type:uint16_t)

    """
    return MAVLink_hygrometer_sensor_message(id, temperature, humidity)

hygrometer_sensor_send

hygrometer_sensor_send(id: int, temperature: int, humidity: int, force_mavlink1: bool = False) -> None

Temperature and humidity from hygrometer.

id : Hygrometer ID (type:uint8_t) temperature : Temperature [cdegC] (type:int16_t) humidity : Humidity [c%] (type:uint16_t)

Source code in src/mavlink/definition.py
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
def hygrometer_sensor_send(self, id: int, temperature: int, humidity: int, force_mavlink1: bool = False) -> None:
    """
    Temperature and humidity from hygrometer.

    id                        : Hygrometer ID (type:uint8_t)
    temperature               : Temperature [cdegC] (type:int16_t)
    humidity                  : Humidity [c%] (type:uint16_t)

    """
    self.send(self.hygrometer_sensor_encode(id, temperature, humidity), force_mavlink1=force_mavlink1)

imu_encode

imu_encode(time_boot_ms: int, xacc: float, yacc: float, zacc: float, xgyro: float, ygyro: float, zgyro: float) -> MAVLink_imu_message

The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) xacc : X acceleration [m/s/s] (type:float) yacc : Y acceleration [m/s/s] (type:float) zacc : Z acceleration [m/s/s] (type:float) xgyro : Angular speed around X axis [rad/s] (type:float) ygyro : Angular speed around Y axis [rad/s] (type:float) zgyro : Angular speed around Z axis [rad/s] (type:float)

Source code in src/mavlink/definition.py
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
def imu_encode(self, time_boot_ms: int, xacc: float, yacc: float, zacc: float, xgyro: float, ygyro: float, zgyro: float) -> MAVLink_imu_message:
    """
    The RAW IMU readings for the usual 9DOF sensor setup. This message
    should contain the scaled values to the described units

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    xacc                      : X acceleration [m/s/s] (type:float)
    yacc                      : Y acceleration [m/s/s] (type:float)
    zacc                      : Z acceleration [m/s/s] (type:float)
    xgyro                     : Angular speed around X axis [rad/s] (type:float)
    ygyro                     : Angular speed around Y axis [rad/s] (type:float)
    zgyro                     : Angular speed around Z axis [rad/s] (type:float)

    """
    return MAVLink_imu_message(time_boot_ms, xacc, yacc, zacc, xgyro, ygyro, zgyro)

imu_send

imu_send(time_boot_ms: int, xacc: float, yacc: float, zacc: float, xgyro: float, ygyro: float, zgyro: float, force_mavlink1: bool = False) -> None

The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) xacc : X acceleration [m/s/s] (type:float) yacc : Y acceleration [m/s/s] (type:float) zacc : Z acceleration [m/s/s] (type:float) xgyro : Angular speed around X axis [rad/s] (type:float) ygyro : Angular speed around Y axis [rad/s] (type:float) zgyro : Angular speed around Z axis [rad/s] (type:float)

Source code in src/mavlink/definition.py
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
def imu_send(self, time_boot_ms: int, xacc: float, yacc: float, zacc: float, xgyro: float, ygyro: float, zgyro: float, force_mavlink1: bool = False) -> None:
    """
    The RAW IMU readings for the usual 9DOF sensor setup. This message
    should contain the scaled values to the described units

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    xacc                      : X acceleration [m/s/s] (type:float)
    yacc                      : Y acceleration [m/s/s] (type:float)
    zacc                      : Z acceleration [m/s/s] (type:float)
    xgyro                     : Angular speed around X axis [rad/s] (type:float)
    ygyro                     : Angular speed around Y axis [rad/s] (type:float)
    zgyro                     : Angular speed around Z axis [rad/s] (type:float)

    """
    self.send(self.imu_encode(time_boot_ms, xacc, yacc, zacc, xgyro, ygyro, zgyro), force_mavlink1=force_mavlink1)

local_position_ned_system_global_offset_encode

local_position_ned_system_global_offset_encode(time_boot_ms: int, x: float, y: float, z: float, roll: float, pitch: float, yaw: float) -> MAVLink_local_position_ned_system_global_offset_message

The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) x : X Position [m] (type:float) y : Y Position [m] (type:float) z : Z Position [m] (type:float) roll : Roll [rad] (type:float) pitch : Pitch [rad] (type:float) yaw : Yaw [rad] (type:float)

Source code in src/mavlink/definition.py
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
def local_position_ned_system_global_offset_encode(self, time_boot_ms: int, x: float, y: float, z: float, roll: float, pitch: float, yaw: float) -> MAVLink_local_position_ned_system_global_offset_message:
    """
    The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages
    of MAV X and the global coordinate frame in NED coordinates.
    Coordinate frame is right-handed, Z-axis down (aeronautical
    frame, NED / north-east-down convention)

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    x                         : X Position [m] (type:float)
    y                         : Y Position [m] (type:float)
    z                         : Z Position [m] (type:float)
    roll                      : Roll [rad] (type:float)
    pitch                     : Pitch [rad] (type:float)
    yaw                       : Yaw [rad] (type:float)

    """
    return MAVLink_local_position_ned_system_global_offset_message(time_boot_ms, x, y, z, roll, pitch, yaw)

local_position_ned_system_global_offset_send

local_position_ned_system_global_offset_send(time_boot_ms: int, x: float, y: float, z: float, roll: float, pitch: float, yaw: float, force_mavlink1: bool = False) -> None

The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) x : X Position [m] (type:float) y : Y Position [m] (type:float) z : Z Position [m] (type:float) roll : Roll [rad] (type:float) pitch : Pitch [rad] (type:float) yaw : Yaw [rad] (type:float)

Source code in src/mavlink/definition.py
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
def local_position_ned_system_global_offset_send(self, time_boot_ms: int, x: float, y: float, z: float, roll: float, pitch: float, yaw: float, force_mavlink1: bool = False) -> None:
    """
    The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages
    of MAV X and the global coordinate frame in NED coordinates.
    Coordinate frame is right-handed, Z-axis down (aeronautical
    frame, NED / north-east-down convention)

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    x                         : X Position [m] (type:float)
    y                         : Y Position [m] (type:float)
    z                         : Z Position [m] (type:float)
    roll                      : Roll [rad] (type:float)
    pitch                     : Pitch [rad] (type:float)
    yaw                       : Yaw [rad] (type:float)

    """
    self.send(self.local_position_ned_system_global_offset_encode(time_boot_ms, x, y, z, roll, pitch, yaw), force_mavlink1=force_mavlink1)

mag_cal_report_encode

mag_cal_report_encode(compass_id: int, cal_mask: int, cal_status: int, autosaved: int, fitness: float, ofs_x: float, ofs_y: float, ofs_z: float, diag_x: float, diag_y: float, diag_z: float, offdiag_x: float, offdiag_y: float, offdiag_z: float, orientation_confidence: float = 0, old_orientation: int = 0, new_orientation: int = 0, scale_factor: float = 0) -> MAVLink_mag_cal_report_message

Reports results of completed compass calibration. Sent until MAG_CAL_ACK received.

compass_id : Compass being calibrated. (type:uint8_t) cal_mask : Bitmask of compasses being calibrated. (type:uint8_t) cal_status : Calibration Status. (type:uint8_t, values:MAG_CAL_STATUS) autosaved : 0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters. (type:uint8_t) fitness : RMS milligauss residuals. [mgauss] (type:float) ofs_x : X offset. (type:float) ofs_y : Y offset. (type:float) ofs_z : Z offset. (type:float) diag_x : X diagonal (matrix 11). (type:float) diag_y : Y diagonal (matrix 22). (type:float) diag_z : Z diagonal (matrix 33). (type:float) offdiag_x : X off-diagonal (matrix 12 and 21). (type:float) offdiag_y : Y off-diagonal (matrix 13 and 31). (type:float) offdiag_z : Z off-diagonal (matrix 32 and 23). (type:float) orientation_confidence : Confidence in orientation (higher is better). (type:float) old_orientation : orientation before calibration. (type:uint8_t, values:MAV_SENSOR_ORIENTATION) new_orientation : orientation after calibration. (type:uint8_t, values:MAV_SENSOR_ORIENTATION) scale_factor : field radius correction factor (type:float)

Source code in src/mavlink/definition.py
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
def mag_cal_report_encode(self, compass_id: int, cal_mask: int, cal_status: int, autosaved: int, fitness: float, ofs_x: float, ofs_y: float, ofs_z: float, diag_x: float, diag_y: float, diag_z: float, offdiag_x: float, offdiag_y: float, offdiag_z: float, orientation_confidence: float = 0, old_orientation: int = 0, new_orientation: int = 0, scale_factor: float = 0) -> MAVLink_mag_cal_report_message:
    """
    Reports results of completed compass calibration. Sent until
    MAG_CAL_ACK received.

    compass_id                : Compass being calibrated. (type:uint8_t)
    cal_mask                  : Bitmask of compasses being calibrated. (type:uint8_t)
    cal_status                : Calibration Status. (type:uint8_t, values:MAG_CAL_STATUS)
    autosaved                 : 0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters. (type:uint8_t)
    fitness                   : RMS milligauss residuals. [mgauss] (type:float)
    ofs_x                     : X offset. (type:float)
    ofs_y                     : Y offset. (type:float)
    ofs_z                     : Z offset. (type:float)
    diag_x                    : X diagonal (matrix 11). (type:float)
    diag_y                    : Y diagonal (matrix 22). (type:float)
    diag_z                    : Z diagonal (matrix 33). (type:float)
    offdiag_x                 : X off-diagonal (matrix 12 and 21). (type:float)
    offdiag_y                 : Y off-diagonal (matrix 13 and 31). (type:float)
    offdiag_z                 : Z off-diagonal (matrix 32 and 23). (type:float)
    orientation_confidence        : Confidence in orientation (higher is better). (type:float)
    old_orientation           : orientation before calibration. (type:uint8_t, values:MAV_SENSOR_ORIENTATION)
    new_orientation           : orientation after calibration. (type:uint8_t, values:MAV_SENSOR_ORIENTATION)
    scale_factor              : field radius correction factor (type:float)

    """
    return MAVLink_mag_cal_report_message(compass_id, cal_mask, cal_status, autosaved, fitness, ofs_x, ofs_y, ofs_z, diag_x, diag_y, diag_z, offdiag_x, offdiag_y, offdiag_z, orientation_confidence, old_orientation, new_orientation, scale_factor)

mag_cal_report_send

mag_cal_report_send(compass_id: int, cal_mask: int, cal_status: int, autosaved: int, fitness: float, ofs_x: float, ofs_y: float, ofs_z: float, diag_x: float, diag_y: float, diag_z: float, offdiag_x: float, offdiag_y: float, offdiag_z: float, orientation_confidence: float = 0, old_orientation: int = 0, new_orientation: int = 0, scale_factor: float = 0, force_mavlink1: bool = False) -> None

Reports results of completed compass calibration. Sent until MAG_CAL_ACK received.

compass_id : Compass being calibrated. (type:uint8_t) cal_mask : Bitmask of compasses being calibrated. (type:uint8_t) cal_status : Calibration Status. (type:uint8_t, values:MAG_CAL_STATUS) autosaved : 0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters. (type:uint8_t) fitness : RMS milligauss residuals. [mgauss] (type:float) ofs_x : X offset. (type:float) ofs_y : Y offset. (type:float) ofs_z : Z offset. (type:float) diag_x : X diagonal (matrix 11). (type:float) diag_y : Y diagonal (matrix 22). (type:float) diag_z : Z diagonal (matrix 33). (type:float) offdiag_x : X off-diagonal (matrix 12 and 21). (type:float) offdiag_y : Y off-diagonal (matrix 13 and 31). (type:float) offdiag_z : Z off-diagonal (matrix 32 and 23). (type:float) orientation_confidence : Confidence in orientation (higher is better). (type:float) old_orientation : orientation before calibration. (type:uint8_t, values:MAV_SENSOR_ORIENTATION) new_orientation : orientation after calibration. (type:uint8_t, values:MAV_SENSOR_ORIENTATION) scale_factor : field radius correction factor (type:float)

Source code in src/mavlink/definition.py
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
def mag_cal_report_send(self, compass_id: int, cal_mask: int, cal_status: int, autosaved: int, fitness: float, ofs_x: float, ofs_y: float, ofs_z: float, diag_x: float, diag_y: float, diag_z: float, offdiag_x: float, offdiag_y: float, offdiag_z: float, orientation_confidence: float = 0, old_orientation: int = 0, new_orientation: int = 0, scale_factor: float = 0, force_mavlink1: bool = False) -> None:
    """
    Reports results of completed compass calibration. Sent until
    MAG_CAL_ACK received.

    compass_id                : Compass being calibrated. (type:uint8_t)
    cal_mask                  : Bitmask of compasses being calibrated. (type:uint8_t)
    cal_status                : Calibration Status. (type:uint8_t, values:MAG_CAL_STATUS)
    autosaved                 : 0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters. (type:uint8_t)
    fitness                   : RMS milligauss residuals. [mgauss] (type:float)
    ofs_x                     : X offset. (type:float)
    ofs_y                     : Y offset. (type:float)
    ofs_z                     : Z offset. (type:float)
    diag_x                    : X diagonal (matrix 11). (type:float)
    diag_y                    : Y diagonal (matrix 22). (type:float)
    diag_z                    : Z diagonal (matrix 33). (type:float)
    offdiag_x                 : X off-diagonal (matrix 12 and 21). (type:float)
    offdiag_y                 : Y off-diagonal (matrix 13 and 31). (type:float)
    offdiag_z                 : Z off-diagonal (matrix 32 and 23). (type:float)
    orientation_confidence        : Confidence in orientation (higher is better). (type:float)
    old_orientation           : orientation before calibration. (type:uint8_t, values:MAV_SENSOR_ORIENTATION)
    new_orientation           : orientation after calibration. (type:uint8_t, values:MAV_SENSOR_ORIENTATION)
    scale_factor              : field radius correction factor (type:float)

    """
    self.send(self.mag_cal_report_encode(compass_id, cal_mask, cal_status, autosaved, fitness, ofs_x, ofs_y, ofs_z, diag_x, diag_y, diag_z, offdiag_x, offdiag_y, offdiag_z, orientation_confidence, old_orientation, new_orientation, scale_factor), force_mavlink1=force_mavlink1)

message_interval_encode

message_interval_encode(message_id: int, interval_us: int) -> MAVLink_message_interval_message

The interval between messages for a particular MAVLink message ID. This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). This interface replaces DATA_STREAM.

message_id : The ID of the requested MAVLink message. v1.0 is limited to 254 messages. (type:uint16_t) interval_us : The interval between two messages. A value of -1 indicates this stream is disabled, 0 indicates it is not available, > 0 indicates the interval at which it is sent. [us] (type:int32_t)

Source code in src/mavlink/definition.py
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
def message_interval_encode(self, message_id: int, interval_us: int) -> MAVLink_message_interval_message:
    """
    The interval between messages for a particular MAVLink message ID.
    This message is sent in response to the
    MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message)
    and param2=message_id (the id of the message for which the
    interval is required).         This interface replaces
    DATA_STREAM.

    message_id                : The ID of the requested MAVLink message. v1.0 is limited to 254 messages. (type:uint16_t)
    interval_us               : The interval between two messages. A value of -1 indicates this stream is disabled, 0 indicates it is not available, > 0 indicates the interval at which it is sent. [us] (type:int32_t)

    """
    return MAVLink_message_interval_message(message_id, interval_us)

message_interval_send

message_interval_send(message_id: int, interval_us: int, force_mavlink1: bool = False) -> None

The interval between messages for a particular MAVLink message ID. This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). This interface replaces DATA_STREAM.

message_id : The ID of the requested MAVLink message. v1.0 is limited to 254 messages. (type:uint16_t) interval_us : The interval between two messages. A value of -1 indicates this stream is disabled, 0 indicates it is not available, > 0 indicates the interval at which it is sent. [us] (type:int32_t)

Source code in src/mavlink/definition.py
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
def message_interval_send(self, message_id: int, interval_us: int, force_mavlink1: bool = False) -> None:
    """
    The interval between messages for a particular MAVLink message ID.
    This message is sent in response to the
    MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message)
    and param2=message_id (the id of the message for which the
    interval is required).         This interface replaces
    DATA_STREAM.

    message_id                : The ID of the requested MAVLink message. v1.0 is limited to 254 messages. (type:uint16_t)
    interval_us               : The interval between two messages. A value of -1 indicates this stream is disabled, 0 indicates it is not available, > 0 indicates the interval at which it is sent. [us] (type:int32_t)

    """
    self.send(self.message_interval_encode(message_id, interval_us), force_mavlink1=force_mavlink1)

param_request_list_encode

param_request_list_encode(target_system: int, target_component: int) -> MAVLink_param_request_list_message

Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at https://mavlink.io/en/services/parameter.html

target_system : System ID (type:uint8_t) target_component : Component ID (type:uint8_t)

Source code in src/mavlink/definition.py
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
def param_request_list_encode(self, target_system: int, target_component: int) -> MAVLink_param_request_list_message:
    """
    Request all parameters of this component. After this request, all
    parameters are emitted. The parameter microservice is
    documented at https://mavlink.io/en/services/parameter.html

    target_system             : System ID (type:uint8_t)
    target_component          : Component ID (type:uint8_t)

    """
    return MAVLink_param_request_list_message(target_system, target_component)

param_request_list_send

param_request_list_send(target_system: int, target_component: int, force_mavlink1: bool = False) -> None

Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at https://mavlink.io/en/services/parameter.html

target_system : System ID (type:uint8_t) target_component : Component ID (type:uint8_t)

Source code in src/mavlink/definition.py
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
def param_request_list_send(self, target_system: int, target_component: int, force_mavlink1: bool = False) -> None:
    """
    Request all parameters of this component. After this request, all
    parameters are emitted. The parameter microservice is
    documented at https://mavlink.io/en/services/parameter.html

    target_system             : System ID (type:uint8_t)
    target_component          : Component ID (type:uint8_t)

    """
    self.send(self.param_request_list_encode(target_system, target_component), force_mavlink1=force_mavlink1)

param_request_read_encode

param_request_read_encode(target_system: int, target_component: int, param_id: bytes, param_index: int) -> MAVLink_param_request_read_message

Request to read the onboard parameter with the param_id string id. Onboard parameters are stored as key[const char*] -> value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also https://mavlink.io/en/services/parameter.html for a full documentation of QGroundControl and IMU code.

target_system : System ID (type:uint8_t) target_component : Component ID (type:uint8_t) param_id : Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string (type:char) param_index : Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored) (type:int16_t)

Source code in src/mavlink/definition.py
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
def param_request_read_encode(self, target_system: int, target_component: int, param_id: bytes, param_index: int) -> MAVLink_param_request_read_message:
    """
    Request to read the onboard parameter with the param_id string id.
    Onboard parameters are stored as key[const char*] ->
    value[float]. This allows to send a parameter to any other
    component (such as the GCS) without the need of previous
    knowledge of possible parameter names. Thus the same GCS can
    store different parameters for different autopilots. See also
    https://mavlink.io/en/services/parameter.html for a full
    documentation of QGroundControl and IMU code.

    target_system             : System ID (type:uint8_t)
    target_component          : Component ID (type:uint8_t)
    param_id                  : Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string (type:char)
    param_index               : Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored) (type:int16_t)

    """
    return MAVLink_param_request_read_message(target_system, target_component, param_id, param_index)

param_request_read_send

param_request_read_send(target_system: int, target_component: int, param_id: bytes, param_index: int, force_mavlink1: bool = False) -> None

Request to read the onboard parameter with the param_id string id. Onboard parameters are stored as key[const char*] -> value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also https://mavlink.io/en/services/parameter.html for a full documentation of QGroundControl and IMU code.

target_system : System ID (type:uint8_t) target_component : Component ID (type:uint8_t) param_id : Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string (type:char) param_index : Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored) (type:int16_t)

Source code in src/mavlink/definition.py
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
def param_request_read_send(self, target_system: int, target_component: int, param_id: bytes, param_index: int, force_mavlink1: bool = False) -> None:
    """
    Request to read the onboard parameter with the param_id string id.
    Onboard parameters are stored as key[const char*] ->
    value[float]. This allows to send a parameter to any other
    component (such as the GCS) without the need of previous
    knowledge of possible parameter names. Thus the same GCS can
    store different parameters for different autopilots. See also
    https://mavlink.io/en/services/parameter.html for a full
    documentation of QGroundControl and IMU code.

    target_system             : System ID (type:uint8_t)
    target_component          : Component ID (type:uint8_t)
    param_id                  : Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string (type:char)
    param_index               : Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored) (type:int16_t)

    """
    self.send(self.param_request_read_encode(target_system, target_component, param_id, param_index), force_mavlink1=force_mavlink1)

param_set_encode

param_set_encode(target_system: int, target_component: int, param_id: bytes, param_value: float, param_type: int) -> MAVLink_param_set_message

Set a parameter value (write new value to permanent storage). The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at https://mavlink.io/en/services/parameter.html.

target_system : System ID (type:uint8_t) target_component : Component ID (type:uint8_t) param_id : Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string (type:char) param_value : Onboard parameter value (type:float) param_type : Onboard parameter type. (type:uint8_t, values:MAV_PARAM_TYPE)

Source code in src/mavlink/definition.py
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
def param_set_encode(self, target_system: int, target_component: int, param_id: bytes, param_value: float, param_type: int) -> MAVLink_param_set_message:
    """
    Set a parameter value (write new value to permanent storage).
    The receiving component should acknowledge the new parameter
    value by broadcasting a PARAM_VALUE message (broadcasting
    ensures that multiple GCS all have an up-to-date list of all
    parameters). If the sending GCS did not receive a PARAM_VALUE
    within its timeout time, it should re-send the PARAM_SET
    message. The parameter microservice is documented at
    https://mavlink.io/en/services/parameter.html.

    target_system             : System ID (type:uint8_t)
    target_component          : Component ID (type:uint8_t)
    param_id                  : Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string (type:char)
    param_value               : Onboard parameter value (type:float)
    param_type                : Onboard parameter type. (type:uint8_t, values:MAV_PARAM_TYPE)

    """
    return MAVLink_param_set_message(target_system, target_component, param_id, param_value, param_type)

param_set_send

param_set_send(target_system: int, target_component: int, param_id: bytes, param_value: float, param_type: int, force_mavlink1: bool = False) -> None

Set a parameter value (write new value to permanent storage). The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at https://mavlink.io/en/services/parameter.html.

target_system : System ID (type:uint8_t) target_component : Component ID (type:uint8_t) param_id : Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string (type:char) param_value : Onboard parameter value (type:float) param_type : Onboard parameter type. (type:uint8_t, values:MAV_PARAM_TYPE)

Source code in src/mavlink/definition.py
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
def param_set_send(self, target_system: int, target_component: int, param_id: bytes, param_value: float, param_type: int, force_mavlink1: bool = False) -> None:
    """
    Set a parameter value (write new value to permanent storage).
    The receiving component should acknowledge the new parameter
    value by broadcasting a PARAM_VALUE message (broadcasting
    ensures that multiple GCS all have an up-to-date list of all
    parameters). If the sending GCS did not receive a PARAM_VALUE
    within its timeout time, it should re-send the PARAM_SET
    message. The parameter microservice is documented at
    https://mavlink.io/en/services/parameter.html.

    target_system             : System ID (type:uint8_t)
    target_component          : Component ID (type:uint8_t)
    param_id                  : Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string (type:char)
    param_value               : Onboard parameter value (type:float)
    param_type                : Onboard parameter type. (type:uint8_t, values:MAV_PARAM_TYPE)

    """
    self.send(self.param_set_encode(target_system, target_component, param_id, param_value, param_type), force_mavlink1=force_mavlink1)

param_value_encode

param_value_encode(param_id: bytes, param_value: float, param_type: int, param_count: int, param_index: int) -> MAVLink_param_value_message

Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at https://mavlink.io/en/services/parameter.html

param_id : Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string (type:char) param_value : Onboard parameter value (type:float) param_type : Onboard parameter type. (type:uint8_t, values:MAV_PARAM_TYPE) param_count : Total number of onboard parameters (type:uint16_t) param_index : Index of this onboard parameter (type:uint16_t)

Source code in src/mavlink/definition.py
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
def param_value_encode(self, param_id: bytes, param_value: float, param_type: int, param_count: int, param_index: int) -> MAVLink_param_value_message:
    """
    Emit the value of a onboard parameter. The inclusion of param_count
    and param_index in the message allows the recipient to keep
    track of received parameters and allows him to re-request
    missing parameters after a loss or timeout. The parameter
    microservice is documented at
    https://mavlink.io/en/services/parameter.html

    param_id                  : Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string (type:char)
    param_value               : Onboard parameter value (type:float)
    param_type                : Onboard parameter type. (type:uint8_t, values:MAV_PARAM_TYPE)
    param_count               : Total number of onboard parameters (type:uint16_t)
    param_index               : Index of this onboard parameter (type:uint16_t)

    """
    return MAVLink_param_value_message(param_id, param_value, param_type, param_count, param_index)

param_value_send

param_value_send(param_id: bytes, param_value: float, param_type: int, param_count: int, param_index: int, force_mavlink1: bool = False) -> None

Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at https://mavlink.io/en/services/parameter.html

param_id : Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string (type:char) param_value : Onboard parameter value (type:float) param_type : Onboard parameter type. (type:uint8_t, values:MAV_PARAM_TYPE) param_count : Total number of onboard parameters (type:uint16_t) param_index : Index of this onboard parameter (type:uint16_t)

Source code in src/mavlink/definition.py
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
def param_value_send(self, param_id: bytes, param_value: float, param_type: int, param_count: int, param_index: int, force_mavlink1: bool = False) -> None:
    """
    Emit the value of a onboard parameter. The inclusion of param_count
    and param_index in the message allows the recipient to keep
    track of received parameters and allows him to re-request
    missing parameters after a loss or timeout. The parameter
    microservice is documented at
    https://mavlink.io/en/services/parameter.html

    param_id                  : Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string (type:char)
    param_value               : Onboard parameter value (type:float)
    param_type                : Onboard parameter type. (type:uint8_t, values:MAV_PARAM_TYPE)
    param_count               : Total number of onboard parameters (type:uint16_t)
    param_index               : Index of this onboard parameter (type:uint16_t)

    """
    self.send(self.param_value_encode(param_id, param_value, param_type, param_count, param_index), force_mavlink1=force_mavlink1)

parse_buffer

parse_buffer(s: Sequence[int]) -> Optional[List[MAVLink_message]]

input some data bytes, possibly returning a list of new messages

Source code in src/mavlink/definition.py
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
def parse_buffer(self, s: Sequence[int]) -> Optional[List[MAVLink_message]]:
    """input some data bytes, possibly returning a list of new messages"""
    m = self.parse_char(s)
    if m is None:
        return None
    ret = [m]
    while True:
        m = self.parse_char(b"")
        if m is None:
            return ret
        ret.append(m)

parse_char

parse_char(c: Sequence[int]) -> Optional[MAVLink_message]

input some data bytes, possibly returning a new message

Source code in src/mavlink/definition.py
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
def parse_char(self, c: Sequence[int]) -> Optional[MAVLink_message]:
    """input some data bytes, possibly returning a new message"""
    self.buf.extend(c)

    self.total_bytes_received += len(c)

    m = self.__parse_char_legacy()

    if m is not None:
        self.total_packets_received += 1
        self.__callbacks(m)
    else:
        # XXX The idea here is if we've read something and there's nothing left in
        # the buffer, reset it to 0 which frees the memory
        if self.buf_len() == 0 and self.buf_index != 0:
            self.buf = bytearray()
            self.buf_index = 0

    return m

pilot_power_encode

pilot_power_encode(power: float, cadence: float) -> MAVLink_pilot_power_message

Output status of the pilot power.

power : Power [W] (type:float) cadence : Cadence [rpm] (type:float)

Source code in src/mavlink/definition.py
5933
5934
5935
5936
5937
5938
5939
5940
5941
def pilot_power_encode(self, power: float, cadence: float) -> MAVLink_pilot_power_message:
    """
    Output status of the pilot power.

    power                     : Power [W] (type:float)
    cadence                   : Cadence [rpm] (type:float)

    """
    return MAVLink_pilot_power_message(power, cadence)

pilot_power_send

pilot_power_send(power: float, cadence: float, force_mavlink1: bool = False) -> None

Output status of the pilot power.

power : Power [W] (type:float) cadence : Cadence [rpm] (type:float)

Source code in src/mavlink/definition.py
5943
5944
5945
5946
5947
5948
5949
5950
5951
def pilot_power_send(self, power: float, cadence: float, force_mavlink1: bool = False) -> None:
    """
    Output status of the pilot power.

    power                     : Power [W] (type:float)
    cadence                   : Cadence [rpm] (type:float)

    """
    self.send(self.pilot_power_encode(power, cadence), force_mavlink1=force_mavlink1)

position_target_global_int_encode

position_target_global_int_encode(time_boot_ms: int, coordinate_frame: int, type_mask: int, lat_int: int, lon_int: int, alt: float, vx: float, vy: float, vz: float, afx: float, afy: float, afz: float, yaw: float, yaw_rate: float) -> MAVLink_position_target_global_int_message

Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way.

time_boot_ms : Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency. [ms] (type:uint32_t) coordinate_frame : Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated) (type:uint8_t, values:MAV_FRAME) type_mask : Bitmap to indicate which dimensions should be ignored by the vehicle. (type:uint16_t, values:POSITION_TARGET_TYPEMASK) lat_int : Latitude in WGS84 frame [degE7] (type:int32_t) lon_int : Longitude in WGS84 frame [degE7] (type:int32_t) alt : Altitude (MSL, AGL or relative to home altitude, depending on frame) [m] (type:float) vx : X velocity in NED frame [m/s] (type:float) vy : Y velocity in NED frame [m/s] (type:float) vz : Z velocity in NED frame [m/s] (type:float) afx : X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N [m/s/s] (type:float) afy : Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N [m/s/s] (type:float) afz : Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N [m/s/s] (type:float) yaw : yaw setpoint [rad] (type:float) yaw_rate : yaw rate setpoint [rad/s] (type:float)

Source code in src/mavlink/definition.py
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
def position_target_global_int_encode(self, time_boot_ms: int, coordinate_frame: int, type_mask: int, lat_int: int, lon_int: int, alt: float, vx: float, vy: float, vz: float, afx: float, afy: float, afz: float, yaw: float, yaw_rate: float) -> MAVLink_position_target_global_int_message:
    """
    Reports the current commanded vehicle position, velocity, and
    acceleration as specified by the autopilot. This should match
    the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the
    vehicle is being controlled this way.

    time_boot_ms              : Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency. [ms] (type:uint32_t)
    coordinate_frame          : Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated) (type:uint8_t, values:MAV_FRAME)
    type_mask                 : Bitmap to indicate which dimensions should be ignored by the vehicle. (type:uint16_t, values:POSITION_TARGET_TYPEMASK)
    lat_int                   : Latitude in WGS84 frame [degE7] (type:int32_t)
    lon_int                   : Longitude in WGS84 frame [degE7] (type:int32_t)
    alt                       : Altitude (MSL, AGL or relative to home altitude, depending on frame) [m] (type:float)
    vx                        : X velocity in NED frame [m/s] (type:float)
    vy                        : Y velocity in NED frame [m/s] (type:float)
    vz                        : Z velocity in NED frame [m/s] (type:float)
    afx                       : X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N [m/s/s] (type:float)
    afy                       : Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N [m/s/s] (type:float)
    afz                       : Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N [m/s/s] (type:float)
    yaw                       : yaw setpoint [rad] (type:float)
    yaw_rate                  : yaw rate setpoint [rad/s] (type:float)

    """
    return MAVLink_position_target_global_int_message(time_boot_ms, coordinate_frame, type_mask, lat_int, lon_int, alt, vx, vy, vz, afx, afy, afz, yaw, yaw_rate)

position_target_global_int_send

position_target_global_int_send(time_boot_ms: int, coordinate_frame: int, type_mask: int, lat_int: int, lon_int: int, alt: float, vx: float, vy: float, vz: float, afx: float, afy: float, afz: float, yaw: float, yaw_rate: float, force_mavlink1: bool = False) -> None

Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way.

time_boot_ms : Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency. [ms] (type:uint32_t) coordinate_frame : Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated) (type:uint8_t, values:MAV_FRAME) type_mask : Bitmap to indicate which dimensions should be ignored by the vehicle. (type:uint16_t, values:POSITION_TARGET_TYPEMASK) lat_int : Latitude in WGS84 frame [degE7] (type:int32_t) lon_int : Longitude in WGS84 frame [degE7] (type:int32_t) alt : Altitude (MSL, AGL or relative to home altitude, depending on frame) [m] (type:float) vx : X velocity in NED frame [m/s] (type:float) vy : Y velocity in NED frame [m/s] (type:float) vz : Z velocity in NED frame [m/s] (type:float) afx : X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N [m/s/s] (type:float) afy : Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N [m/s/s] (type:float) afz : Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N [m/s/s] (type:float) yaw : yaw setpoint [rad] (type:float) yaw_rate : yaw rate setpoint [rad/s] (type:float)

Source code in src/mavlink/definition.py
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
def position_target_global_int_send(self, time_boot_ms: int, coordinate_frame: int, type_mask: int, lat_int: int, lon_int: int, alt: float, vx: float, vy: float, vz: float, afx: float, afy: float, afz: float, yaw: float, yaw_rate: float, force_mavlink1: bool = False) -> None:
    """
    Reports the current commanded vehicle position, velocity, and
    acceleration as specified by the autopilot. This should match
    the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the
    vehicle is being controlled this way.

    time_boot_ms              : Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency. [ms] (type:uint32_t)
    coordinate_frame          : Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated) (type:uint8_t, values:MAV_FRAME)
    type_mask                 : Bitmap to indicate which dimensions should be ignored by the vehicle. (type:uint16_t, values:POSITION_TARGET_TYPEMASK)
    lat_int                   : Latitude in WGS84 frame [degE7] (type:int32_t)
    lon_int                   : Longitude in WGS84 frame [degE7] (type:int32_t)
    alt                       : Altitude (MSL, AGL or relative to home altitude, depending on frame) [m] (type:float)
    vx                        : X velocity in NED frame [m/s] (type:float)
    vy                        : Y velocity in NED frame [m/s] (type:float)
    vz                        : Z velocity in NED frame [m/s] (type:float)
    afx                       : X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N [m/s/s] (type:float)
    afy                       : Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N [m/s/s] (type:float)
    afz                       : Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N [m/s/s] (type:float)
    yaw                       : yaw setpoint [rad] (type:float)
    yaw_rate                  : yaw rate setpoint [rad/s] (type:float)

    """
    self.send(self.position_target_global_int_encode(time_boot_ms, coordinate_frame, type_mask, lat_int, lon_int, alt, vx, vy, vz, afx, afy, afz, yaw, yaw_rate), force_mavlink1=force_mavlink1)

raw_rpm_encode

raw_rpm_encode(index: int, frequency: float) -> MAVLink_raw_rpm_message

RPM sensor data message.

index : Index of this RPM sensor (0-indexed) (type:uint8_t) frequency : Indicated rate [rpm] (type:float)

Source code in src/mavlink/definition.py
6179
6180
6181
6182
6183
6184
6185
6186
6187
def raw_rpm_encode(self, index: int, frequency: float) -> MAVLink_raw_rpm_message:
    """
    RPM sensor data message.

    index                     : Index of this RPM sensor (0-indexed) (type:uint8_t)
    frequency                 : Indicated rate [rpm] (type:float)

    """
    return MAVLink_raw_rpm_message(index, frequency)

raw_rpm_send

raw_rpm_send(index: int, frequency: float, force_mavlink1: bool = False) -> None

RPM sensor data message.

index : Index of this RPM sensor (0-indexed) (type:uint8_t) frequency : Indicated rate [rpm] (type:float)

Source code in src/mavlink/definition.py
6189
6190
6191
6192
6193
6194
6195
6196
6197
def raw_rpm_send(self, index: int, frequency: float, force_mavlink1: bool = False) -> None:
    """
    RPM sensor data message.

    index                     : Index of this RPM sensor (0-indexed) (type:uint8_t)
    frequency                 : Indicated rate [rpm] (type:float)

    """
    self.send(self.raw_rpm_encode(index, frequency), force_mavlink1=force_mavlink1)

scaled_pressure_encode

scaled_pressure_encode(time_boot_ms: int, press_abs: float, press_diff: float, temperature: int, temperature_press_diff: int = 0) -> MAVLink_scaled_pressure_message

The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field.

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) press_abs : Absolute pressure [hPa] (type:float) press_diff : Differential pressure 1 [hPa] (type:float) temperature : Absolute pressure temperature [cdegC] (type:int16_t) temperature_press_diff : Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC. [cdegC] (type:int16_t)

Source code in src/mavlink/definition.py
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
def scaled_pressure_encode(self, time_boot_ms: int, press_abs: float, press_diff: float, temperature: int, temperature_press_diff: int = 0) -> MAVLink_scaled_pressure_message:
    """
    The pressure readings for the typical setup of one absolute and
    differential pressure sensor. The units are as specified in
    each field.

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    press_abs                 : Absolute pressure [hPa] (type:float)
    press_diff                : Differential pressure 1 [hPa] (type:float)
    temperature               : Absolute pressure temperature [cdegC] (type:int16_t)
    temperature_press_diff        : Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC. [cdegC] (type:int16_t)

    """
    return MAVLink_scaled_pressure_message(time_boot_ms, press_abs, press_diff, temperature, temperature_press_diff)

scaled_pressure_send

scaled_pressure_send(time_boot_ms: int, press_abs: float, press_diff: float, temperature: int, temperature_press_diff: int = 0, force_mavlink1: bool = False) -> None

The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field.

time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t) press_abs : Absolute pressure [hPa] (type:float) press_diff : Differential pressure 1 [hPa] (type:float) temperature : Absolute pressure temperature [cdegC] (type:int16_t) temperature_press_diff : Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC. [cdegC] (type:int16_t)

Source code in src/mavlink/definition.py
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
def scaled_pressure_send(self, time_boot_ms: int, press_abs: float, press_diff: float, temperature: int, temperature_press_diff: int = 0, force_mavlink1: bool = False) -> None:
    """
    The pressure readings for the typical setup of one absolute and
    differential pressure sensor. The units are as specified in
    each field.

    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)
    press_abs                 : Absolute pressure [hPa] (type:float)
    press_diff                : Differential pressure 1 [hPa] (type:float)
    temperature               : Absolute pressure temperature [cdegC] (type:int16_t)
    temperature_press_diff        : Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC. [cdegC] (type:int16_t)

    """
    self.send(self.scaled_pressure_encode(time_boot_ms, press_abs, press_diff, temperature, temperature_press_diff), force_mavlink1=force_mavlink1)

send

send(mavmsg: MAVLink_message, force_mavlink1: bool = False) -> None

send a MAVLink message

Source code in src/mavlink/definition.py
4895
4896
4897
4898
4899
4900
4901
4902
4903
def send(self, mavmsg: MAVLink_message, force_mavlink1: bool = False) -> None:
    """send a MAVLink message"""
    buf = mavmsg.pack(self, force_mavlink1=force_mavlink1)
    self.file.write(buf)
    self.seq = (self.seq + 1) % 256
    self.total_packets_sent += 1
    self.total_bytes_sent += len(buf)
    if self.send_callback is not None and self.send_callback_args is not None and self.send_callback_kwargs is not None:
        self.send_callback(mavmsg, *self.send_callback_args, **self.send_callback_kwargs)

sys_status_encode

sys_status_encode(onboard_control_sensors_present: int, onboard_control_sensors_enabled: int, onboard_control_sensors_health: int, load: int, voltage_battery: int, current_battery: int, battery_remaining: int, drop_rate_comm: int, errors_comm: int, errors_count1: int, errors_count2: int, errors_count3: int, errors_count4: int, onboard_control_sensors_present_extended: int = 0, onboard_control_sensors_enabled_extended: int = 0, onboard_control_sensors_health_extended: int = 0) -> MAVLink_sys_status_message

Sensor and subsystem status information. Provides a compact representation of sensor/subsystem status and a few other basic statistics.

onboard_control_sensors_present : Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR) onboard_control_sensors_enabled : Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR) onboard_control_sensors_health : Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR) load : Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000 [d%] (type:uint16_t) voltage_battery : Battery voltage, UINT16_MAX: Voltage not sent by autopilot. Value is ambiguous on multi-battery systems. BATTERY_STATUS is a recommended alternative. [mV] (type:uint16_t) current_battery : Battery current, -1: Current not sent by autopilot. Value may overflow/rollover for very high currents (> 327.67A). Value is ambiguous on multi-battery systems. BATTERY_STATUS is a recommended alternative. [cA] (type:int16_t) battery_remaining : Battery energy remaining, -1: Battery remaining energy not sent by autopilot. Value is ambiguous on multi-battery systems. BATTERY_STATUS is a recommended alternative. [%] (type:int8_t) drop_rate_comm : Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV) [c%] (type:uint16_t) errors_comm : Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV) (type:uint16_t) errors_count1 : Autopilot-specific errors (type:uint16_t) errors_count2 : Autopilot-specific errors (type:uint16_t) errors_count3 : Autopilot-specific errors (type:uint16_t) errors_count4 : Autopilot-specific errors (type:uint16_t) onboard_control_sensors_present_extended : Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR_EXTENDED) onboard_control_sensors_enabled_extended : Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR_EXTENDED) onboard_control_sensors_health_extended : Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR_EXTENDED)

Source code in src/mavlink/definition.py
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
def sys_status_encode(self, onboard_control_sensors_present: int, onboard_control_sensors_enabled: int, onboard_control_sensors_health: int, load: int, voltage_battery: int, current_battery: int, battery_remaining: int, drop_rate_comm: int, errors_comm: int, errors_count1: int, errors_count2: int, errors_count3: int, errors_count4: int, onboard_control_sensors_present_extended: int = 0, onboard_control_sensors_enabled_extended: int = 0, onboard_control_sensors_health_extended: int = 0) -> MAVLink_sys_status_message:
    """
    Sensor and subsystem status information. Provides a compact
    representation of sensor/subsystem status and a few other
    basic statistics.

    onboard_control_sensors_present        : Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR)
    onboard_control_sensors_enabled        : Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR)
    onboard_control_sensors_health        : Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR)
    load                      : Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000 [d%] (type:uint16_t)
    voltage_battery           : Battery voltage, UINT16_MAX: Voltage not sent by autopilot. Value is ambiguous on multi-battery systems. BATTERY_STATUS is a recommended alternative. [mV] (type:uint16_t)
    current_battery           : Battery current, -1: Current not sent by autopilot. Value may overflow/rollover for very high currents (> 327.67A). Value is ambiguous on multi-battery systems. BATTERY_STATUS is a recommended alternative. [cA] (type:int16_t)
    battery_remaining         : Battery energy remaining, -1: Battery remaining energy not sent by autopilot. Value is ambiguous on multi-battery systems. BATTERY_STATUS is a recommended alternative. [%] (type:int8_t)
    drop_rate_comm            : Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV) [c%] (type:uint16_t)
    errors_comm               : Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV) (type:uint16_t)
    errors_count1             : Autopilot-specific errors (type:uint16_t)
    errors_count2             : Autopilot-specific errors (type:uint16_t)
    errors_count3             : Autopilot-specific errors (type:uint16_t)
    errors_count4             : Autopilot-specific errors (type:uint16_t)
    onboard_control_sensors_present_extended        : Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR_EXTENDED)
    onboard_control_sensors_enabled_extended        : Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR_EXTENDED)
    onboard_control_sensors_health_extended        : Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR_EXTENDED)

    """
    return MAVLink_sys_status_message(onboard_control_sensors_present, onboard_control_sensors_enabled, onboard_control_sensors_health, load, voltage_battery, current_battery, battery_remaining, drop_rate_comm, errors_comm, errors_count1, errors_count2, errors_count3, errors_count4, onboard_control_sensors_present_extended, onboard_control_sensors_enabled_extended, onboard_control_sensors_health_extended)

sys_status_send

sys_status_send(onboard_control_sensors_present: int, onboard_control_sensors_enabled: int, onboard_control_sensors_health: int, load: int, voltage_battery: int, current_battery: int, battery_remaining: int, drop_rate_comm: int, errors_comm: int, errors_count1: int, errors_count2: int, errors_count3: int, errors_count4: int, onboard_control_sensors_present_extended: int = 0, onboard_control_sensors_enabled_extended: int = 0, onboard_control_sensors_health_extended: int = 0, force_mavlink1: bool = False) -> None

Sensor and subsystem status information. Provides a compact representation of sensor/subsystem status and a few other basic statistics.

onboard_control_sensors_present : Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR) onboard_control_sensors_enabled : Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR) onboard_control_sensors_health : Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR) load : Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000 [d%] (type:uint16_t) voltage_battery : Battery voltage, UINT16_MAX: Voltage not sent by autopilot. Value is ambiguous on multi-battery systems. BATTERY_STATUS is a recommended alternative. [mV] (type:uint16_t) current_battery : Battery current, -1: Current not sent by autopilot. Value may overflow/rollover for very high currents (> 327.67A). Value is ambiguous on multi-battery systems. BATTERY_STATUS is a recommended alternative. [cA] (type:int16_t) battery_remaining : Battery energy remaining, -1: Battery remaining energy not sent by autopilot. Value is ambiguous on multi-battery systems. BATTERY_STATUS is a recommended alternative. [%] (type:int8_t) drop_rate_comm : Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV) [c%] (type:uint16_t) errors_comm : Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV) (type:uint16_t) errors_count1 : Autopilot-specific errors (type:uint16_t) errors_count2 : Autopilot-specific errors (type:uint16_t) errors_count3 : Autopilot-specific errors (type:uint16_t) errors_count4 : Autopilot-specific errors (type:uint16_t) onboard_control_sensors_present_extended : Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR_EXTENDED) onboard_control_sensors_enabled_extended : Bitmap showing which onboard controllers and sensors are enabled: Value of 0: not enabled. Value of 1: enabled. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR_EXTENDED) onboard_control_sensors_health_extended : Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR_EXTENDED)

Source code in src/mavlink/definition.py
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
def sys_status_send(self, onboard_control_sensors_present: int, onboard_control_sensors_enabled: int, onboard_control_sensors_health: int, load: int, voltage_battery: int, current_battery: int, battery_remaining: int, drop_rate_comm: int, errors_comm: int, errors_count1: int, errors_count2: int, errors_count3: int, errors_count4: int, onboard_control_sensors_present_extended: int = 0, onboard_control_sensors_enabled_extended: int = 0, onboard_control_sensors_health_extended: int = 0, force_mavlink1: bool = False) -> None:
    """
    Sensor and subsystem status information. Provides a compact
    representation of sensor/subsystem status and a few other
    basic statistics.

    onboard_control_sensors_present        : Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR)
    onboard_control_sensors_enabled        : Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR)
    onboard_control_sensors_health        : Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR)
    load                      : Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000 [d%] (type:uint16_t)
    voltage_battery           : Battery voltage, UINT16_MAX: Voltage not sent by autopilot. Value is ambiguous on multi-battery systems. BATTERY_STATUS is a recommended alternative. [mV] (type:uint16_t)
    current_battery           : Battery current, -1: Current not sent by autopilot. Value may overflow/rollover for very high currents (> 327.67A). Value is ambiguous on multi-battery systems. BATTERY_STATUS is a recommended alternative. [cA] (type:int16_t)
    battery_remaining         : Battery energy remaining, -1: Battery remaining energy not sent by autopilot. Value is ambiguous on multi-battery systems. BATTERY_STATUS is a recommended alternative. [%] (type:int8_t)
    drop_rate_comm            : Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV) [c%] (type:uint16_t)
    errors_comm               : Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV) (type:uint16_t)
    errors_count1             : Autopilot-specific errors (type:uint16_t)
    errors_count2             : Autopilot-specific errors (type:uint16_t)
    errors_count3             : Autopilot-specific errors (type:uint16_t)
    errors_count4             : Autopilot-specific errors (type:uint16_t)
    onboard_control_sensors_present_extended        : Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR_EXTENDED)
    onboard_control_sensors_enabled_extended        : Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR_EXTENDED)
    onboard_control_sensors_health_extended        : Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy. (type:uint32_t, values:MAV_SYS_STATUS_SENSOR_EXTENDED)

    """
    self.send(self.sys_status_encode(onboard_control_sensors_present, onboard_control_sensors_enabled, onboard_control_sensors_health, load, voltage_battery, current_battery, battery_remaining, drop_rate_comm, errors_comm, errors_count1, errors_count2, errors_count3, errors_count4, onboard_control_sensors_present_extended, onboard_control_sensors_enabled_extended, onboard_control_sensors_health_extended), force_mavlink1=force_mavlink1)

system_time_encode

system_time_encode(time_unix_usec: int, time_boot_ms: int) -> MAVLink_system_time_message

The system time is the time of the sender's master clock. This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network. Components that are using a less reliable time source, such as a battery- backed real time clock, can choose to match their system clock to that of a system that indicates a more recent time. This allows more broadly accurate date stamping of logs, and so on. If precise time synchronization is needed then use TIMESYNC instead.

time_unix_usec : Timestamp (UNIX epoch time). [us] (type:uint64_t) time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t)

Source code in src/mavlink/definition.py
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
def system_time_encode(self, time_unix_usec: int, time_boot_ms: int) -> MAVLink_system_time_message:
    """
    The system time is the time of the sender's master clock.         This
    can be emitted by flight controllers, onboard computers, or
    other components in the MAVLink network.         Components
    that are using a less reliable time source, such as a battery-
    backed real time clock, can choose to match their system clock
    to that of a system that indicates a more recent time.
    This allows more broadly accurate date stamping of logs, and
    so on.         If precise time synchronization is needed then
    use TIMESYNC instead.

    time_unix_usec            : Timestamp (UNIX epoch time). [us] (type:uint64_t)
    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)

    """
    return MAVLink_system_time_message(time_unix_usec, time_boot_ms)

system_time_send

system_time_send(time_unix_usec: int, time_boot_ms: int, force_mavlink1: bool = False) -> None

The system time is the time of the sender's master clock. This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network. Components that are using a less reliable time source, such as a battery- backed real time clock, can choose to match their system clock to that of a system that indicates a more recent time. This allows more broadly accurate date stamping of logs, and so on. If precise time synchronization is needed then use TIMESYNC instead.

time_unix_usec : Timestamp (UNIX epoch time). [us] (type:uint64_t) time_boot_ms : Timestamp (time since system boot). [ms] (type:uint32_t)

Source code in src/mavlink/definition.py
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
def system_time_send(self, time_unix_usec: int, time_boot_ms: int, force_mavlink1: bool = False) -> None:
    """
    The system time is the time of the sender's master clock.         This
    can be emitted by flight controllers, onboard computers, or
    other components in the MAVLink network.         Components
    that are using a less reliable time source, such as a battery-
    backed real time clock, can choose to match their system clock
    to that of a system that indicates a more recent time.
    This allows more broadly accurate date stamping of logs, and
    so on.         If precise time synchronization is needed then
    use TIMESYNC instead.

    time_unix_usec            : Timestamp (UNIX epoch time). [us] (type:uint64_t)
    time_boot_ms              : Timestamp (time since system boot). [ms] (type:uint32_t)

    """
    self.send(self.system_time_encode(time_unix_usec, time_boot_ms), force_mavlink1=force_mavlink1)

timesync_encode

timesync_encode(tc1: int, ts1: int, target_system: int = 0, target_component: int = 0) -> MAVLink_timesync_message

Time synchronization message. The message is used for both timesync requests and responses. The request is sent with ts1=syncing component timestamp and tc1=0, and may be broadcast or targeted to a specific system/component. The response is sent with ts1=syncing component timestamp (mirror back unchanged), and tc1=responding component timestamp, with the target_system and target_component set to ids of the original request. Systems can determine if they are receiving a request or response based on the value of tc. If the response has target_system==target_component==0 the remote system has not been updated to use the component IDs and cannot reliably timesync; the requester may report an error. Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used). The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset. See also: https://mavlink.io/en/services/timesync.html.

tc1 : Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component. [ns] (type:int64_t) ts1 : Time sync timestamp 2. Timestamp of syncing component (mirrored in response). [ns] (type:int64_t) target_system : Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component. (type:uint8_t) target_component : Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component. (type:uint8_t)

Source code in src/mavlink/definition.py
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
def timesync_encode(self, tc1: int, ts1: int, target_system: int = 0, target_component: int = 0) -> MAVLink_timesync_message:
    """
    Time synchronization message.         The message is used for both
    timesync requests and responses.         The request is sent
    with `ts1=syncing component timestamp` and `tc1=0`, and may be
    broadcast or targeted to a specific system/component.
    The response is sent with `ts1=syncing component timestamp`
    (mirror back unchanged), and `tc1=responding component
    timestamp`, with the `target_system` and `target_component`
    set to ids of the original request.         Systems can
    determine if they are receiving a request or response based on
    the value of `tc`.         If the response has
    `target_system==target_component==0` the remote system has not
    been updated to use the component IDs and cannot reliably
    timesync; the requester may report an error.
    Timestamps are UNIX Epoch time or time since system boot in
    nanoseconds (the timestamp format can be inferred by checking
    for the magnitude of the number; generally it doesn't matter
    as only the offset is used).         The message sequence is
    repeated numerous times with results being filtered/averaged
    to estimate the offset.         See also:
    https://mavlink.io/en/services/timesync.html.

    tc1                       : Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component. [ns] (type:int64_t)
    ts1                       : Time sync timestamp 2. Timestamp of syncing component (mirrored in response). [ns] (type:int64_t)
    target_system             : Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component. (type:uint8_t)
    target_component          : Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component. (type:uint8_t)

    """
    return MAVLink_timesync_message(tc1, ts1, target_system, target_component)

timesync_send

timesync_send(tc1: int, ts1: int, target_system: int = 0, target_component: int = 0, force_mavlink1: bool = False) -> None

Time synchronization message. The message is used for both timesync requests and responses. The request is sent with ts1=syncing component timestamp and tc1=0, and may be broadcast or targeted to a specific system/component. The response is sent with ts1=syncing component timestamp (mirror back unchanged), and tc1=responding component timestamp, with the target_system and target_component set to ids of the original request. Systems can determine if they are receiving a request or response based on the value of tc. If the response has target_system==target_component==0 the remote system has not been updated to use the component IDs and cannot reliably timesync; the requester may report an error. Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used). The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset. See also: https://mavlink.io/en/services/timesync.html.

tc1 : Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component. [ns] (type:int64_t) ts1 : Time sync timestamp 2. Timestamp of syncing component (mirrored in response). [ns] (type:int64_t) target_system : Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component. (type:uint8_t) target_component : Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component. (type:uint8_t)

Source code in src/mavlink/definition.py
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
def timesync_send(self, tc1: int, ts1: int, target_system: int = 0, target_component: int = 0, force_mavlink1: bool = False) -> None:
    """
    Time synchronization message.         The message is used for both
    timesync requests and responses.         The request is sent
    with `ts1=syncing component timestamp` and `tc1=0`, and may be
    broadcast or targeted to a specific system/component.
    The response is sent with `ts1=syncing component timestamp`
    (mirror back unchanged), and `tc1=responding component
    timestamp`, with the `target_system` and `target_component`
    set to ids of the original request.         Systems can
    determine if they are receiving a request or response based on
    the value of `tc`.         If the response has
    `target_system==target_component==0` the remote system has not
    been updated to use the component IDs and cannot reliably
    timesync; the requester may report an error.
    Timestamps are UNIX Epoch time or time since system boot in
    nanoseconds (the timestamp format can be inferred by checking
    for the magnitude of the number; generally it doesn't matter
    as only the offset is used).         The message sequence is
    repeated numerous times with results being filtered/averaged
    to estimate the offset.         See also:
    https://mavlink.io/en/services/timesync.html.

    tc1                       : Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component. [ns] (type:int64_t)
    ts1                       : Time sync timestamp 2. Timestamp of syncing component (mirrored in response). [ns] (type:int64_t)
    target_system             : Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component. (type:uint8_t)
    target_component          : Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component. (type:uint8_t)

    """
    self.send(self.timesync_encode(tc1, ts1, target_system, target_component), force_mavlink1=force_mavlink1)

MAVLinkSigning

MAVLinkSigning()

              flowchart TD
              mavlink.definition.MAVLinkSigning[MAVLinkSigning]

              

              click mavlink.definition.MAVLinkSigning href "" "mavlink.definition.MAVLinkSigning"
            

MAVLink signing state class

Source code in src/mavlink/definition.py
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
def __init__(self) -> None:
    self.secret_key: Optional[bytes] = None
    self.timestamp = 0
    self.link_id = 0
    self.sign_outgoing = False
    self.allow_unsigned_callback: Optional[Callable[["MAVLink", int], bool]] = None
    self.stream_timestamps: Dict[Tuple[int, int, int], int] = {}
    self.sig_count = 0
    self.badsig_count = 0
    self.goodsig_count = 0
    self.unsigned_count = 0
    self.reject_count = 0
MAVLink_actuator_output_status_message(time_usec: int, active: int, actuator: Sequence[float])

              flowchart TD
              mavlink.definition.MAVLink_actuator_output_status_message[MAVLink_actuator_output_status_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_actuator_output_status_message
                


              click mavlink.definition.MAVLink_actuator_output_status_message href "" "mavlink.definition.MAVLink_actuator_output_status_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
4155
4156
4157
4158
4159
4160
4161
4162
def __init__(self, time_usec: int, active: int, actuator: Sequence[float]):
    MAVLink_message.__init__(self, MAVLink_actuator_output_status_message.id, MAVLink_actuator_output_status_message.msgname)
    self._fieldnames = MAVLink_actuator_output_status_message.fieldnames
    self._instance_field = MAVLink_actuator_output_status_message.instance_field
    self._instance_offset = MAVLink_actuator_output_status_message.instance_offset
    self.time_usec = time_usec
    self.active = active
    self.actuator = actuator
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_airspeed_message(id: int, airspeed: float, temperature: int, raw_press: float, flags: int)

              flowchart TD
              mavlink.definition.MAVLink_airspeed_message[MAVLink_airspeed_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_airspeed_message
                


              click mavlink.definition.MAVLink_airspeed_message href "" "mavlink.definition.MAVLink_airspeed_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Airspeed information from a sensor.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
def __init__(self, id: int, airspeed: float, temperature: int, raw_press: float, flags: int):
    MAVLink_message.__init__(self, MAVLink_airspeed_message.id, MAVLink_airspeed_message.msgname)
    self._fieldnames = MAVLink_airspeed_message.fieldnames
    self._instance_field = MAVLink_airspeed_message.instance_field
    self._instance_offset = MAVLink_airspeed_message.instance_offset
    self.id = id
    self.airspeed = airspeed
    self.temperature = temperature
    self.raw_press = raw_press
    self.flags = flags
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_altitude_message(time_usec: int, altitude_monotonic: float, altitude_amsl: float, altitude_local: float, altitude_relative: float, altitude_terrain: float, bottom_clearance: float)

              flowchart TD
              mavlink.definition.MAVLink_altitude_message[MAVLink_altitude_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_altitude_message
                


              click mavlink.definition.MAVLink_altitude_message href "" "mavlink.definition.MAVLink_altitude_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

The current system altitude.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
def __init__(self, time_usec: int, altitude_monotonic: float, altitude_amsl: float, altitude_local: float, altitude_relative: float, altitude_terrain: float, bottom_clearance: float):
    MAVLink_message.__init__(self, MAVLink_altitude_message.id, MAVLink_altitude_message.msgname)
    self._fieldnames = MAVLink_altitude_message.fieldnames
    self._instance_field = MAVLink_altitude_message.instance_field
    self._instance_offset = MAVLink_altitude_message.instance_offset
    self.time_usec = time_usec
    self.altitude_monotonic = altitude_monotonic
    self.altitude_amsl = altitude_amsl
    self.altitude_local = altitude_local
    self.altitude_relative = altitude_relative
    self.altitude_terrain = altitude_terrain
    self.bottom_clearance = bottom_clearance
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_angle_of_attack_message(time_boot_ms: int, aoa: float)

              flowchart TD
              mavlink.definition.MAVLink_angle_of_attack_message[MAVLink_angle_of_attack_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_angle_of_attack_message
                


              click mavlink.definition.MAVLink_angle_of_attack_message href "" "mavlink.definition.MAVLink_angle_of_attack_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Angle of Attack

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
3799
3800
3801
3802
3803
3804
3805
def __init__(self, time_boot_ms: int, aoa: float):
    MAVLink_message.__init__(self, MAVLink_angle_of_attack_message.id, MAVLink_angle_of_attack_message.msgname)
    self._fieldnames = MAVLink_angle_of_attack_message.fieldnames
    self._instance_field = MAVLink_angle_of_attack_message.instance_field
    self._instance_offset = MAVLink_angle_of_attack_message.instance_offset
    self.time_boot_ms = time_boot_ms
    self.aoa = aoa
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_angle_of_slideslip_message(time_boot_ms: int, aos: float)

              flowchart TD
              mavlink.definition.MAVLink_angle_of_slideslip_message[MAVLink_angle_of_slideslip_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_angle_of_slideslip_message
                


              click mavlink.definition.MAVLink_angle_of_slideslip_message href "" "mavlink.definition.MAVLink_angle_of_slideslip_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Angle of Slideslip

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
3838
3839
3840
3841
3842
3843
3844
def __init__(self, time_boot_ms: int, aos: float):
    MAVLink_message.__init__(self, MAVLink_angle_of_slideslip_message.id, MAVLink_angle_of_slideslip_message.msgname)
    self._fieldnames = MAVLink_angle_of_slideslip_message.fieldnames
    self._instance_field = MAVLink_angle_of_slideslip_message.instance_field
    self._instance_offset = MAVLink_angle_of_slideslip_message.instance_offset
    self.time_boot_ms = time_boot_ms
    self.aos = aos
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_attitude_message(time_boot_ms: int, roll: float, pitch: float, yaw: float, rollspeed: float, pitchspeed: float, yawspeed: float)

              flowchart TD
              mavlink.definition.MAVLink_attitude_message[MAVLink_attitude_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_attitude_message
                


              click mavlink.definition.MAVLink_attitude_message href "" "mavlink.definition.MAVLink_attitude_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic).

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
def __init__(self, time_boot_ms: int, roll: float, pitch: float, yaw: float, rollspeed: float, pitchspeed: float, yawspeed: float):
    MAVLink_message.__init__(self, MAVLink_attitude_message.id, MAVLink_attitude_message.msgname)
    self._fieldnames = MAVLink_attitude_message.fieldnames
    self._instance_field = MAVLink_attitude_message.instance_field
    self._instance_offset = MAVLink_attitude_message.instance_offset
    self.time_boot_ms = time_boot_ms
    self.roll = roll
    self.pitch = pitch
    self.yaw = yaw
    self.rollspeed = rollspeed
    self.pitchspeed = pitchspeed
    self.yawspeed = yawspeed
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_attitude_quaternion_message(time_boot_ms: int, q1: float, q2: float, q3: float, q4: float, rollspeed: float, pitchspeed: float, yawspeed: float, repr_offset_q: Sequence[float] = (0, 0, 0, 0))

              flowchart TD
              mavlink.definition.MAVLink_attitude_quaternion_message[MAVLink_attitude_quaternion_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_attitude_quaternion_message
                


              click mavlink.definition.MAVLink_attitude_quaternion_message href "" "mavlink.definition.MAVLink_attitude_quaternion_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0).

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
def __init__(self, time_boot_ms: int, q1: float, q2: float, q3: float, q4: float, rollspeed: float, pitchspeed: float, yawspeed: float, repr_offset_q: Sequence[float] = (0, 0, 0, 0)):
    MAVLink_message.__init__(self, MAVLink_attitude_quaternion_message.id, MAVLink_attitude_quaternion_message.msgname)
    self._fieldnames = MAVLink_attitude_quaternion_message.fieldnames
    self._instance_field = MAVLink_attitude_quaternion_message.instance_field
    self._instance_offset = MAVLink_attitude_quaternion_message.instance_offset
    self.time_boot_ms = time_boot_ms
    self.q1 = q1
    self.q2 = q2
    self.q3 = q3
    self.q4 = q4
    self.rollspeed = rollspeed
    self.pitchspeed = pitchspeed
    self.yawspeed = yawspeed
    self.repr_offset_q = repr_offset_q
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_autopilot_version_message(capabilities: int, flight_sw_version: int, middleware_sw_version: int, os_sw_version: int, board_version: int, flight_custom_version: Sequence[int], middleware_custom_version: Sequence[int], os_custom_version: Sequence[int], vendor_id: int, product_id: int, uid: int, uid2: Sequence[int] = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))

              flowchart TD
              mavlink.definition.MAVLink_autopilot_version_message[MAVLink_autopilot_version_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_autopilot_version_message
                


              click mavlink.definition.MAVLink_autopilot_version_message href "" "mavlink.definition.MAVLink_autopilot_version_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
def __init__(self, capabilities: int, flight_sw_version: int, middleware_sw_version: int, os_sw_version: int, board_version: int, flight_custom_version: Sequence[int], middleware_custom_version: Sequence[int], os_custom_version: Sequence[int], vendor_id: int, product_id: int, uid: int, uid2: Sequence[int] = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)):
    MAVLink_message.__init__(self, MAVLink_autopilot_version_message.id, MAVLink_autopilot_version_message.msgname)
    self._fieldnames = MAVLink_autopilot_version_message.fieldnames
    self._instance_field = MAVLink_autopilot_version_message.instance_field
    self._instance_offset = MAVLink_autopilot_version_message.instance_offset
    self.capabilities = capabilities
    self.flight_sw_version = flight_sw_version
    self.middleware_sw_version = middleware_sw_version
    self.os_sw_version = os_sw_version
    self.board_version = board_version
    self.flight_custom_version = flight_custom_version
    self.middleware_custom_version = middleware_custom_version
    self.os_custom_version = os_custom_version
    self.vendor_id = vendor_id
    self.product_id = product_id
    self.uid = uid
    self.uid2 = uid2
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_bad_data(data: bytes, reason: str)

              flowchart TD
              mavlink.definition.MAVLink_bad_data[MAVLink_bad_data]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_bad_data
                


              click mavlink.definition.MAVLink_bad_data href "" "mavlink.definition.MAVLink_bad_data"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

a piece of bad data in a mavlink stream

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • __str__ –

    Override the str function from MAVLink_messages because non-printable characters are common in to be the reason for this message to exist.

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
4797
4798
4799
4800
4801
4802
4803
def __init__(self, data: bytes, reason: str) -> None:
    MAVLink_message.__init__(self, MAVLINK_MSG_ID_BAD_DATA, "BAD_DATA")
    self._fieldnames = ["data", "reason"]
    self.data = data
    self.reason = reason
    self._msgbuf = bytearray(data)
    self._instance_field = None
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
__str__() -> str

Override the str function from MAVLink_messages because non-printable characters are common in to be the reason for this message to exist.

Source code in src/mavlink/definition.py
4805
4806
4807
4808
def __str__(self) -> str:
    """Override the __str__ function from MAVLink_messages because non-printable characters are common in to be the reason for this message to exist."""
    hexstr = ["{:x}".format(i) for i in self.data]
    return "%s {%s, data:%s}" % (self._type, self.reason, hexstr)
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_battery_status_message(id: int, battery_function: int, type: int, temperature: int, voltages: Sequence[int], current_battery: int, current_consumed: int, energy_consumed: int, battery_remaining: int, time_remaining: int = 0, charge_state: int = 0, voltages_ext: Sequence[int] = (0, 0, 0, 0), mode: int = 0, fault_bitmask: int = 0)

              flowchart TD
              mavlink.definition.MAVLink_battery_status_message[MAVLink_battery_status_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_battery_status_message
                


              click mavlink.definition.MAVLink_battery_status_message href "" "mavlink.definition.MAVLink_battery_status_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
def __init__(self, id: int, battery_function: int, type: int, temperature: int, voltages: Sequence[int], current_battery: int, current_consumed: int, energy_consumed: int, battery_remaining: int, time_remaining: int = 0, charge_state: int = 0, voltages_ext: Sequence[int] = (0, 0, 0, 0), mode: int = 0, fault_bitmask: int = 0):
    MAVLink_message.__init__(self, MAVLink_battery_status_message.id, MAVLink_battery_status_message.msgname)
    self._fieldnames = MAVLink_battery_status_message.fieldnames
    self._instance_field = MAVLink_battery_status_message.instance_field
    self._instance_offset = MAVLink_battery_status_message.instance_offset
    self.id = id
    self.battery_function = battery_function
    self.type = type
    self.temperature = temperature
    self.voltages = voltages
    self.current_battery = current_battery
    self.current_consumed = current_consumed
    self.energy_consumed = energy_consumed
    self.battery_remaining = battery_remaining
    self.time_remaining = time_remaining
    self.charge_state = charge_state
    self.voltages_ext = voltages_ext
    self.mode = mode
    self.fault_bitmask = fault_bitmask
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_button_change_message(time_boot_ms: int, last_change_ms: int, state: int)

              flowchart TD
              mavlink.definition.MAVLink_button_change_message[MAVLink_button_change_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_button_change_message
                


              click mavlink.definition.MAVLink_button_change_message href "" "mavlink.definition.MAVLink_button_change_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Report button state change.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
4075
4076
4077
4078
4079
4080
4081
4082
def __init__(self, time_boot_ms: int, last_change_ms: int, state: int):
    MAVLink_message.__init__(self, MAVLink_button_change_message.id, MAVLink_button_change_message.msgname)
    self._fieldnames = MAVLink_button_change_message.fieldnames
    self._instance_field = MAVLink_button_change_message.instance_field
    self._instance_offset = MAVLink_button_change_message.instance_offset
    self.time_boot_ms = time_boot_ms
    self.last_change_ms = last_change_ms
    self.state = state
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_can_filter_modify_message(target_system: int, target_component: int, bus: int, operation: int, num_ids: int, ids: Sequence[int])

              flowchart TD
              mavlink.definition.MAVLink_can_filter_modify_message[MAVLink_can_filter_modify_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_can_filter_modify_message
                


              click mavlink.definition.MAVLink_can_filter_modify_message href "" "mavlink.definition.MAVLink_can_filter_modify_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
def __init__(self, target_system: int, target_component: int, bus: int, operation: int, num_ids: int, ids: Sequence[int]):
    MAVLink_message.__init__(self, MAVLink_can_filter_modify_message.id, MAVLink_can_filter_modify_message.msgname)
    self._fieldnames = MAVLink_can_filter_modify_message.fieldnames
    self._instance_field = MAVLink_can_filter_modify_message.instance_field
    self._instance_offset = MAVLink_can_filter_modify_message.instance_offset
    self.target_system = target_system
    self.target_component = target_component
    self.bus = bus
    self.operation = operation
    self.num_ids = num_ids
    self.ids = ids
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_can_frame_message(target_system: int, target_component: int, bus: int, len: int, id: int, data: Sequence[int])

              flowchart TD
              mavlink.definition.MAVLink_can_frame_message[MAVLink_can_frame_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_can_frame_message
                


              click mavlink.definition.MAVLink_can_frame_message href "" "mavlink.definition.MAVLink_can_frame_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
def __init__(self, target_system: int, target_component: int, bus: int, len: int, id: int, data: Sequence[int]):
    MAVLink_message.__init__(self, MAVLink_can_frame_message.id, MAVLink_can_frame_message.msgname)
    self._fieldnames = MAVLink_can_frame_message.fieldnames
    self._instance_field = MAVLink_can_frame_message.instance_field
    self._instance_offset = MAVLink_can_frame_message.instance_offset
    self.target_system = target_system
    self.target_component = target_component
    self.bus = bus
    self.len = len
    self.id = id
    self.data = data
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_canfd_frame_message(target_system: int, target_component: int, bus: int, len: int, id: int, data: Sequence[int])

              flowchart TD
              mavlink.definition.MAVLink_canfd_frame_message[MAVLink_canfd_frame_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_canfd_frame_message
                


              click mavlink.definition.MAVLink_canfd_frame_message href "" "mavlink.definition.MAVLink_canfd_frame_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
def __init__(self, target_system: int, target_component: int, bus: int, len: int, id: int, data: Sequence[int]):
    MAVLink_message.__init__(self, MAVLink_canfd_frame_message.id, MAVLink_canfd_frame_message.msgname)
    self._fieldnames = MAVLink_canfd_frame_message.fieldnames
    self._instance_field = MAVLink_canfd_frame_message.instance_field
    self._instance_offset = MAVLink_canfd_frame_message.instance_offset
    self.target_system = target_system
    self.target_component = target_component
    self.bus = bus
    self.len = len
    self.id = id
    self.data = data
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_command_ack_message(command: int, result: int, progress: int = 0, result_param2: int = 0, target_system: int = 0, target_component: int = 0)

              flowchart TD
              mavlink.definition.MAVLink_command_ack_message[MAVLink_command_ack_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_command_ack_message
                


              click mavlink.definition.MAVLink_command_ack_message href "" "mavlink.definition.MAVLink_command_ack_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at https://mavlink.io/en/services/command.html

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
def __init__(self, command: int, result: int, progress: int = 0, result_param2: int = 0, target_system: int = 0, target_component: int = 0):
    MAVLink_message.__init__(self, MAVLink_command_ack_message.id, MAVLink_command_ack_message.msgname)
    self._fieldnames = MAVLink_command_ack_message.fieldnames
    self._instance_field = MAVLink_command_ack_message.instance_field
    self._instance_offset = MAVLink_command_ack_message.instance_offset
    self.command = command
    self.result = result
    self.progress = progress
    self.result_param2 = result_param2
    self.target_system = target_system
    self.target_component = target_component
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_command_int_message(target_system: int, target_component: int, frame: int, command: int, current: int, autocontinue: int, param1: float, param2: float, param3: float, param4: float, x: int, y: int, z: float)

              flowchart TD
              mavlink.definition.MAVLink_command_int_message[MAVLink_command_int_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_command_int_message
                


              click mavlink.definition.MAVLink_command_int_message href "" "mavlink.definition.MAVLink_command_int_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at https://mavlink.io/en/services/command.html

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
def __init__(self, target_system: int, target_component: int, frame: int, command: int, current: int, autocontinue: int, param1: float, param2: float, param3: float, param4: float, x: int, y: int, z: float):
    MAVLink_message.__init__(self, MAVLink_command_int_message.id, MAVLink_command_int_message.msgname)
    self._fieldnames = MAVLink_command_int_message.fieldnames
    self._instance_field = MAVLink_command_int_message.instance_field
    self._instance_offset = MAVLink_command_int_message.instance_offset
    self.target_system = target_system
    self.target_component = target_component
    self.frame = frame
    self.command = command
    self.current = current
    self.autocontinue = autocontinue
    self.param1 = param1
    self.param2 = param2
    self.param3 = param3
    self.param4 = param4
    self.x = x
    self.y = y
    self.z = z
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_command_long_message(target_system: int, target_component: int, command: int, confirmation: int, param1: float, param2: float, param3: float, param4: float, param5: float, param6: float, param7: float)

              flowchart TD
              mavlink.definition.MAVLink_command_long_message[MAVLink_command_long_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_command_long_message
                


              click mavlink.definition.MAVLink_command_long_message href "" "mavlink.definition.MAVLink_command_long_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at https://mavlink.io/en/services/command.html

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
def __init__(self, target_system: int, target_component: int, command: int, confirmation: int, param1: float, param2: float, param3: float, param4: float, param5: float, param6: float, param7: float):
    MAVLink_message.__init__(self, MAVLink_command_long_message.id, MAVLink_command_long_message.msgname)
    self._fieldnames = MAVLink_command_long_message.fieldnames
    self._instance_field = MAVLink_command_long_message.instance_field
    self._instance_offset = MAVLink_command_long_message.instance_offset
    self.target_system = target_system
    self.target_component = target_component
    self.command = command
    self.confirmation = confirmation
    self.param1 = param1
    self.param2 = param2
    self.param3 = param3
    self.param4 = param4
    self.param5 = param5
    self.param6 = param6
    self.param7 = param7
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_control_system_state_message(time_usec: int, x_acc: float, y_acc: float, z_acc: float, x_vel: float, y_vel: float, z_vel: float, x_pos: float, y_pos: float, z_pos: float, airspeed: float, vel_variance: Sequence[float], pos_variance: Sequence[float], q: Sequence[float], roll_rate: float, pitch_rate: float, yaw_rate: float)

              flowchart TD
              mavlink.definition.MAVLink_control_system_state_message[MAVLink_control_system_state_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_control_system_state_message
                


              click mavlink.definition.MAVLink_control_system_state_message href "" "mavlink.definition.MAVLink_control_system_state_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

The smoothed, monotonic system state used to feed the control loops of the system.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
def __init__(self, time_usec: int, x_acc: float, y_acc: float, z_acc: float, x_vel: float, y_vel: float, z_vel: float, x_pos: float, y_pos: float, z_pos: float, airspeed: float, vel_variance: Sequence[float], pos_variance: Sequence[float], q: Sequence[float], roll_rate: float, pitch_rate: float, yaw_rate: float):
    MAVLink_message.__init__(self, MAVLink_control_system_state_message.id, MAVLink_control_system_state_message.msgname)
    self._fieldnames = MAVLink_control_system_state_message.fieldnames
    self._instance_field = MAVLink_control_system_state_message.instance_field
    self._instance_offset = MAVLink_control_system_state_message.instance_offset
    self.time_usec = time_usec
    self.x_acc = x_acc
    self.y_acc = y_acc
    self.z_acc = z_acc
    self.x_vel = x_vel
    self.y_vel = y_vel
    self.z_vel = z_vel
    self.x_pos = x_pos
    self.y_pos = y_pos
    self.z_pos = z_pos
    self.airspeed = airspeed
    self.vel_variance = vel_variance
    self.pos_variance = pos_variance
    self.q = q
    self.roll_rate = roll_rate
    self.pitch_rate = pitch_rate
    self.yaw_rate = yaw_rate
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_empennage_command_message(time_boot_ms: int, elevator: float, rudder: float, elevator_trim: float)

              flowchart TD
              mavlink.definition.MAVLink_empennage_command_message[MAVLink_empennage_command_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_empennage_command_message
                


              click mavlink.definition.MAVLink_empennage_command_message href "" "mavlink.definition.MAVLink_empennage_command_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Command to the empennage.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
3719
3720
3721
3722
3723
3724
3725
3726
3727
def __init__(self, time_boot_ms: int, elevator: float, rudder: float, elevator_trim: float):
    MAVLink_message.__init__(self, MAVLink_empennage_command_message.id, MAVLink_empennage_command_message.msgname)
    self._fieldnames = MAVLink_empennage_command_message.fieldnames
    self._instance_field = MAVLink_empennage_command_message.instance_field
    self._instance_offset = MAVLink_empennage_command_message.instance_offset
    self.time_boot_ms = time_boot_ms
    self.elevator = elevator
    self.rudder = rudder
    self.elevator_trim = elevator_trim
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_empennage_status_message(time_boot_ms: int, elevator: float, rudder: float)

              flowchart TD
              mavlink.definition.MAVLink_empennage_status_message[MAVLink_empennage_status_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_empennage_status_message
                


              click mavlink.definition.MAVLink_empennage_status_message href "" "mavlink.definition.MAVLink_empennage_status_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Output status of the empennage.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
3679
3680
3681
3682
3683
3684
3685
3686
def __init__(self, time_boot_ms: int, elevator: float, rudder: float):
    MAVLink_message.__init__(self, MAVLink_empennage_status_message.id, MAVLink_empennage_status_message.msgname)
    self._fieldnames = MAVLink_empennage_status_message.fieldnames
    self._instance_field = MAVLink_empennage_status_message.instance_field
    self._instance_offset = MAVLink_empennage_status_message.instance_offset
    self.time_boot_ms = time_boot_ms
    self.elevator = elevator
    self.rudder = rudder
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_flight_information_message(time_boot_ms: int, arming_time_utc: int, takeoff_time_utc: int, flight_uuid: int, landing_time: int = 0)

              flowchart TD
              mavlink.definition.MAVLink_flight_information_message[MAVLink_flight_information_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_flight_information_message
                


              click mavlink.definition.MAVLink_flight_information_message href "" "mavlink.definition.MAVLink_flight_information_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Flight information. This includes time since boot for arm, takeoff, and land, and a flight number. Takeoff and landing values reset to zero on arm. This can be requested using MAV_CMD_REQUEST_MESSAGE. Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
def __init__(self, time_boot_ms: int, arming_time_utc: int, takeoff_time_utc: int, flight_uuid: int, landing_time: int = 0):
    MAVLink_message.__init__(self, MAVLink_flight_information_message.id, MAVLink_flight_information_message.msgname)
    self._fieldnames = MAVLink_flight_information_message.fieldnames
    self._instance_field = MAVLink_flight_information_message.instance_field
    self._instance_offset = MAVLink_flight_information_message.instance_offset
    self.time_boot_ms = time_boot_ms
    self.arming_time_utc = arming_time_utc
    self.takeoff_time_utc = takeoff_time_utc
    self.flight_uuid = flight_uuid
    self.landing_time = landing_time
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_global_position_int_message(time_boot_ms: int, lat: int, lon: int, alt: int, relative_alt: int, vx: int, vy: int, vz: int, hdg: int)

              flowchart TD
              mavlink.definition.MAVLink_global_position_int_message[MAVLink_global_position_int_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_global_position_int_message
                


              click mavlink.definition.MAVLink_global_position_int_message href "" "mavlink.definition.MAVLink_global_position_int_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It is designed as scaled integer message since the resolution of float is not sufficient.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
def __init__(self, time_boot_ms: int, lat: int, lon: int, alt: int, relative_alt: int, vx: int, vy: int, vz: int, hdg: int):
    MAVLink_message.__init__(self, MAVLink_global_position_int_message.id, MAVLink_global_position_int_message.msgname)
    self._fieldnames = MAVLink_global_position_int_message.fieldnames
    self._instance_field = MAVLink_global_position_int_message.instance_field
    self._instance_offset = MAVLink_global_position_int_message.instance_offset
    self.time_boot_ms = time_boot_ms
    self.lat = lat
    self.lon = lon
    self.alt = alt
    self.relative_alt = relative_alt
    self.vx = vx
    self.vy = vy
    self.vz = vz
    self.hdg = hdg
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_gps_raw_int_message(time_usec: int, fix_type: int, lat: int, lon: int, alt: int, eph: int, epv: int, vel: int, cog: int, satellites_visible: int, alt_ellipsoid: int = 0, h_acc: int = 0, v_acc: int = 0, vel_acc: int = 0, hdg_acc: int = 0, yaw: int = 0)

              flowchart TD
              mavlink.definition.MAVLink_gps_raw_int_message[MAVLink_gps_raw_int_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_gps_raw_int_message
                


              click mavlink.definition.MAVLink_gps_raw_int_message href "" "mavlink.definition.MAVLink_gps_raw_int_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

The global position, as returned by the Global Positioning System (GPS). This is NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
def __init__(self, time_usec: int, fix_type: int, lat: int, lon: int, alt: int, eph: int, epv: int, vel: int, cog: int, satellites_visible: int, alt_ellipsoid: int = 0, h_acc: int = 0, v_acc: int = 0, vel_acc: int = 0, hdg_acc: int = 0, yaw: int = 0):
    MAVLink_message.__init__(self, MAVLink_gps_raw_int_message.id, MAVLink_gps_raw_int_message.msgname)
    self._fieldnames = MAVLink_gps_raw_int_message.fieldnames
    self._instance_field = MAVLink_gps_raw_int_message.instance_field
    self._instance_offset = MAVLink_gps_raw_int_message.instance_offset
    self.time_usec = time_usec
    self.fix_type = fix_type
    self.lat = lat
    self.lon = lon
    self.alt = alt
    self.eph = eph
    self.epv = epv
    self.vel = vel
    self.cog = cog
    self.satellites_visible = satellites_visible
    self.alt_ellipsoid = alt_ellipsoid
    self.h_acc = h_acc
    self.v_acc = v_acc
    self.vel_acc = vel_acc
    self.hdg_acc = hdg_acc
    self.yaw = yaw
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_gps_rtk_message(time_last_baseline_ms: int, rtk_receiver_id: int, wn: int, tow: int, rtk_health: int, rtk_rate: int, nsats: int, baseline_coords_type: int, baseline_a_mm: int, baseline_b_mm: int, baseline_c_mm: int, accuracy: int, iar_num_hypotheses: int)

              flowchart TD
              mavlink.definition.MAVLink_gps_rtk_message[MAVLink_gps_rtk_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_gps_rtk_message
                


              click mavlink.definition.MAVLink_gps_rtk_message href "" "mavlink.definition.MAVLink_gps_rtk_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
def __init__(self, time_last_baseline_ms: int, rtk_receiver_id: int, wn: int, tow: int, rtk_health: int, rtk_rate: int, nsats: int, baseline_coords_type: int, baseline_a_mm: int, baseline_b_mm: int, baseline_c_mm: int, accuracy: int, iar_num_hypotheses: int):
    MAVLink_message.__init__(self, MAVLink_gps_rtk_message.id, MAVLink_gps_rtk_message.msgname)
    self._fieldnames = MAVLink_gps_rtk_message.fieldnames
    self._instance_field = MAVLink_gps_rtk_message.instance_field
    self._instance_offset = MAVLink_gps_rtk_message.instance_offset
    self.time_last_baseline_ms = time_last_baseline_ms
    self.rtk_receiver_id = rtk_receiver_id
    self.wn = wn
    self.tow = tow
    self.rtk_health = rtk_health
    self.rtk_rate = rtk_rate
    self.nsats = nsats
    self.baseline_coords_type = baseline_coords_type
    self.baseline_a_mm = baseline_a_mm
    self.baseline_b_mm = baseline_b_mm
    self.baseline_c_mm = baseline_c_mm
    self.accuracy = accuracy
    self.iar_num_hypotheses = iar_num_hypotheses
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_gps_status_message(satellites_visible: int, satellite_prn: Sequence[int], satellite_used: Sequence[int], satellite_elevation: Sequence[int], satellite_azimuth: Sequence[int], satellite_snr: Sequence[int])

              flowchart TD
              mavlink.definition.MAVLink_gps_status_message[MAVLink_gps_status_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_gps_status_message
                


              click mavlink.definition.MAVLink_gps_status_message href "" "mavlink.definition.MAVLink_gps_status_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
def __init__(self, satellites_visible: int, satellite_prn: Sequence[int], satellite_used: Sequence[int], satellite_elevation: Sequence[int], satellite_azimuth: Sequence[int], satellite_snr: Sequence[int]):
    MAVLink_message.__init__(self, MAVLink_gps_status_message.id, MAVLink_gps_status_message.msgname)
    self._fieldnames = MAVLink_gps_status_message.fieldnames
    self._instance_field = MAVLink_gps_status_message.instance_field
    self._instance_offset = MAVLink_gps_status_message.instance_offset
    self.satellites_visible = satellites_visible
    self.satellite_prn = satellite_prn
    self.satellite_used = satellite_used
    self.satellite_elevation = satellite_elevation
    self.satellite_azimuth = satellite_azimuth
    self.satellite_snr = satellite_snr
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_header(msgId: int, incompat_flags: int = 0, compat_flags: int = 0, mlen: int = 0, seq: int = 0, srcSystem: int = 0, srcComponent: int = 0)

              flowchart TD
              mavlink.definition.MAVLink_header[MAVLink_header]

              

              click mavlink.definition.MAVLink_header href "" "mavlink.definition.MAVLink_header"
            

MAVLink message header

Source code in src/mavlink/definition.py
109
110
111
112
113
114
115
116
def __init__(self, msgId: int, incompat_flags: int = 0, compat_flags: int = 0, mlen: int = 0, seq: int = 0, srcSystem: int = 0, srcComponent: int = 0) -> None:
    self.mlen = mlen
    self.seq = seq
    self.srcSystem = srcSystem
    self.srcComponent = srcComponent
    self.msgId = msgId
    self.incompat_flags = incompat_flags
    self.compat_flags = compat_flags
MAVLink_heartbeat_message(type: int, autopilot: int, base_mode: int, custom_mode: int, system_status: int, mavlink_version: int)

              flowchart TD
              mavlink.definition.MAVLink_heartbeat_message[MAVLink_heartbeat_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_heartbeat_message
                


              click mavlink.definition.MAVLink_heartbeat_message href "" "mavlink.definition.MAVLink_heartbeat_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at https://mavlink.io/en/services/heartbeat.html

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
def __init__(self, type: int, autopilot: int, base_mode: int, custom_mode: int, system_status: int, mavlink_version: int):
    MAVLink_message.__init__(self, MAVLink_heartbeat_message.id, MAVLink_heartbeat_message.msgname)
    self._fieldnames = MAVLink_heartbeat_message.fieldnames
    self._instance_field = MAVLink_heartbeat_message.instance_field
    self._instance_offset = MAVLink_heartbeat_message.instance_offset
    self.type = type
    self.autopilot = autopilot
    self.base_mode = base_mode
    self.custom_mode = custom_mode
    self.system_status = system_status
    self.mavlink_version = mavlink_version
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_hygrometer_sensor_message(id: int, temperature: int, humidity: int)

              flowchart TD
              mavlink.definition.MAVLink_hygrometer_sensor_message[MAVLink_hygrometer_sensor_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_hygrometer_sensor_message
                


              click mavlink.definition.MAVLink_hygrometer_sensor_message href "" "mavlink.definition.MAVLink_hygrometer_sensor_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Temperature and humidity from hygrometer.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
4195
4196
4197
4198
4199
4200
4201
4202
def __init__(self, id: int, temperature: int, humidity: int):
    MAVLink_message.__init__(self, MAVLink_hygrometer_sensor_message.id, MAVLink_hygrometer_sensor_message.msgname)
    self._fieldnames = MAVLink_hygrometer_sensor_message.fieldnames
    self._instance_field = MAVLink_hygrometer_sensor_message.instance_field
    self._instance_offset = MAVLink_hygrometer_sensor_message.instance_offset
    self.id = id
    self.temperature = temperature
    self.humidity = humidity
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_imu_message(time_boot_ms: int, xacc: float, yacc: float, zacc: float, xgyro: float, ygyro: float, zgyro: float)

              flowchart TD
              mavlink.definition.MAVLink_imu_message[MAVLink_imu_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_imu_message
                


              click mavlink.definition.MAVLink_imu_message href "" "mavlink.definition.MAVLink_imu_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
def __init__(self, time_boot_ms: int, xacc: float, yacc: float, zacc: float, xgyro: float, ygyro: float, zgyro: float):
    MAVLink_message.__init__(self, MAVLink_imu_message.id, MAVLink_imu_message.msgname)
    self._fieldnames = MAVLink_imu_message.fieldnames
    self._instance_field = MAVLink_imu_message.instance_field
    self._instance_offset = MAVLink_imu_message.instance_offset
    self.time_boot_ms = time_boot_ms
    self.xacc = xacc
    self.yacc = yacc
    self.zacc = zacc
    self.xgyro = xgyro
    self.ygyro = ygyro
    self.zgyro = zgyro
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_local_position_ned_system_global_offset_message(time_boot_ms: int, x: float, y: float, z: float, roll: float, pitch: float, yaw: float)

              flowchart TD
              mavlink.definition.MAVLink_local_position_ned_system_global_offset_message[MAVLink_local_position_ned_system_global_offset_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_local_position_ned_system_global_offset_message
                


              click mavlink.definition.MAVLink_local_position_ned_system_global_offset_message href "" "mavlink.definition.MAVLink_local_position_ned_system_global_offset_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
def __init__(self, time_boot_ms: int, x: float, y: float, z: float, roll: float, pitch: float, yaw: float):
    MAVLink_message.__init__(self, MAVLink_local_position_ned_system_global_offset_message.id, MAVLink_local_position_ned_system_global_offset_message.msgname)
    self._fieldnames = MAVLink_local_position_ned_system_global_offset_message.fieldnames
    self._instance_field = MAVLink_local_position_ned_system_global_offset_message.instance_field
    self._instance_offset = MAVLink_local_position_ned_system_global_offset_message.instance_offset
    self.time_boot_ms = time_boot_ms
    self.x = x
    self.y = y
    self.z = z
    self.roll = roll
    self.pitch = pitch
    self.yaw = yaw
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_mag_cal_report_message(compass_id: int, cal_mask: int, cal_status: int, autosaved: int, fitness: float, ofs_x: float, ofs_y: float, ofs_z: float, diag_x: float, diag_y: float, diag_z: float, offdiag_x: float, offdiag_y: float, offdiag_z: float, orientation_confidence: float = 0, old_orientation: int = 0, new_orientation: int = 0, scale_factor: float = 0)

              flowchart TD
              mavlink.definition.MAVLink_mag_cal_report_message[MAVLink_mag_cal_report_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_mag_cal_report_message
                


              click mavlink.definition.MAVLink_mag_cal_report_message href "" "mavlink.definition.MAVLink_mag_cal_report_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Reports results of completed compass calibration. Sent until MAG_CAL_ACK received.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
def __init__(self, compass_id: int, cal_mask: int, cal_status: int, autosaved: int, fitness: float, ofs_x: float, ofs_y: float, ofs_z: float, diag_x: float, diag_y: float, diag_z: float, offdiag_x: float, offdiag_y: float, offdiag_z: float, orientation_confidence: float = 0, old_orientation: int = 0, new_orientation: int = 0, scale_factor: float = 0):
    MAVLink_message.__init__(self, MAVLink_mag_cal_report_message.id, MAVLink_mag_cal_report_message.msgname)
    self._fieldnames = MAVLink_mag_cal_report_message.fieldnames
    self._instance_field = MAVLink_mag_cal_report_message.instance_field
    self._instance_offset = MAVLink_mag_cal_report_message.instance_offset
    self.compass_id = compass_id
    self.cal_mask = cal_mask
    self.cal_status = cal_status
    self.autosaved = autosaved
    self.fitness = fitness
    self.ofs_x = ofs_x
    self.ofs_y = ofs_y
    self.ofs_z = ofs_z
    self.diag_x = diag_x
    self.diag_y = diag_y
    self.diag_z = diag_z
    self.offdiag_x = offdiag_x
    self.offdiag_y = offdiag_y
    self.offdiag_z = offdiag_z
    self.orientation_confidence = orientation_confidence
    self.old_orientation = old_orientation
    self.new_orientation = new_orientation
    self.scale_factor = scale_factor
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_message(msgId: int, name: str)

              flowchart TD
              mavlink.definition.MAVLink_message[MAVLink_message]

              

              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

base MAVLink message class

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
163
164
165
166
167
168
169
170
171
172
173
def __init__(self, msgId: int, name: str) -> None:
    self._header = MAVLink_header(msgId)
    self._payload: Optional[bytes] = None
    self._msgbuf = bytearray(b"")
    self._crc: Optional[int] = None
    self._fieldnames: List[str] = []
    self._type = name
    self._signed = False
    self._link_id: Optional[int] = None
    self._instances: Optional[Dict[str, str]] = None
    self._instance_field: Optional[str] = None
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_message_interval_message(message_id: int, interval_us: int)

              flowchart TD
              mavlink.definition.MAVLink_message_interval_message[MAVLink_message_interval_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_message_interval_message
                


              click mavlink.definition.MAVLink_message_interval_message href "" "mavlink.definition.MAVLink_message_interval_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

The interval between messages for a particular MAVLink message ID. This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). This interface replaces DATA_STREAM.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
2999
3000
3001
3002
3003
3004
3005
def __init__(self, message_id: int, interval_us: int):
    MAVLink_message.__init__(self, MAVLink_message_interval_message.id, MAVLink_message_interval_message.msgname)
    self._fieldnames = MAVLink_message_interval_message.fieldnames
    self._instance_field = MAVLink_message_interval_message.instance_field
    self._instance_offset = MAVLink_message_interval_message.instance_offset
    self.message_id = message_id
    self.interval_us = interval_us
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_param_request_list_message(target_system: int, target_component: int)

              flowchart TD
              mavlink.definition.MAVLink_param_request_list_message[MAVLink_param_request_list_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_param_request_list_message
                


              click mavlink.definition.MAVLink_param_request_list_message href "" "mavlink.definition.MAVLink_param_request_list_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at https://mavlink.io/en/services/parameter.html

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
4488
4489
4490
4491
4492
4493
4494
def __init__(self, target_system: int, target_component: int):
    MAVLink_message.__init__(self, MAVLink_param_request_list_message.id, MAVLink_param_request_list_message.msgname)
    self._fieldnames = MAVLink_param_request_list_message.fieldnames
    self._instance_field = MAVLink_param_request_list_message.instance_field
    self._instance_offset = MAVLink_param_request_list_message.instance_offset
    self.target_system = target_system
    self.target_component = target_component
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_param_request_read_message(target_system: int, target_component: int, param_id: bytes, param_index: int)

              flowchart TD
              mavlink.definition.MAVLink_param_request_read_message[MAVLink_param_request_read_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_param_request_read_message
                


              click mavlink.definition.MAVLink_param_request_read_message href "" "mavlink.definition.MAVLink_param_request_read_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Request to read the onboard parameter with the param_id string id. Onboard parameters are stored as key[const char*] -> value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also https://mavlink.io/en/services/parameter.html for a full documentation of QGroundControl and IMU code.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
def __init__(self, target_system: int, target_component: int, param_id: bytes, param_index: int):
    MAVLink_message.__init__(self, MAVLink_param_request_read_message.id, MAVLink_param_request_read_message.msgname)
    self._fieldnames = MAVLink_param_request_read_message.fieldnames
    self._instance_field = MAVLink_param_request_read_message.instance_field
    self._instance_offset = MAVLink_param_request_read_message.instance_offset
    self.target_system = target_system
    self.target_component = target_component
    self._param_id_raw = param_id
    self.param_id = param_id.split(b"\x00", 1)[0].decode("ascii", errors="replace")
    self.param_index = param_index
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_param_set_message(target_system: int, target_component: int, param_id: bytes, param_value: float, param_type: int)

              flowchart TD
              mavlink.definition.MAVLink_param_set_message[MAVLink_param_set_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_param_set_message
                


              click mavlink.definition.MAVLink_param_set_message href "" "mavlink.definition.MAVLink_param_set_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Set a parameter value (write new value to permanent storage). The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at https://mavlink.io/en/services/parameter.html.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
def __init__(self, target_system: int, target_component: int, param_id: bytes, param_value: float, param_type: int):
    MAVLink_message.__init__(self, MAVLink_param_set_message.id, MAVLink_param_set_message.msgname)
    self._fieldnames = MAVLink_param_set_message.fieldnames
    self._instance_field = MAVLink_param_set_message.instance_field
    self._instance_offset = MAVLink_param_set_message.instance_offset
    self.target_system = target_system
    self.target_component = target_component
    self._param_id_raw = param_id
    self.param_id = param_id.split(b"\x00", 1)[0].decode("ascii", errors="replace")
    self.param_value = param_value
    self.param_type = param_type
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_param_value_message(param_id: bytes, param_value: float, param_type: int, param_count: int, param_index: int)

              flowchart TD
              mavlink.definition.MAVLink_param_value_message[MAVLink_param_value_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_param_value_message
                


              click mavlink.definition.MAVLink_param_value_message href "" "mavlink.definition.MAVLink_param_value_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at https://mavlink.io/en/services/parameter.html

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
def __init__(self, param_id: bytes, param_value: float, param_type: int, param_count: int, param_index: int):
    MAVLink_message.__init__(self, MAVLink_param_value_message.id, MAVLink_param_value_message.msgname)
    self._fieldnames = MAVLink_param_value_message.fieldnames
    self._instance_field = MAVLink_param_value_message.instance_field
    self._instance_offset = MAVLink_param_value_message.instance_offset
    self._param_id_raw = param_id
    self.param_id = param_id.split(b"\x00", 1)[0].decode("ascii", errors="replace")
    self.param_value = param_value
    self.param_type = param_type
    self.param_count = param_count
    self.param_index = param_index
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_pilot_power_message(power: float, cadence: float)

              flowchart TD
              mavlink.definition.MAVLink_pilot_power_message[MAVLink_pilot_power_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_pilot_power_message
                


              click mavlink.definition.MAVLink_pilot_power_message href "" "mavlink.definition.MAVLink_pilot_power_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Output status of the pilot power.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
3760
3761
3762
3763
3764
3765
3766
def __init__(self, power: float, cadence: float):
    MAVLink_message.__init__(self, MAVLink_pilot_power_message.id, MAVLink_pilot_power_message.msgname)
    self._fieldnames = MAVLink_pilot_power_message.fieldnames
    self._instance_field = MAVLink_pilot_power_message.instance_field
    self._instance_offset = MAVLink_pilot_power_message.instance_offset
    self.power = power
    self.cadence = cadence
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_position_target_global_int_message(time_boot_ms: int, coordinate_frame: int, type_mask: int, lat_int: int, lon_int: int, alt: float, vx: float, vy: float, vz: float, afx: float, afy: float, afz: float, yaw: float, yaw_rate: float)

              flowchart TD
              mavlink.definition.MAVLink_position_target_global_int_message[MAVLink_position_target_global_int_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_position_target_global_int_message
                


              click mavlink.definition.MAVLink_position_target_global_int_message href "" "mavlink.definition.MAVLink_position_target_global_int_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
def __init__(self, time_boot_ms: int, coordinate_frame: int, type_mask: int, lat_int: int, lon_int: int, alt: float, vx: float, vy: float, vz: float, afx: float, afy: float, afz: float, yaw: float, yaw_rate: float):
    MAVLink_message.__init__(self, MAVLink_position_target_global_int_message.id, MAVLink_position_target_global_int_message.msgname)
    self._fieldnames = MAVLink_position_target_global_int_message.fieldnames
    self._instance_field = MAVLink_position_target_global_int_message.instance_field
    self._instance_offset = MAVLink_position_target_global_int_message.instance_offset
    self.time_boot_ms = time_boot_ms
    self.coordinate_frame = coordinate_frame
    self.type_mask = type_mask
    self.lat_int = lat_int
    self.lon_int = lon_int
    self.alt = alt
    self.vx = vx
    self.vy = vy
    self.vz = vz
    self.afx = afx
    self.afy = afy
    self.afz = afz
    self.yaw = yaw
    self.yaw_rate = yaw_rate
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_raw_rpm_message(index: int, frequency: float)

              flowchart TD
              mavlink.definition.MAVLink_raw_rpm_message[MAVLink_raw_rpm_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_raw_rpm_message
                


              click mavlink.definition.MAVLink_raw_rpm_message href "" "mavlink.definition.MAVLink_raw_rpm_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

RPM sensor data message.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
4115
4116
4117
4118
4119
4120
4121
def __init__(self, index: int, frequency: float):
    MAVLink_message.__init__(self, MAVLink_raw_rpm_message.id, MAVLink_raw_rpm_message.msgname)
    self._fieldnames = MAVLink_raw_rpm_message.fieldnames
    self._instance_field = MAVLink_raw_rpm_message.instance_field
    self._instance_offset = MAVLink_raw_rpm_message.instance_offset
    self.index = index
    self.frequency = frequency
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_scaled_pressure_message(time_boot_ms: int, press_abs: float, press_diff: float, temperature: int, temperature_press_diff: int = 0)

              flowchart TD
              mavlink.definition.MAVLink_scaled_pressure_message[MAVLink_scaled_pressure_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_scaled_pressure_message
                


              click mavlink.definition.MAVLink_scaled_pressure_message href "" "mavlink.definition.MAVLink_scaled_pressure_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
def __init__(self, time_boot_ms: int, press_abs: float, press_diff: float, temperature: int, temperature_press_diff: int = 0):
    MAVLink_message.__init__(self, MAVLink_scaled_pressure_message.id, MAVLink_scaled_pressure_message.msgname)
    self._fieldnames = MAVLink_scaled_pressure_message.fieldnames
    self._instance_field = MAVLink_scaled_pressure_message.instance_field
    self._instance_offset = MAVLink_scaled_pressure_message.instance_offset
    self.time_boot_ms = time_boot_ms
    self.press_abs = press_abs
    self.press_diff = press_diff
    self.temperature = temperature
    self.temperature_press_diff = temperature_press_diff
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_sys_status_message(onboard_control_sensors_present: int, onboard_control_sensors_enabled: int, onboard_control_sensors_health: int, load: int, voltage_battery: int, current_battery: int, battery_remaining: int, drop_rate_comm: int, errors_comm: int, errors_count1: int, errors_count2: int, errors_count3: int, errors_count4: int, onboard_control_sensors_present_extended: int = 0, onboard_control_sensors_enabled_extended: int = 0, onboard_control_sensors_health_extended: int = 0)

              flowchart TD
              mavlink.definition.MAVLink_sys_status_message[MAVLink_sys_status_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_sys_status_message
                


              click mavlink.definition.MAVLink_sys_status_message href "" "mavlink.definition.MAVLink_sys_status_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Sensor and subsystem status information. Provides a compact representation of sensor/subsystem status and a few other basic statistics.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
def __init__(self, onboard_control_sensors_present: int, onboard_control_sensors_enabled: int, onboard_control_sensors_health: int, load: int, voltage_battery: int, current_battery: int, battery_remaining: int, drop_rate_comm: int, errors_comm: int, errors_count1: int, errors_count2: int, errors_count3: int, errors_count4: int, onboard_control_sensors_present_extended: int = 0, onboard_control_sensors_enabled_extended: int = 0, onboard_control_sensors_health_extended: int = 0):
    MAVLink_message.__init__(self, MAVLink_sys_status_message.id, MAVLink_sys_status_message.msgname)
    self._fieldnames = MAVLink_sys_status_message.fieldnames
    self._instance_field = MAVLink_sys_status_message.instance_field
    self._instance_offset = MAVLink_sys_status_message.instance_offset
    self.onboard_control_sensors_present = onboard_control_sensors_present
    self.onboard_control_sensors_enabled = onboard_control_sensors_enabled
    self.onboard_control_sensors_health = onboard_control_sensors_health
    self.load = load
    self.voltage_battery = voltage_battery
    self.current_battery = current_battery
    self.battery_remaining = battery_remaining
    self.drop_rate_comm = drop_rate_comm
    self.errors_comm = errors_comm
    self.errors_count1 = errors_count1
    self.errors_count2 = errors_count2
    self.errors_count3 = errors_count3
    self.errors_count4 = errors_count4
    self.onboard_control_sensors_present_extended = onboard_control_sensors_present_extended
    self.onboard_control_sensors_enabled_extended = onboard_control_sensors_enabled_extended
    self.onboard_control_sensors_health_extended = onboard_control_sensors_health_extended
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_system_time_message(time_unix_usec: int, time_boot_ms: int)

              flowchart TD
              mavlink.definition.MAVLink_system_time_message[MAVLink_system_time_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_system_time_message
                


              click mavlink.definition.MAVLink_system_time_message href "" "mavlink.definition.MAVLink_system_time_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

The system time is the time of the sender's master clock. This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network. Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a system that indicates a more recent time. This allows more broadly accurate date stamping of logs, and so on. If precise time synchronization is needed then use TIMESYNC instead.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
3100
3101
3102
3103
3104
3105
3106
def __init__(self, time_unix_usec: int, time_boot_ms: int):
    MAVLink_message.__init__(self, MAVLink_system_time_message.id, MAVLink_system_time_message.msgname)
    self._fieldnames = MAVLink_system_time_message.fieldnames
    self._instance_field = MAVLink_system_time_message.instance_field
    self._instance_offset = MAVLink_system_time_message.instance_offset
    self.time_unix_usec = time_unix_usec
    self.time_boot_ms = time_boot_ms
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_timesync_message(tc1: int, ts1: int, target_system: int = 0, target_component: int = 0)

              flowchart TD
              mavlink.definition.MAVLink_timesync_message[MAVLink_timesync_message]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_timesync_message
                


              click mavlink.definition.MAVLink_timesync_message href "" "mavlink.definition.MAVLink_timesync_message"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

Time synchronization message. The message is used for both timesync requests and responses. The request is sent with ts1=syncing component timestamp and tc1=0, and may be broadcast or targeted to a specific system/component. The response is sent with ts1=syncing component timestamp (mirror back unchanged), and tc1=responding component timestamp, with the target_system and target_component set to ids of the original request. Systems can determine if they are receiving a request or response based on the value of tc. If the response has target_system==target_component==0 the remote system has not been updated to use the component IDs and cannot reliably timesync; the requester may report an error. Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used). The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset. See also: https://mavlink.io/en/services/timesync.html.

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
4346
4347
4348
4349
4350
4351
4352
4353
4354
def __init__(self, tc1: int, ts1: int, target_system: int = 0, target_component: int = 0):
    MAVLink_message.__init__(self, MAVLink_timesync_message.id, MAVLink_timesync_message.msgname)
    self._fieldnames = MAVLink_timesync_message.fieldnames
    self._instance_field = MAVLink_timesync_message.instance_field
    self._instance_offset = MAVLink_timesync_message.instance_offset
    self.tc1 = tc1
    self.ts1 = ts1
    self.target_system = target_system
    self.target_component = target_component
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr
MAVLink_unknown(msgid: int, data: bytes)

              flowchart TD
              mavlink.definition.MAVLink_unknown[MAVLink_unknown]
              mavlink.definition.MAVLink_message[MAVLink_message]

                              mavlink.definition.MAVLink_message --> mavlink.definition.MAVLink_unknown
                


              click mavlink.definition.MAVLink_unknown href "" "mavlink.definition.MAVLink_unknown"
              click mavlink.definition.MAVLink_message href "" "mavlink.definition.MAVLink_message"
            

a message that we don't have in the XML used when built

Methods:

  • __getitem__ –

    support indexing, allowing for multi-instance sensors in one message

  • __str__ –

    Override the str function from MAVLink_messages because non-printable characters are common.

  • format_attr –

    override field getter

Source code in src/mavlink/definition.py
4816
4817
4818
4819
4820
4821
def __init__(self, msgid: int, data: bytes) -> None:
    MAVLink_message.__init__(self, MAVLINK_MSG_ID_UNKNOWN, "UNKNOWN_%u" % msgid)
    self._fieldnames = ["data"]
    self.data = data
    self._msgbuf = bytearray(data)
    self._instance_field = None
__getitem__(key: str) -> str

support indexing, allowing for multi-instance sensors in one message

Source code in src/mavlink/definition.py
314
315
316
317
318
319
320
def __getitem__(self, key: str) -> str:
    """support indexing, allowing for multi-instance sensors in one message"""
    if self._instances is None:
        raise IndexError()
    if key not in self._instances:
        raise IndexError()
    return self._instances[key]
__str__() -> str

Override the str function from MAVLink_messages because non-printable characters are common.

Source code in src/mavlink/definition.py
4823
4824
4825
4826
def __str__(self) -> str:
    """Override the __str__ function from MAVLink_messages because non-printable characters are common."""
    hexstr = ["{:x}".format(i) for i in self.data]
    return "%s {data:%s}" % (self._type, hexstr)
format_attr(field: str) -> Union[str, float, int]

override field getter

Source code in src/mavlink/definition.py
175
176
177
178
179
180
def format_attr(self, field: str) -> Union[str, float, int]:
    """override field getter"""
    raw_attr: Union[bytes, float, int] = getattr(self, field)
    if isinstance(raw_attr, bytes):
        return raw_attr.decode(errors="backslashreplace").rstrip("\x00")
    return raw_attr

              flowchart TD
              mavlink.definition.mavlink_msg_deprecated_name_property[mavlink_msg_deprecated_name_property]

              

              click mavlink.definition.mavlink_msg_deprecated_name_property href "" "mavlink.definition.mavlink_msg_deprecated_name_property"
            

This handles the class variable name change from name to msgname for subclasses of MAVLink_message during a transition period.

This is used by setting the class variable to mavlink_msg_deprecated_name_property().