INSTRUCTION
stringlengths
1
46.3k
RESPONSE
stringlengths
75
80.2k
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 (milliseconds since system boot) (uint32_t) lat : Latitude, expressed as degrees * 1E7 (int32_t) lon : Longitude, expressed as degrees * 1E7 (int32_t) alt : Altitude in meters, expressed as * 1000 (millimeters), AMSL (not WGS84 - note that virtually all GPS modules provide the AMSL as well) (int32_t) relative_alt : Altitude above ground in meters, expressed as * 1000 (millimeters) (int32_t) vx : Ground X Speed (Latitude, positive north), expressed as m/s * 100 (int16_t) vy : Ground Y Speed (Longitude, positive east), expressed as m/s * 100 (int16_t) vz : Ground Z Speed (Altitude, positive down), expressed as m/s * 100 (int16_t) hdg : Vehicle heading (yaw angle) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX (uint16_t)
def global_position_int_encode(self, time_boot_ms, lat, lon, alt, relative_alt, vx, vy, vz, hdg): ''' 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 (milliseconds since system boot) (uint32_t) lat : Latitude, expressed as degrees * 1E7 (int32_t) lon : Longitude, expressed as degrees * 1E7 (int32_t) alt : Altitude in meters, expressed as * 1000 (millimeters), AMSL (not WGS84 - note that virtually all GPS modules provide the AMSL as well) (int32_t) relative_alt : Altitude above ground in meters, expressed as * 1000 (millimeters) (int32_t) vx : Ground X Speed (Latitude, positive north), expressed as m/s * 100 (int16_t) vy : Ground Y Speed (Longitude, positive east), expressed as m/s * 100 (int16_t) vz : Ground Z Speed (Altitude, positive down), expressed as m/s * 100 (int16_t) hdg : Vehicle heading (yaw angle) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX (uint16_t) ''' return MAVLink_global_position_int_message(time_boot_ms, lat, lon, alt, relative_alt, vx, vy, vz, hdg)
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 (milliseconds since system boot) (uint32_t) lat : Latitude, expressed as degrees * 1E7 (int32_t) lon : Longitude, expressed as degrees * 1E7 (int32_t) alt : Altitude in meters, expressed as * 1000 (millimeters), AMSL (not WGS84 - note that virtually all GPS modules provide the AMSL as well) (int32_t) relative_alt : Altitude above ground in meters, expressed as * 1000 (millimeters) (int32_t) vx : Ground X Speed (Latitude, positive north), expressed as m/s * 100 (int16_t) vy : Ground Y Speed (Longitude, positive east), expressed as m/s * 100 (int16_t) vz : Ground Z Speed (Altitude, positive down), expressed as m/s * 100 (int16_t) hdg : Vehicle heading (yaw angle) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX (uint16_t)
def global_position_int_send(self, time_boot_ms, lat, lon, alt, relative_alt, vx, vy, vz, hdg, force_mavlink1=False): ''' 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 (milliseconds since system boot) (uint32_t) lat : Latitude, expressed as degrees * 1E7 (int32_t) lon : Longitude, expressed as degrees * 1E7 (int32_t) alt : Altitude in meters, expressed as * 1000 (millimeters), AMSL (not WGS84 - note that virtually all GPS modules provide the AMSL as well) (int32_t) relative_alt : Altitude above ground in meters, expressed as * 1000 (millimeters) (int32_t) vx : Ground X Speed (Latitude, positive north), expressed as m/s * 100 (int16_t) vy : Ground Y Speed (Longitude, positive east), expressed as m/s * 100 (int16_t) vz : Ground Z Speed (Altitude, positive down), expressed as m/s * 100 (int16_t) hdg : Vehicle heading (yaw angle) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX (uint16_t) ''' return self.send(self.global_position_int_encode(time_boot_ms, lat, lon, alt, relative_alt, vx, vy, vz, hdg), force_mavlink1=force_mavlink1)
The scaled values of the RC channels received. (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to UINT16_MAX. time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) port : Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows for more than 8 servos. (uint8_t) chan1_scaled : RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan2_scaled : RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan3_scaled : RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan4_scaled : RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan5_scaled : RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan6_scaled : RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan7_scaled : RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan8_scaled : RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) rssi : Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown. (uint8_t)
def rc_channels_scaled_encode(self, time_boot_ms, port, chan1_scaled, chan2_scaled, chan3_scaled, chan4_scaled, chan5_scaled, chan6_scaled, chan7_scaled, chan8_scaled, rssi): ''' The scaled values of the RC channels received. (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to UINT16_MAX. time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) port : Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows for more than 8 servos. (uint8_t) chan1_scaled : RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan2_scaled : RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan3_scaled : RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan4_scaled : RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan5_scaled : RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan6_scaled : RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan7_scaled : RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan8_scaled : RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) rssi : Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown. (uint8_t) ''' return MAVLink_rc_channels_scaled_message(time_boot_ms, port, chan1_scaled, chan2_scaled, chan3_scaled, chan4_scaled, chan5_scaled, chan6_scaled, chan7_scaled, chan8_scaled, rssi)
The scaled values of the RC channels received. (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to UINT16_MAX. time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) port : Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows for more than 8 servos. (uint8_t) chan1_scaled : RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan2_scaled : RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan3_scaled : RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan4_scaled : RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan5_scaled : RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan6_scaled : RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan7_scaled : RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan8_scaled : RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) rssi : Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown. (uint8_t)
def rc_channels_scaled_send(self, time_boot_ms, port, chan1_scaled, chan2_scaled, chan3_scaled, chan4_scaled, chan5_scaled, chan6_scaled, chan7_scaled, chan8_scaled, rssi, force_mavlink1=False): ''' The scaled values of the RC channels received. (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to UINT16_MAX. time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) port : Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows for more than 8 servos. (uint8_t) chan1_scaled : RC channel 1 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan2_scaled : RC channel 2 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan3_scaled : RC channel 3 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan4_scaled : RC channel 4 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan5_scaled : RC channel 5 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan6_scaled : RC channel 6 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan7_scaled : RC channel 7 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) chan8_scaled : RC channel 8 value scaled, (-100%) -10000, (0%) 0, (100%) 10000, (invalid) INT16_MAX. (int16_t) rssi : Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown. (uint8_t) ''' return self.send(self.rc_channels_scaled_encode(time_boot_ms, port, chan1_scaled, chan2_scaled, chan3_scaled, chan4_scaled, chan5_scaled, chan6_scaled, chan7_scaled, chan8_scaled, rssi), force_mavlink1=force_mavlink1)
The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification. time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) port : Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows for more than 8 servos. (uint8_t) chan1_raw : RC channel 1 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan2_raw : RC channel 2 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan3_raw : RC channel 3 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan4_raw : RC channel 4 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan5_raw : RC channel 5 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan6_raw : RC channel 6 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan7_raw : RC channel 7 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan8_raw : RC channel 8 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) rssi : Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown. (uint8_t)
def rc_channels_raw_encode(self, time_boot_ms, port, chan1_raw, chan2_raw, chan3_raw, chan4_raw, chan5_raw, chan6_raw, chan7_raw, chan8_raw, rssi): ''' The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification. time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) port : Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows for more than 8 servos. (uint8_t) chan1_raw : RC channel 1 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan2_raw : RC channel 2 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan3_raw : RC channel 3 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan4_raw : RC channel 4 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan5_raw : RC channel 5 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan6_raw : RC channel 6 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan7_raw : RC channel 7 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan8_raw : RC channel 8 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) rssi : Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown. (uint8_t) ''' return MAVLink_rc_channels_raw_message(time_boot_ms, port, chan1_raw, chan2_raw, chan3_raw, chan4_raw, chan5_raw, chan6_raw, chan7_raw, chan8_raw, rssi)
The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification. time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) port : Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows for more than 8 servos. (uint8_t) chan1_raw : RC channel 1 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan2_raw : RC channel 2 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan3_raw : RC channel 3 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan4_raw : RC channel 4 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan5_raw : RC channel 5 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan6_raw : RC channel 6 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan7_raw : RC channel 7 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan8_raw : RC channel 8 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) rssi : Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown. (uint8_t)
def rc_channels_raw_send(self, time_boot_ms, port, chan1_raw, chan2_raw, chan3_raw, chan4_raw, chan5_raw, chan6_raw, chan7_raw, chan8_raw, rssi, force_mavlink1=False): ''' The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification. time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) port : Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows for more than 8 servos. (uint8_t) chan1_raw : RC channel 1 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan2_raw : RC channel 2 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan3_raw : RC channel 3 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan4_raw : RC channel 4 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan5_raw : RC channel 5 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan6_raw : RC channel 6 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan7_raw : RC channel 7 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan8_raw : RC channel 8 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) rssi : Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown. (uint8_t) ''' return self.send(self.rc_channels_raw_encode(time_boot_ms, port, chan1_raw, chan2_raw, chan3_raw, chan4_raw, chan5_raw, chan6_raw, chan7_raw, chan8_raw, rssi), force_mavlink1=force_mavlink1)
The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. time_usec : Timestamp (microseconds since system boot) (uint32_t) port : Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows to encode more than 8 servos. (uint8_t) servo1_raw : Servo output 1 value, in microseconds (uint16_t) servo2_raw : Servo output 2 value, in microseconds (uint16_t) servo3_raw : Servo output 3 value, in microseconds (uint16_t) servo4_raw : Servo output 4 value, in microseconds (uint16_t) servo5_raw : Servo output 5 value, in microseconds (uint16_t) servo6_raw : Servo output 6 value, in microseconds (uint16_t) servo7_raw : Servo output 7 value, in microseconds (uint16_t) servo8_raw : Servo output 8 value, in microseconds (uint16_t)
def servo_output_raw_encode(self, time_usec, port, servo1_raw, servo2_raw, servo3_raw, servo4_raw, servo5_raw, servo6_raw, servo7_raw, servo8_raw): ''' The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. time_usec : Timestamp (microseconds since system boot) (uint32_t) port : Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows to encode more than 8 servos. (uint8_t) servo1_raw : Servo output 1 value, in microseconds (uint16_t) servo2_raw : Servo output 2 value, in microseconds (uint16_t) servo3_raw : Servo output 3 value, in microseconds (uint16_t) servo4_raw : Servo output 4 value, in microseconds (uint16_t) servo5_raw : Servo output 5 value, in microseconds (uint16_t) servo6_raw : Servo output 6 value, in microseconds (uint16_t) servo7_raw : Servo output 7 value, in microseconds (uint16_t) servo8_raw : Servo output 8 value, in microseconds (uint16_t) ''' return MAVLink_servo_output_raw_message(time_usec, port, servo1_raw, servo2_raw, servo3_raw, servo4_raw, servo5_raw, servo6_raw, servo7_raw, servo8_raw)
The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. time_usec : Timestamp (microseconds since system boot) (uint32_t) port : Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows to encode more than 8 servos. (uint8_t) servo1_raw : Servo output 1 value, in microseconds (uint16_t) servo2_raw : Servo output 2 value, in microseconds (uint16_t) servo3_raw : Servo output 3 value, in microseconds (uint16_t) servo4_raw : Servo output 4 value, in microseconds (uint16_t) servo5_raw : Servo output 5 value, in microseconds (uint16_t) servo6_raw : Servo output 6 value, in microseconds (uint16_t) servo7_raw : Servo output 7 value, in microseconds (uint16_t) servo8_raw : Servo output 8 value, in microseconds (uint16_t)
def servo_output_raw_send(self, time_usec, port, servo1_raw, servo2_raw, servo3_raw, servo4_raw, servo5_raw, servo6_raw, servo7_raw, servo8_raw, force_mavlink1=False): ''' The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. time_usec : Timestamp (microseconds since system boot) (uint32_t) port : Servo output port (set of 8 outputs = 1 port). Most MAVs will just use one, but this allows to encode more than 8 servos. (uint8_t) servo1_raw : Servo output 1 value, in microseconds (uint16_t) servo2_raw : Servo output 2 value, in microseconds (uint16_t) servo3_raw : Servo output 3 value, in microseconds (uint16_t) servo4_raw : Servo output 4 value, in microseconds (uint16_t) servo5_raw : Servo output 5 value, in microseconds (uint16_t) servo6_raw : Servo output 6 value, in microseconds (uint16_t) servo7_raw : Servo output 7 value, in microseconds (uint16_t) servo8_raw : Servo output 8 value, in microseconds (uint16_t) ''' return self.send(self.servo_output_raw_encode(time_usec, port, servo1_raw, servo2_raw, servo3_raw, servo4_raw, servo5_raw, servo6_raw, servo7_raw, servo8_raw), force_mavlink1=force_mavlink1)
Request a partial list of mission items from the system/component. http://qgroundcontrol.org/mavlink/waypoint_protocol. If start and end index are the same, just send one waypoint. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) start_index : Start index, 0 by default (int16_t) end_index : End index, -1 by default (-1: send list to end). Else a valid index of the list (int16_t)
def mission_request_partial_list_encode(self, target_system, target_component, start_index, end_index): ''' Request a partial list of mission items from the system/component. http://qgroundcontrol.org/mavlink/waypoint_protocol. If start and end index are the same, just send one waypoint. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) start_index : Start index, 0 by default (int16_t) end_index : End index, -1 by default (-1: send list to end). Else a valid index of the list (int16_t) ''' return MAVLink_mission_request_partial_list_message(target_system, target_component, start_index, end_index)
Request a partial list of mission items from the system/component. http://qgroundcontrol.org/mavlink/waypoint_protocol. If start and end index are the same, just send one waypoint. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) start_index : Start index, 0 by default (int16_t) end_index : End index, -1 by default (-1: send list to end). Else a valid index of the list (int16_t)
def mission_request_partial_list_send(self, target_system, target_component, start_index, end_index, force_mavlink1=False): ''' Request a partial list of mission items from the system/component. http://qgroundcontrol.org/mavlink/waypoint_protocol. If start and end index are the same, just send one waypoint. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) start_index : Start index, 0 by default (int16_t) end_index : End index, -1 by default (-1: send list to end). Else a valid index of the list (int16_t) ''' return self.send(self.mission_request_partial_list_encode(target_system, target_component, start_index, end_index), force_mavlink1=force_mavlink1)
This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED! target_system : System ID (uint8_t) target_component : Component ID (uint8_t) start_index : Start index, 0 by default and smaller / equal to the largest index of the current onboard list. (int16_t) end_index : End index, equal or greater than start index. (int16_t)
def mission_write_partial_list_encode(self, target_system, target_component, start_index, end_index): ''' This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED! target_system : System ID (uint8_t) target_component : Component ID (uint8_t) start_index : Start index, 0 by default and smaller / equal to the largest index of the current onboard list. (int16_t) end_index : End index, equal or greater than start index. (int16_t) ''' return MAVLink_mission_write_partial_list_message(target_system, target_component, start_index, end_index)
This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED! target_system : System ID (uint8_t) target_component : Component ID (uint8_t) start_index : Start index, 0 by default and smaller / equal to the largest index of the current onboard list. (int16_t) end_index : End index, equal or greater than start index. (int16_t)
def mission_write_partial_list_send(self, target_system, target_component, start_index, end_index, force_mavlink1=False): ''' This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED! target_system : System ID (uint8_t) target_component : Component ID (uint8_t) start_index : Start index, 0 by default and smaller / equal to the largest index of the current onboard list. (int16_t) end_index : End index, equal or greater than start index. (int16_t) ''' return self.send(self.mission_write_partial_list_encode(target_system, target_component, start_index, end_index), force_mavlink1=force_mavlink1)
Message encoding a mission item. This message is emitted to announce the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). See also http://qgroundcontrol.org/mavlink/waypoint_protocol. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) seq : Sequence (uint16_t) frame : The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h (uint8_t) command : The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs (uint16_t) current : false:0, true:1 (uint8_t) autocontinue : autocontinue to next wp (uint8_t) param1 : PARAM1, see MAV_CMD enum (float) param2 : PARAM2, see MAV_CMD enum (float) param3 : PARAM3, see MAV_CMD enum (float) param4 : PARAM4, see MAV_CMD enum (float) x : PARAM5 / local: x position, global: latitude (float) y : PARAM6 / y position: global: longitude (float) z : PARAM7 / z position: global: altitude (relative or absolute, depending on frame. (float)
def mission_item_encode(self, target_system, target_component, seq, frame, command, current, autocontinue, param1, param2, param3, param4, x, y, z): ''' Message encoding a mission item. This message is emitted to announce the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). See also http://qgroundcontrol.org/mavlink/waypoint_protocol. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) seq : Sequence (uint16_t) frame : The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h (uint8_t) command : The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs (uint16_t) current : false:0, true:1 (uint8_t) autocontinue : autocontinue to next wp (uint8_t) param1 : PARAM1, see MAV_CMD enum (float) param2 : PARAM2, see MAV_CMD enum (float) param3 : PARAM3, see MAV_CMD enum (float) param4 : PARAM4, see MAV_CMD enum (float) x : PARAM5 / local: x position, global: latitude (float) y : PARAM6 / y position: global: longitude (float) z : PARAM7 / z position: global: altitude (relative or absolute, depending on frame. (float) ''' return MAVLink_mission_item_message(target_system, target_component, seq, frame, command, current, autocontinue, param1, param2, param3, param4, x, y, z)
Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. http://qgroundcontrol.org/mavlink/waypoint_protocol target_system : System ID (uint8_t) target_component : Component ID (uint8_t) seq : Sequence (uint16_t)
def mission_request_send(self, target_system, target_component, seq, force_mavlink1=False): ''' Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. http://qgroundcontrol.org/mavlink/waypoint_protocol target_system : System ID (uint8_t) target_component : Component ID (uint8_t) seq : Sequence (uint16_t) ''' return self.send(self.mission_request_encode(target_system, target_component, seq), force_mavlink1=force_mavlink1)
Set the mission item with sequence number seq as current item. This means that the MAV will continue to this mission item on the shortest path (not following the mission items in-between). target_system : System ID (uint8_t) target_component : Component ID (uint8_t) seq : Sequence (uint16_t)
def mission_set_current_send(self, target_system, target_component, seq, force_mavlink1=False): ''' Set the mission item with sequence number seq as current item. This means that the MAV will continue to this mission item on the shortest path (not following the mission items in-between). target_system : System ID (uint8_t) target_component : Component ID (uint8_t) seq : Sequence (uint16_t) ''' return self.send(self.mission_set_current_encode(target_system, target_component, seq), force_mavlink1=force_mavlink1)
Request the overall list of mission items from the system/component. target_system : System ID (uint8_t) target_component : Component ID (uint8_t)
def mission_request_list_send(self, target_system, target_component, force_mavlink1=False): ''' Request the overall list of mission items from the system/component. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) ''' return self.send(self.mission_request_list_encode(target_system, target_component), force_mavlink1=force_mavlink1)
Message that announces the sequence number of the current active mission item. The MAV will fly towards this mission item. seq : Sequence (uint16_t)
def mission_current_send(self, seq, force_mavlink1=False): ''' Message that announces the sequence number of the current active mission item. The MAV will fly towards this mission item. seq : Sequence (uint16_t) ''' return self.send(self.mission_current_encode(seq), force_mavlink1=force_mavlink1)
This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of MISSIONs. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) count : Number of mission items in the sequence (uint16_t)
def mission_count_send(self, target_system, target_component, count, force_mavlink1=False): ''' This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of MISSIONs. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) count : Number of mission items in the sequence (uint16_t) ''' return self.send(self.mission_count_encode(target_system, target_component, count), force_mavlink1=force_mavlink1)
Delete all mission items at once. target_system : System ID (uint8_t) target_component : Component ID (uint8_t)
def mission_clear_all_send(self, target_system, target_component, force_mavlink1=False): ''' Delete all mission items at once. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) ''' return self.send(self.mission_clear_all_encode(target_system, target_component), force_mavlink1=force_mavlink1)
A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next MISSION. seq : Sequence (uint16_t)
def mission_item_reached_send(self, seq, force_mavlink1=False): ''' A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next MISSION. seq : Sequence (uint16_t) ''' return self.send(self.mission_item_reached_encode(seq), force_mavlink1=force_mavlink1)
Ack message during MISSION handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero). target_system : System ID (uint8_t) target_component : Component ID (uint8_t) type : See MAV_MISSION_RESULT enum (uint8_t)
def mission_ack_send(self, target_system, target_component, type, force_mavlink1=False): ''' Ack message during MISSION handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero). target_system : System ID (uint8_t) target_component : Component ID (uint8_t) type : See MAV_MISSION_RESULT enum (uint8_t) ''' return self.send(self.mission_ack_encode(target_system, target_component, type), force_mavlink1=force_mavlink1)
As local waypoints exist, the global MISSION reference allows to transform between the local coordinate frame and the global (GPS) coordinate frame. This can be necessary when e.g. in- and outdoor settings are connected and the MAV should move from in- to outdoor. target_system : System ID (uint8_t) latitude : Latitude (WGS84), in degrees * 1E7 (int32_t) longitude : Longitude (WGS84, in degrees * 1E7 (int32_t) altitude : Altitude (AMSL), in meters * 1000 (positive for up) (int32_t)
def set_gps_global_origin_encode(self, target_system, latitude, longitude, altitude): ''' As local waypoints exist, the global MISSION reference allows to transform between the local coordinate frame and the global (GPS) coordinate frame. This can be necessary when e.g. in- and outdoor settings are connected and the MAV should move from in- to outdoor. target_system : System ID (uint8_t) latitude : Latitude (WGS84), in degrees * 1E7 (int32_t) longitude : Longitude (WGS84, in degrees * 1E7 (int32_t) altitude : Altitude (AMSL), in meters * 1000 (positive for up) (int32_t) ''' return MAVLink_set_gps_global_origin_message(target_system, latitude, longitude, altitude)
As local waypoints exist, the global MISSION reference allows to transform between the local coordinate frame and the global (GPS) coordinate frame. This can be necessary when e.g. in- and outdoor settings are connected and the MAV should move from in- to outdoor. target_system : System ID (uint8_t) latitude : Latitude (WGS84), in degrees * 1E7 (int32_t) longitude : Longitude (WGS84, in degrees * 1E7 (int32_t) altitude : Altitude (AMSL), in meters * 1000 (positive for up) (int32_t)
def set_gps_global_origin_send(self, target_system, latitude, longitude, altitude, force_mavlink1=False): ''' As local waypoints exist, the global MISSION reference allows to transform between the local coordinate frame and the global (GPS) coordinate frame. This can be necessary when e.g. in- and outdoor settings are connected and the MAV should move from in- to outdoor. target_system : System ID (uint8_t) latitude : Latitude (WGS84), in degrees * 1E7 (int32_t) longitude : Longitude (WGS84, in degrees * 1E7 (int32_t) altitude : Altitude (AMSL), in meters * 1000 (positive for up) (int32_t) ''' return self.send(self.set_gps_global_origin_encode(target_system, latitude, longitude, altitude), force_mavlink1=force_mavlink1)
Once the MAV sets a new GPS-Local correspondence, this message announces the origin (0,0,0) position latitude : Latitude (WGS84), in degrees * 1E7 (int32_t) longitude : Longitude (WGS84), in degrees * 1E7 (int32_t) altitude : Altitude (AMSL), in meters * 1000 (positive for up) (int32_t)
def gps_global_origin_send(self, latitude, longitude, altitude, force_mavlink1=False): ''' Once the MAV sets a new GPS-Local correspondence, this message announces the origin (0,0,0) position latitude : Latitude (WGS84), in degrees * 1E7 (int32_t) longitude : Longitude (WGS84), in degrees * 1E7 (int32_t) altitude : Altitude (AMSL), in meters * 1000 (positive for up) (int32_t) ''' return self.send(self.gps_global_origin_encode(latitude, longitude, altitude), force_mavlink1=force_mavlink1)
Bind a RC channel to a parameter. The parameter should change accoding to the RC channel value. target_system : System ID (uint8_t) target_component : Component ID (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 (char) param_index : Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index. (int16_t) parameter_rc_channel_index : Index of parameter RC channel. Not equal to the RC channel id. Typically correpsonds to a potentiometer-knob on the RC. (uint8_t) param_value0 : Initial parameter value (float) scale : Scale, maps the RC range [-1, 1] to a parameter value (float) param_value_min : Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation) (float) param_value_max : Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation) (float)
def param_map_rc_encode(self, target_system, target_component, param_id, param_index, parameter_rc_channel_index, param_value0, scale, param_value_min, param_value_max): ''' Bind a RC channel to a parameter. The parameter should change accoding to the RC channel value. target_system : System ID (uint8_t) target_component : Component ID (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 (char) param_index : Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index. (int16_t) parameter_rc_channel_index : Index of parameter RC channel. Not equal to the RC channel id. Typically correpsonds to a potentiometer-knob on the RC. (uint8_t) param_value0 : Initial parameter value (float) scale : Scale, maps the RC range [-1, 1] to a parameter value (float) param_value_min : Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation) (float) param_value_max : Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation) (float) ''' return MAVLink_param_map_rc_message(target_system, target_component, param_id, param_index, parameter_rc_channel_index, param_value0, scale, param_value_min, param_value_max)
Bind a RC channel to a parameter. The parameter should change accoding to the RC channel value. target_system : System ID (uint8_t) target_component : Component ID (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 (char) param_index : Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index. (int16_t) parameter_rc_channel_index : Index of parameter RC channel. Not equal to the RC channel id. Typically correpsonds to a potentiometer-knob on the RC. (uint8_t) param_value0 : Initial parameter value (float) scale : Scale, maps the RC range [-1, 1] to a parameter value (float) param_value_min : Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation) (float) param_value_max : Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation) (float)
def param_map_rc_send(self, target_system, target_component, param_id, param_index, parameter_rc_channel_index, param_value0, scale, param_value_min, param_value_max, force_mavlink1=False): ''' Bind a RC channel to a parameter. The parameter should change accoding to the RC channel value. target_system : System ID (uint8_t) target_component : Component ID (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 (char) param_index : Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index. (int16_t) parameter_rc_channel_index : Index of parameter RC channel. Not equal to the RC channel id. Typically correpsonds to a potentiometer-knob on the RC. (uint8_t) param_value0 : Initial parameter value (float) scale : Scale, maps the RC range [-1, 1] to a parameter value (float) param_value_min : Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation) (float) param_value_max : Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation) (float) ''' return self.send(self.param_map_rc_encode(target_system, target_component, param_id, param_index, parameter_rc_channel_index, param_value0, scale, param_value_min, param_value_max), force_mavlink1=force_mavlink1)
Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. http://qgroundcontrol.org/mavlink/waypoint_protocol target_system : System ID (uint8_t) target_component : Component ID (uint8_t) seq : Sequence (uint16_t)
def mission_request_int_send(self, target_system, target_component, seq, force_mavlink1=False): ''' Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. http://qgroundcontrol.org/mavlink/waypoint_protocol target_system : System ID (uint8_t) target_component : Component ID (uint8_t) seq : Sequence (uint16_t) ''' return self.send(self.mission_request_int_encode(target_system, target_component, seq), force_mavlink1=force_mavlink1)
Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/MISSIONs to accept and which to reject. Safety areas are often enforced by national or competition regulations. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) frame : Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down. (uint8_t) p1x : x position 1 / Latitude 1 (float) p1y : y position 1 / Longitude 1 (float) p1z : z position 1 / Altitude 1 (float) p2x : x position 2 / Latitude 2 (float) p2y : y position 2 / Longitude 2 (float) p2z : z position 2 / Altitude 2 (float)
def safety_set_allowed_area_encode(self, target_system, target_component, frame, p1x, p1y, p1z, p2x, p2y, p2z): ''' Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/MISSIONs to accept and which to reject. Safety areas are often enforced by national or competition regulations. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) frame : Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down. (uint8_t) p1x : x position 1 / Latitude 1 (float) p1y : y position 1 / Longitude 1 (float) p1z : z position 1 / Altitude 1 (float) p2x : x position 2 / Latitude 2 (float) p2y : y position 2 / Longitude 2 (float) p2z : z position 2 / Altitude 2 (float) ''' return MAVLink_safety_set_allowed_area_message(target_system, target_component, frame, p1x, p1y, p1z, p2x, p2y, p2z)
Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/MISSIONs to accept and which to reject. Safety areas are often enforced by national or competition regulations. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) frame : Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down. (uint8_t) p1x : x position 1 / Latitude 1 (float) p1y : y position 1 / Longitude 1 (float) p1z : z position 1 / Altitude 1 (float) p2x : x position 2 / Latitude 2 (float) p2y : y position 2 / Longitude 2 (float) p2z : z position 2 / Altitude 2 (float)
def safety_set_allowed_area_send(self, target_system, target_component, frame, p1x, p1y, p1z, p2x, p2y, p2z, force_mavlink1=False): ''' Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/MISSIONs to accept and which to reject. Safety areas are often enforced by national or competition regulations. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) frame : Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down. (uint8_t) p1x : x position 1 / Latitude 1 (float) p1y : y position 1 / Longitude 1 (float) p1z : z position 1 / Altitude 1 (float) p2x : x position 2 / Latitude 2 (float) p2y : y position 2 / Longitude 2 (float) p2z : z position 2 / Altitude 2 (float) ''' return self.send(self.safety_set_allowed_area_encode(target_system, target_component, frame, p1x, p1y, p1z, p2x, p2y, p2z), force_mavlink1=force_mavlink1)
Read out the safety zone the MAV currently assumes. frame : Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down. (uint8_t) p1x : x position 1 / Latitude 1 (float) p1y : y position 1 / Longitude 1 (float) p1z : z position 1 / Altitude 1 (float) p2x : x position 2 / Latitude 2 (float) p2y : y position 2 / Longitude 2 (float) p2z : z position 2 / Altitude 2 (float)
def safety_allowed_area_encode(self, frame, p1x, p1y, p1z, p2x, p2y, p2z): ''' Read out the safety zone the MAV currently assumes. frame : Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down. (uint8_t) p1x : x position 1 / Latitude 1 (float) p1y : y position 1 / Longitude 1 (float) p1z : z position 1 / Altitude 1 (float) p2x : x position 2 / Latitude 2 (float) p2y : y position 2 / Longitude 2 (float) p2z : z position 2 / Altitude 2 (float) ''' return MAVLink_safety_allowed_area_message(frame, p1x, p1y, p1z, p2x, p2y, p2z)
Read out the safety zone the MAV currently assumes. frame : Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down. (uint8_t) p1x : x position 1 / Latitude 1 (float) p1y : y position 1 / Longitude 1 (float) p1z : z position 1 / Altitude 1 (float) p2x : x position 2 / Latitude 2 (float) p2y : y position 2 / Longitude 2 (float) p2z : z position 2 / Altitude 2 (float)
def safety_allowed_area_send(self, frame, p1x, p1y, p1z, p2x, p2y, p2z, force_mavlink1=False): ''' Read out the safety zone the MAV currently assumes. frame : Coordinate frame, as defined by MAV_FRAME enum in mavlink_types.h. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down. (uint8_t) p1x : x position 1 / Latitude 1 (float) p1y : y position 1 / Longitude 1 (float) p1z : z position 1 / Altitude 1 (float) p2x : x position 2 / Latitude 2 (float) p2y : y position 2 / Longitude 2 (float) p2z : z position 2 / Altitude 2 (float) ''' return self.send(self.safety_allowed_area_encode(frame, p1x, p1y, p1z, p2x, p2y, p2z), force_mavlink1=force_mavlink1)
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 (milliseconds since system boot) (uint32_t) q : Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation) (float) rollspeed : Roll angular speed (rad/s) (float) pitchspeed : Pitch angular speed (rad/s) (float) yawspeed : Yaw angular speed (rad/s) (float) covariance : Attitude covariance (float)
def attitude_quaternion_cov_encode(self, time_boot_ms, q, rollspeed, pitchspeed, yawspeed, covariance): ''' 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 (milliseconds since system boot) (uint32_t) q : Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation) (float) rollspeed : Roll angular speed (rad/s) (float) pitchspeed : Pitch angular speed (rad/s) (float) yawspeed : Yaw angular speed (rad/s) (float) covariance : Attitude covariance (float) ''' return MAVLink_attitude_quaternion_cov_message(time_boot_ms, q, rollspeed, pitchspeed, yawspeed, covariance)
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 (milliseconds since system boot) (uint32_t) q : Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation) (float) rollspeed : Roll angular speed (rad/s) (float) pitchspeed : Pitch angular speed (rad/s) (float) yawspeed : Yaw angular speed (rad/s) (float) covariance : Attitude covariance (float)
def attitude_quaternion_cov_send(self, time_boot_ms, q, rollspeed, pitchspeed, yawspeed, covariance, force_mavlink1=False): ''' 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 (milliseconds since system boot) (uint32_t) q : Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation) (float) rollspeed : Roll angular speed (rad/s) (float) pitchspeed : Pitch angular speed (rad/s) (float) yawspeed : Yaw angular speed (rad/s) (float) covariance : Attitude covariance (float) ''' return self.send(self.attitude_quaternion_cov_encode(time_boot_ms, q, rollspeed, pitchspeed, yawspeed, covariance), force_mavlink1=force_mavlink1)
The state of the fixed wing navigation and position controller. nav_roll : Current desired roll in degrees (float) nav_pitch : Current desired pitch in degrees (float) nav_bearing : Current desired heading in degrees (int16_t) target_bearing : Bearing to current MISSION/target in degrees (int16_t) wp_dist : Distance to active MISSION in meters (uint16_t) alt_error : Current altitude error in meters (float) aspd_error : Current airspeed error in meters/second (float) xtrack_error : Current crosstrack error on x-y plane in meters (float)
def nav_controller_output_encode(self, nav_roll, nav_pitch, nav_bearing, target_bearing, wp_dist, alt_error, aspd_error, xtrack_error): ''' The state of the fixed wing navigation and position controller. nav_roll : Current desired roll in degrees (float) nav_pitch : Current desired pitch in degrees (float) nav_bearing : Current desired heading in degrees (int16_t) target_bearing : Bearing to current MISSION/target in degrees (int16_t) wp_dist : Distance to active MISSION in meters (uint16_t) alt_error : Current altitude error in meters (float) aspd_error : Current airspeed error in meters/second (float) xtrack_error : Current crosstrack error on x-y plane in meters (float) ''' return MAVLink_nav_controller_output_message(nav_roll, nav_pitch, nav_bearing, target_bearing, wp_dist, alt_error, aspd_error, xtrack_error)
The state of the fixed wing navigation and position controller. nav_roll : Current desired roll in degrees (float) nav_pitch : Current desired pitch in degrees (float) nav_bearing : Current desired heading in degrees (int16_t) target_bearing : Bearing to current MISSION/target in degrees (int16_t) wp_dist : Distance to active MISSION in meters (uint16_t) alt_error : Current altitude error in meters (float) aspd_error : Current airspeed error in meters/second (float) xtrack_error : Current crosstrack error on x-y plane in meters (float)
def nav_controller_output_send(self, nav_roll, nav_pitch, nav_bearing, target_bearing, wp_dist, alt_error, aspd_error, xtrack_error, force_mavlink1=False): ''' The state of the fixed wing navigation and position controller. nav_roll : Current desired roll in degrees (float) nav_pitch : Current desired pitch in degrees (float) nav_bearing : Current desired heading in degrees (int16_t) target_bearing : Bearing to current MISSION/target in degrees (int16_t) wp_dist : Distance to active MISSION in meters (uint16_t) alt_error : Current altitude error in meters (float) aspd_error : Current airspeed error in meters/second (float) xtrack_error : Current crosstrack error on x-y plane in meters (float) ''' return self.send(self.nav_controller_output_encode(nav_roll, nav_pitch, nav_bearing, target_bearing, wp_dist, alt_error, aspd_error, xtrack_error), force_mavlink1=force_mavlink1)
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. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset. time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) time_utc : Timestamp (microseconds since UNIX epoch) in UTC. 0 for unknown. Commonly filled by the precision time source of a GPS receiver. (uint64_t) estimator_type : Class id of the estimator this estimate originated from. (uint8_t) lat : Latitude, expressed as degrees * 1E7 (int32_t) lon : Longitude, expressed as degrees * 1E7 (int32_t) alt : Altitude in meters, expressed as * 1000 (millimeters), above MSL (int32_t) relative_alt : Altitude above ground in meters, expressed as * 1000 (millimeters) (int32_t) vx : Ground X Speed (Latitude), expressed as m/s (float) vy : Ground Y Speed (Longitude), expressed as m/s (float) vz : Ground Z Speed (Altitude), expressed as m/s (float) covariance : Covariance matrix (first six entries are the first ROW, next six entries are the second row, etc.) (float)
def global_position_int_cov_encode(self, time_boot_ms, time_utc, estimator_type, lat, lon, alt, relative_alt, vx, vy, vz, covariance): ''' 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. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset. time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) time_utc : Timestamp (microseconds since UNIX epoch) in UTC. 0 for unknown. Commonly filled by the precision time source of a GPS receiver. (uint64_t) estimator_type : Class id of the estimator this estimate originated from. (uint8_t) lat : Latitude, expressed as degrees * 1E7 (int32_t) lon : Longitude, expressed as degrees * 1E7 (int32_t) alt : Altitude in meters, expressed as * 1000 (millimeters), above MSL (int32_t) relative_alt : Altitude above ground in meters, expressed as * 1000 (millimeters) (int32_t) vx : Ground X Speed (Latitude), expressed as m/s (float) vy : Ground Y Speed (Longitude), expressed as m/s (float) vz : Ground Z Speed (Altitude), expressed as m/s (float) covariance : Covariance matrix (first six entries are the first ROW, next six entries are the second row, etc.) (float) ''' return MAVLink_global_position_int_cov_message(time_boot_ms, time_utc, estimator_type, lat, lon, alt, relative_alt, vx, vy, vz, covariance)
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. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset. time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) time_utc : Timestamp (microseconds since UNIX epoch) in UTC. 0 for unknown. Commonly filled by the precision time source of a GPS receiver. (uint64_t) estimator_type : Class id of the estimator this estimate originated from. (uint8_t) lat : Latitude, expressed as degrees * 1E7 (int32_t) lon : Longitude, expressed as degrees * 1E7 (int32_t) alt : Altitude in meters, expressed as * 1000 (millimeters), above MSL (int32_t) relative_alt : Altitude above ground in meters, expressed as * 1000 (millimeters) (int32_t) vx : Ground X Speed (Latitude), expressed as m/s (float) vy : Ground Y Speed (Longitude), expressed as m/s (float) vz : Ground Z Speed (Altitude), expressed as m/s (float) covariance : Covariance matrix (first six entries are the first ROW, next six entries are the second row, etc.) (float)
def global_position_int_cov_send(self, time_boot_ms, time_utc, estimator_type, lat, lon, alt, relative_alt, vx, vy, vz, covariance, force_mavlink1=False): ''' 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. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset. time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) time_utc : Timestamp (microseconds since UNIX epoch) in UTC. 0 for unknown. Commonly filled by the precision time source of a GPS receiver. (uint64_t) estimator_type : Class id of the estimator this estimate originated from. (uint8_t) lat : Latitude, expressed as degrees * 1E7 (int32_t) lon : Longitude, expressed as degrees * 1E7 (int32_t) alt : Altitude in meters, expressed as * 1000 (millimeters), above MSL (int32_t) relative_alt : Altitude above ground in meters, expressed as * 1000 (millimeters) (int32_t) vx : Ground X Speed (Latitude), expressed as m/s (float) vy : Ground Y Speed (Longitude), expressed as m/s (float) vz : Ground Z Speed (Altitude), expressed as m/s (float) covariance : Covariance matrix (first six entries are the first ROW, next six entries are the second row, etc.) (float) ''' return self.send(self.global_position_int_cov_encode(time_boot_ms, time_utc, estimator_type, lat, lon, alt, relative_alt, vx, vy, vz, covariance), force_mavlink1=force_mavlink1)
The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention) time_boot_ms : Timestamp (milliseconds since system boot). 0 for system without monotonic timestamp (uint32_t) time_utc : Timestamp (microseconds since UNIX epoch) in UTC. 0 for unknown. Commonly filled by the precision time source of a GPS receiver. (uint64_t) estimator_type : Class id of the estimator this estimate originated from. (uint8_t) x : X Position (float) y : Y Position (float) z : Z Position (float) vx : X Speed (m/s) (float) vy : Y Speed (m/s) (float) vz : Z Speed (m/s) (float) ax : X Acceleration (m/s^2) (float) ay : Y Acceleration (m/s^2) (float) az : Z Acceleration (m/s^2) (float) covariance : Covariance matrix upper right triangular (first nine entries are the first ROW, next eight entries are the second row, etc.) (float)
def local_position_ned_cov_encode(self, time_boot_ms, time_utc, estimator_type, x, y, z, vx, vy, vz, ax, ay, az, covariance): ''' The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention) time_boot_ms : Timestamp (milliseconds since system boot). 0 for system without monotonic timestamp (uint32_t) time_utc : Timestamp (microseconds since UNIX epoch) in UTC. 0 for unknown. Commonly filled by the precision time source of a GPS receiver. (uint64_t) estimator_type : Class id of the estimator this estimate originated from. (uint8_t) x : X Position (float) y : Y Position (float) z : Z Position (float) vx : X Speed (m/s) (float) vy : Y Speed (m/s) (float) vz : Z Speed (m/s) (float) ax : X Acceleration (m/s^2) (float) ay : Y Acceleration (m/s^2) (float) az : Z Acceleration (m/s^2) (float) covariance : Covariance matrix upper right triangular (first nine entries are the first ROW, next eight entries are the second row, etc.) (float) ''' return MAVLink_local_position_ned_cov_message(time_boot_ms, time_utc, estimator_type, x, y, z, vx, vy, vz, ax, ay, az, covariance)
The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention) time_boot_ms : Timestamp (milliseconds since system boot). 0 for system without monotonic timestamp (uint32_t) time_utc : Timestamp (microseconds since UNIX epoch) in UTC. 0 for unknown. Commonly filled by the precision time source of a GPS receiver. (uint64_t) estimator_type : Class id of the estimator this estimate originated from. (uint8_t) x : X Position (float) y : Y Position (float) z : Z Position (float) vx : X Speed (m/s) (float) vy : Y Speed (m/s) (float) vz : Z Speed (m/s) (float) ax : X Acceleration (m/s^2) (float) ay : Y Acceleration (m/s^2) (float) az : Z Acceleration (m/s^2) (float) covariance : Covariance matrix upper right triangular (first nine entries are the first ROW, next eight entries are the second row, etc.) (float)
def local_position_ned_cov_send(self, time_boot_ms, time_utc, estimator_type, x, y, z, vx, vy, vz, ax, ay, az, covariance, force_mavlink1=False): ''' The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention) time_boot_ms : Timestamp (milliseconds since system boot). 0 for system without monotonic timestamp (uint32_t) time_utc : Timestamp (microseconds since UNIX epoch) in UTC. 0 for unknown. Commonly filled by the precision time source of a GPS receiver. (uint64_t) estimator_type : Class id of the estimator this estimate originated from. (uint8_t) x : X Position (float) y : Y Position (float) z : Z Position (float) vx : X Speed (m/s) (float) vy : Y Speed (m/s) (float) vz : Z Speed (m/s) (float) ax : X Acceleration (m/s^2) (float) ay : Y Acceleration (m/s^2) (float) az : Z Acceleration (m/s^2) (float) covariance : Covariance matrix upper right triangular (first nine entries are the first ROW, next eight entries are the second row, etc.) (float) ''' return self.send(self.local_position_ned_cov_encode(time_boot_ms, time_utc, estimator_type, x, y, z, vx, vy, vz, ax, ay, az, covariance), force_mavlink1=force_mavlink1)
The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification. time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) chancount : Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available. (uint8_t) chan1_raw : RC channel 1 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan2_raw : RC channel 2 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan3_raw : RC channel 3 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan4_raw : RC channel 4 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan5_raw : RC channel 5 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan6_raw : RC channel 6 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan7_raw : RC channel 7 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan8_raw : RC channel 8 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan9_raw : RC channel 9 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan10_raw : RC channel 10 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan11_raw : RC channel 11 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan12_raw : RC channel 12 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan13_raw : RC channel 13 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan14_raw : RC channel 14 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan15_raw : RC channel 15 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan16_raw : RC channel 16 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan17_raw : RC channel 17 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan18_raw : RC channel 18 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) rssi : Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown. (uint8_t)
def rc_channels_encode(self, time_boot_ms, chancount, chan1_raw, chan2_raw, chan3_raw, chan4_raw, chan5_raw, chan6_raw, chan7_raw, chan8_raw, chan9_raw, chan10_raw, chan11_raw, chan12_raw, chan13_raw, chan14_raw, chan15_raw, chan16_raw, chan17_raw, chan18_raw, rssi): ''' The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification. time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) chancount : Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available. (uint8_t) chan1_raw : RC channel 1 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan2_raw : RC channel 2 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan3_raw : RC channel 3 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan4_raw : RC channel 4 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan5_raw : RC channel 5 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan6_raw : RC channel 6 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan7_raw : RC channel 7 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan8_raw : RC channel 8 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan9_raw : RC channel 9 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan10_raw : RC channel 10 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan11_raw : RC channel 11 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan12_raw : RC channel 12 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan13_raw : RC channel 13 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan14_raw : RC channel 14 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan15_raw : RC channel 15 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan16_raw : RC channel 16 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan17_raw : RC channel 17 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) chan18_raw : RC channel 18 value, in microseconds. A value of UINT16_MAX implies the channel is unused. (uint16_t) rssi : Receive signal strength indicator, 0: 0%, 100: 100%, 255: invalid/unknown. (uint8_t) ''' return MAVLink_rc_channels_message(time_boot_ms, chancount, chan1_raw, chan2_raw, chan3_raw, chan4_raw, chan5_raw, chan6_raw, chan7_raw, chan8_raw, chan9_raw, chan10_raw, chan11_raw, chan12_raw, chan13_raw, chan14_raw, chan15_raw, chan16_raw, chan17_raw, chan18_raw, rssi)
THIS INTERFACE IS DEPRECATED. USE SET_MESSAGE_INTERVAL INSTEAD. target_system : The target requested to send the message stream. (uint8_t) target_component : The target requested to send the message stream. (uint8_t) req_stream_id : The ID of the requested data stream (uint8_t) req_message_rate : The requested message rate (uint16_t) start_stop : 1 to start sending, 0 to stop sending. (uint8_t)
def request_data_stream_encode(self, target_system, target_component, req_stream_id, req_message_rate, start_stop): ''' THIS INTERFACE IS DEPRECATED. USE SET_MESSAGE_INTERVAL INSTEAD. target_system : The target requested to send the message stream. (uint8_t) target_component : The target requested to send the message stream. (uint8_t) req_stream_id : The ID of the requested data stream (uint8_t) req_message_rate : The requested message rate (uint16_t) start_stop : 1 to start sending, 0 to stop sending. (uint8_t) ''' return MAVLink_request_data_stream_message(target_system, target_component, req_stream_id, req_message_rate, start_stop)
THIS INTERFACE IS DEPRECATED. USE SET_MESSAGE_INTERVAL INSTEAD. target_system : The target requested to send the message stream. (uint8_t) target_component : The target requested to send the message stream. (uint8_t) req_stream_id : The ID of the requested data stream (uint8_t) req_message_rate : The requested message rate (uint16_t) start_stop : 1 to start sending, 0 to stop sending. (uint8_t)
def request_data_stream_send(self, target_system, target_component, req_stream_id, req_message_rate, start_stop, force_mavlink1=False): ''' THIS INTERFACE IS DEPRECATED. USE SET_MESSAGE_INTERVAL INSTEAD. target_system : The target requested to send the message stream. (uint8_t) target_component : The target requested to send the message stream. (uint8_t) req_stream_id : The ID of the requested data stream (uint8_t) req_message_rate : The requested message rate (uint16_t) start_stop : 1 to start sending, 0 to stop sending. (uint8_t) ''' return self.send(self.request_data_stream_encode(target_system, target_component, req_stream_id, req_message_rate, start_stop), force_mavlink1=force_mavlink1)
THIS INTERFACE IS DEPRECATED. USE MESSAGE_INTERVAL INSTEAD. stream_id : The ID of the requested data stream (uint8_t) message_rate : The message rate (uint16_t) on_off : 1 stream is enabled, 0 stream is stopped. (uint8_t)
def data_stream_send(self, stream_id, message_rate, on_off, force_mavlink1=False): ''' THIS INTERFACE IS DEPRECATED. USE MESSAGE_INTERVAL INSTEAD. stream_id : The ID of the requested data stream (uint8_t) message_rate : The message rate (uint16_t) on_off : 1 stream is enabled, 0 stream is stopped. (uint8_t) ''' return self.send(self.data_stream_encode(stream_id, message_rate, on_off), force_mavlink1=force_mavlink1)
This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled an buttons are also transmit as boolean values of their target : The system to be controlled. (uint8_t) x : X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle. (int16_t) y : Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle. (int16_t) z : Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust. (int16_t) r : R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle. (int16_t) buttons : A bitfield corresponding to the joystick buttons' current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1. (uint16_t)
def manual_control_encode(self, target, x, y, z, r, buttons): ''' This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled an buttons are also transmit as boolean values of their target : The system to be controlled. (uint8_t) x : X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle. (int16_t) y : Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle. (int16_t) z : Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust. (int16_t) r : R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle. (int16_t) buttons : A bitfield corresponding to the joystick buttons' current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1. (uint16_t) ''' return MAVLink_manual_control_message(target, x, y, z, r, buttons)
The RAW values of the RC channels sent to the MAV to override info received from the RC radio. A value of UINT16_MAX means no change to that channel. A value of 0 means control of that channel should be released back to the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) chan1_raw : RC channel 1 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan2_raw : RC channel 2 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan3_raw : RC channel 3 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan4_raw : RC channel 4 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan5_raw : RC channel 5 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan6_raw : RC channel 6 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan7_raw : RC channel 7 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan8_raw : RC channel 8 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t)
def rc_channels_override_encode(self, target_system, target_component, chan1_raw, chan2_raw, chan3_raw, chan4_raw, chan5_raw, chan6_raw, chan7_raw, chan8_raw): ''' The RAW values of the RC channels sent to the MAV to override info received from the RC radio. A value of UINT16_MAX means no change to that channel. A value of 0 means control of that channel should be released back to the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) chan1_raw : RC channel 1 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan2_raw : RC channel 2 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan3_raw : RC channel 3 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan4_raw : RC channel 4 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan5_raw : RC channel 5 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan6_raw : RC channel 6 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan7_raw : RC channel 7 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan8_raw : RC channel 8 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) ''' return MAVLink_rc_channels_override_message(target_system, target_component, chan1_raw, chan2_raw, chan3_raw, chan4_raw, chan5_raw, chan6_raw, chan7_raw, chan8_raw)
This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled an buttons are also transmit as boolean values of their target : The system to be controlled. (uint8_t) x : X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle. (int16_t) y : Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle. (int16_t) z : Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust. (int16_t) r : R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle. (int16_t) buttons : A bitfield corresponding to the joystick buttons' current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1. (uint16_t)
def manual_control_send(self, target, x, y, z, r, buttons, force_mavlink1=False): ''' This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled an buttons are also transmit as boolean values of their target : The system to be controlled. (uint8_t) x : X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle. (int16_t) y : Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle. (int16_t) z : Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust. (int16_t) r : R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle. (int16_t) buttons : A bitfield corresponding to the joystick buttons' current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1. (uint16_t) ''' return self.send(self.manual_control_encode(target, x, y, z, r, buttons), force_mavlink1=force_mavlink1)
The RAW values of the RC channels sent to the MAV to override info received from the RC radio. A value of UINT16_MAX means no change to that channel. A value of 0 means control of that channel should be released back to the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) chan1_raw : RC channel 1 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan2_raw : RC channel 2 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan3_raw : RC channel 3 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan4_raw : RC channel 4 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan5_raw : RC channel 5 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan6_raw : RC channel 6 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan7_raw : RC channel 7 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan8_raw : RC channel 8 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t)
def rc_channels_override_send(self, target_system, target_component, chan1_raw, chan2_raw, chan3_raw, chan4_raw, chan5_raw, chan6_raw, chan7_raw, chan8_raw, force_mavlink1=False): ''' The RAW values of the RC channels sent to the MAV to override info received from the RC radio. A value of UINT16_MAX means no change to that channel. A value of 0 means control of that channel should be released back to the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) chan1_raw : RC channel 1 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan2_raw : RC channel 2 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan3_raw : RC channel 3 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan4_raw : RC channel 4 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan5_raw : RC channel 5 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan6_raw : RC channel 6 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan7_raw : RC channel 7 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) chan8_raw : RC channel 8 value, in microseconds. A value of UINT16_MAX means to ignore this field. (uint16_t) ''' return self.send(self.rc_channels_override_encode(target_system, target_component, chan1_raw, chan2_raw, chan3_raw, chan4_raw, chan5_raw, chan6_raw, chan7_raw, chan8_raw), force_mavlink1=force_mavlink1)
Message encoding a mission item. This message is emitted to announce the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). See alsohttp ://qgroundcontrol.org/mavlink/waypoint_protocol. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) seq : Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4). (uint16_t) frame : The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h (uint8_t) command : The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs (uint16_t) current : false:0, true:1 (uint8_t) autocontinue : autocontinue to next wp (uint8_t) param1 : PARAM1, see MAV_CMD enum (float) param2 : PARAM2, see MAV_CMD enum (float) param3 : PARAM3, see MAV_CMD enum (float) param4 : PARAM4, see MAV_CMD enum (float) x : PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7 (int32_t) y : PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7 (int32_t) z : PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame. (float)
def mission_item_int_encode(self, target_system, target_component, seq, frame, command, current, autocontinue, param1, param2, param3, param4, x, y, z): ''' Message encoding a mission item. This message is emitted to announce the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). See alsohttp ://qgroundcontrol.org/mavlink/waypoint_protocol. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) seq : Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4). (uint16_t) frame : The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h (uint8_t) command : The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs (uint16_t) current : false:0, true:1 (uint8_t) autocontinue : autocontinue to next wp (uint8_t) param1 : PARAM1, see MAV_CMD enum (float) param2 : PARAM2, see MAV_CMD enum (float) param3 : PARAM3, see MAV_CMD enum (float) param4 : PARAM4, see MAV_CMD enum (float) x : PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7 (int32_t) y : PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7 (int32_t) z : PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame. (float) ''' return MAVLink_mission_item_int_message(target_system, target_component, seq, frame, command, current, autocontinue, param1, param2, param3, param4, x, y, z)
Message encoding a mission item. This message is emitted to announce the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). See alsohttp ://qgroundcontrol.org/mavlink/waypoint_protocol. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) seq : Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4). (uint16_t) frame : The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h (uint8_t) command : The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs (uint16_t) current : false:0, true:1 (uint8_t) autocontinue : autocontinue to next wp (uint8_t) param1 : PARAM1, see MAV_CMD enum (float) param2 : PARAM2, see MAV_CMD enum (float) param3 : PARAM3, see MAV_CMD enum (float) param4 : PARAM4, see MAV_CMD enum (float) x : PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7 (int32_t) y : PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7 (int32_t) z : PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame. (float)
def mission_item_int_send(self, target_system, target_component, seq, frame, command, current, autocontinue, param1, param2, param3, param4, x, y, z, force_mavlink1=False): ''' Message encoding a mission item. This message is emitted to announce the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). See alsohttp ://qgroundcontrol.org/mavlink/waypoint_protocol. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) seq : Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4). (uint16_t) frame : The coordinate system of the MISSION. see MAV_FRAME in mavlink_types.h (uint8_t) command : The scheduled action for the MISSION. see MAV_CMD in common.xml MAVLink specs (uint16_t) current : false:0, true:1 (uint8_t) autocontinue : autocontinue to next wp (uint8_t) param1 : PARAM1, see MAV_CMD enum (float) param2 : PARAM2, see MAV_CMD enum (float) param3 : PARAM3, see MAV_CMD enum (float) param4 : PARAM4, see MAV_CMD enum (float) x : PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7 (int32_t) y : PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7 (int32_t) z : PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame. (float) ''' return self.send(self.mission_item_int_encode(target_system, target_component, seq, frame, command, current, autocontinue, param1, param2, param3, param4, x, y, z), force_mavlink1=force_mavlink1)
Metrics typically displayed on a HUD for fixed wing aircraft airspeed : Current airspeed in m/s (float) groundspeed : Current ground speed in m/s (float) heading : Current heading in degrees, in compass units (0..360, 0=north) (int16_t) throttle : Current throttle setting in integer percent, 0 to 100 (uint16_t) alt : Current altitude (MSL), in meters (float) climb : Current climb rate in meters/second (float)
def vfr_hud_encode(self, airspeed, groundspeed, heading, throttle, alt, climb): ''' Metrics typically displayed on a HUD for fixed wing aircraft airspeed : Current airspeed in m/s (float) groundspeed : Current ground speed in m/s (float) heading : Current heading in degrees, in compass units (0..360, 0=north) (int16_t) throttle : Current throttle setting in integer percent, 0 to 100 (uint16_t) alt : Current altitude (MSL), in meters (float) climb : Current climb rate in meters/second (float) ''' return MAVLink_vfr_hud_message(airspeed, groundspeed, heading, throttle, alt, climb)
Metrics typically displayed on a HUD for fixed wing aircraft airspeed : Current airspeed in m/s (float) groundspeed : Current ground speed in m/s (float) heading : Current heading in degrees, in compass units (0..360, 0=north) (int16_t) throttle : Current throttle setting in integer percent, 0 to 100 (uint16_t) alt : Current altitude (MSL), in meters (float) climb : Current climb rate in meters/second (float)
def vfr_hud_send(self, airspeed, groundspeed, heading, throttle, alt, climb, force_mavlink1=False): ''' Metrics typically displayed on a HUD for fixed wing aircraft airspeed : Current airspeed in m/s (float) groundspeed : Current ground speed in m/s (float) heading : Current heading in degrees, in compass units (0..360, 0=north) (int16_t) throttle : Current throttle setting in integer percent, 0 to 100 (uint16_t) alt : Current altitude (MSL), in meters (float) climb : Current climb rate in meters/second (float) ''' return self.send(self.vfr_hud_encode(airspeed, groundspeed, heading, throttle, alt, climb), force_mavlink1=force_mavlink1)
Message encoding a command with parameters as scaled integers. Scaling depends on the actual command value. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) frame : The coordinate system of the COMMAND. see MAV_FRAME in mavlink_types.h (uint8_t) command : The scheduled action for the mission item. see MAV_CMD in common.xml MAVLink specs (uint16_t) current : false:0, true:1 (uint8_t) autocontinue : autocontinue to next wp (uint8_t) param1 : PARAM1, see MAV_CMD enum (float) param2 : PARAM2, see MAV_CMD enum (float) param3 : PARAM3, see MAV_CMD enum (float) param4 : PARAM4, see MAV_CMD enum (float) x : PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7 (int32_t) y : PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7 (int32_t) z : PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame. (float)
def command_int_encode(self, target_system, target_component, frame, command, current, autocontinue, param1, param2, param3, param4, x, y, z): ''' Message encoding a command with parameters as scaled integers. Scaling depends on the actual command value. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) frame : The coordinate system of the COMMAND. see MAV_FRAME in mavlink_types.h (uint8_t) command : The scheduled action for the mission item. see MAV_CMD in common.xml MAVLink specs (uint16_t) current : false:0, true:1 (uint8_t) autocontinue : autocontinue to next wp (uint8_t) param1 : PARAM1, see MAV_CMD enum (float) param2 : PARAM2, see MAV_CMD enum (float) param3 : PARAM3, see MAV_CMD enum (float) param4 : PARAM4, see MAV_CMD enum (float) x : PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7 (int32_t) y : PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7 (int32_t) z : PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame. (float) ''' return MAVLink_command_int_message(target_system, target_component, frame, command, current, autocontinue, param1, param2, param3, param4, x, y, z)
Message encoding a command with parameters as scaled integers. Scaling depends on the actual command value. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) frame : The coordinate system of the COMMAND. see MAV_FRAME in mavlink_types.h (uint8_t) command : The scheduled action for the mission item. see MAV_CMD in common.xml MAVLink specs (uint16_t) current : false:0, true:1 (uint8_t) autocontinue : autocontinue to next wp (uint8_t) param1 : PARAM1, see MAV_CMD enum (float) param2 : PARAM2, see MAV_CMD enum (float) param3 : PARAM3, see MAV_CMD enum (float) param4 : PARAM4, see MAV_CMD enum (float) x : PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7 (int32_t) y : PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7 (int32_t) z : PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame. (float)
def command_int_send(self, target_system, target_component, frame, command, current, autocontinue, param1, param2, param3, param4, x, y, z, force_mavlink1=False): ''' Message encoding a command with parameters as scaled integers. Scaling depends on the actual command value. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) frame : The coordinate system of the COMMAND. see MAV_FRAME in mavlink_types.h (uint8_t) command : The scheduled action for the mission item. see MAV_CMD in common.xml MAVLink specs (uint16_t) current : false:0, true:1 (uint8_t) autocontinue : autocontinue to next wp (uint8_t) param1 : PARAM1, see MAV_CMD enum (float) param2 : PARAM2, see MAV_CMD enum (float) param3 : PARAM3, see MAV_CMD enum (float) param4 : PARAM4, see MAV_CMD enum (float) x : PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7 (int32_t) y : PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7 (int32_t) z : PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame. (float) ''' return 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)
Send a command with up to seven parameters to the MAV target_system : System which should execute the command (uint8_t) target_component : Component which should execute the command, 0 for all components (uint8_t) command : Command ID, as defined by MAV_CMD enum. (uint16_t) confirmation : 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command) (uint8_t) param1 : Parameter 1, as defined by MAV_CMD enum. (float) param2 : Parameter 2, as defined by MAV_CMD enum. (float) param3 : Parameter 3, as defined by MAV_CMD enum. (float) param4 : Parameter 4, as defined by MAV_CMD enum. (float) param5 : Parameter 5, as defined by MAV_CMD enum. (float) param6 : Parameter 6, as defined by MAV_CMD enum. (float) param7 : Parameter 7, as defined by MAV_CMD enum. (float)
def command_long_encode(self, target_system, target_component, command, confirmation, param1, param2, param3, param4, param5, param6, param7): ''' Send a command with up to seven parameters to the MAV target_system : System which should execute the command (uint8_t) target_component : Component which should execute the command, 0 for all components (uint8_t) command : Command ID, as defined by MAV_CMD enum. (uint16_t) confirmation : 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command) (uint8_t) param1 : Parameter 1, as defined by MAV_CMD enum. (float) param2 : Parameter 2, as defined by MAV_CMD enum. (float) param3 : Parameter 3, as defined by MAV_CMD enum. (float) param4 : Parameter 4, as defined by MAV_CMD enum. (float) param5 : Parameter 5, as defined by MAV_CMD enum. (float) param6 : Parameter 6, as defined by MAV_CMD enum. (float) param7 : Parameter 7, as defined by MAV_CMD enum. (float) ''' return MAVLink_command_long_message(target_system, target_component, command, confirmation, param1, param2, param3, param4, param5, param6, param7)
Send a command with up to seven parameters to the MAV target_system : System which should execute the command (uint8_t) target_component : Component which should execute the command, 0 for all components (uint8_t) command : Command ID, as defined by MAV_CMD enum. (uint16_t) confirmation : 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command) (uint8_t) param1 : Parameter 1, as defined by MAV_CMD enum. (float) param2 : Parameter 2, as defined by MAV_CMD enum. (float) param3 : Parameter 3, as defined by MAV_CMD enum. (float) param4 : Parameter 4, as defined by MAV_CMD enum. (float) param5 : Parameter 5, as defined by MAV_CMD enum. (float) param6 : Parameter 6, as defined by MAV_CMD enum. (float) param7 : Parameter 7, as defined by MAV_CMD enum. (float)
def command_long_send(self, target_system, target_component, command, confirmation, param1, param2, param3, param4, param5, param6, param7, force_mavlink1=False): ''' Send a command with up to seven parameters to the MAV target_system : System which should execute the command (uint8_t) target_component : Component which should execute the command, 0 for all components (uint8_t) command : Command ID, as defined by MAV_CMD enum. (uint16_t) confirmation : 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command) (uint8_t) param1 : Parameter 1, as defined by MAV_CMD enum. (float) param2 : Parameter 2, as defined by MAV_CMD enum. (float) param3 : Parameter 3, as defined by MAV_CMD enum. (float) param4 : Parameter 4, as defined by MAV_CMD enum. (float) param5 : Parameter 5, as defined by MAV_CMD enum. (float) param6 : Parameter 6, as defined by MAV_CMD enum. (float) param7 : Parameter 7, as defined by MAV_CMD enum. (float) ''' return self.send(self.command_long_encode(target_system, target_component, command, confirmation, param1, param2, param3, param4, param5, param6, param7), force_mavlink1=force_mavlink1)
Report status of a command. Includes feedback wether the command was executed. command : Command ID, as defined by MAV_CMD enum. (uint16_t) result : See MAV_RESULT enum (uint8_t)
def command_ack_send(self, command, result, force_mavlink1=False): ''' Report status of a command. Includes feedback wether the command was executed. command : Command ID, as defined by MAV_CMD enum. (uint16_t) result : See MAV_RESULT enum (uint8_t) ''' return self.send(self.command_ack_encode(command, result), force_mavlink1=force_mavlink1)
Setpoint in roll, pitch, yaw and thrust from the operator time_boot_ms : Timestamp in milliseconds since system boot (uint32_t) roll : Desired roll rate in radians per second (float) pitch : Desired pitch rate in radians per second (float) yaw : Desired yaw rate in radians per second (float) thrust : Collective thrust, normalized to 0 .. 1 (float) mode_switch : Flight mode switch position, 0.. 255 (uint8_t) manual_override_switch : Override mode switch position, 0.. 255 (uint8_t)
def manual_setpoint_encode(self, time_boot_ms, roll, pitch, yaw, thrust, mode_switch, manual_override_switch): ''' Setpoint in roll, pitch, yaw and thrust from the operator time_boot_ms : Timestamp in milliseconds since system boot (uint32_t) roll : Desired roll rate in radians per second (float) pitch : Desired pitch rate in radians per second (float) yaw : Desired yaw rate in radians per second (float) thrust : Collective thrust, normalized to 0 .. 1 (float) mode_switch : Flight mode switch position, 0.. 255 (uint8_t) manual_override_switch : Override mode switch position, 0.. 255 (uint8_t) ''' return MAVLink_manual_setpoint_message(time_boot_ms, roll, pitch, yaw, thrust, mode_switch, manual_override_switch)
Setpoint in roll, pitch, yaw and thrust from the operator time_boot_ms : Timestamp in milliseconds since system boot (uint32_t) roll : Desired roll rate in radians per second (float) pitch : Desired pitch rate in radians per second (float) yaw : Desired yaw rate in radians per second (float) thrust : Collective thrust, normalized to 0 .. 1 (float) mode_switch : Flight mode switch position, 0.. 255 (uint8_t) manual_override_switch : Override mode switch position, 0.. 255 (uint8_t)
def manual_setpoint_send(self, time_boot_ms, roll, pitch, yaw, thrust, mode_switch, manual_override_switch, force_mavlink1=False): ''' Setpoint in roll, pitch, yaw and thrust from the operator time_boot_ms : Timestamp in milliseconds since system boot (uint32_t) roll : Desired roll rate in radians per second (float) pitch : Desired pitch rate in radians per second (float) yaw : Desired yaw rate in radians per second (float) thrust : Collective thrust, normalized to 0 .. 1 (float) mode_switch : Flight mode switch position, 0.. 255 (uint8_t) manual_override_switch : Override mode switch position, 0.. 255 (uint8_t) ''' return self.send(self.manual_setpoint_encode(time_boot_ms, roll, pitch, yaw, thrust, mode_switch, manual_override_switch), force_mavlink1=force_mavlink1)
Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system). time_boot_ms : Timestamp in milliseconds since system boot (uint32_t) target_system : System ID (uint8_t) target_component : Component ID (uint8_t) type_mask : Mappings: If any of these bits are set, the corresponding input should be ignored: bit 1: body roll rate, bit 2: body pitch rate, bit 3: body yaw rate. bit 4-bit 6: reserved, bit 7: throttle, bit 8: attitude (uint8_t) q : Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) (float) body_roll_rate : Body roll rate in radians per second (float) body_pitch_rate : Body roll rate in radians per second (float) body_yaw_rate : Body roll rate in radians per second (float) thrust : Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust) (float)
def set_attitude_target_encode(self, time_boot_ms, target_system, target_component, type_mask, q, body_roll_rate, body_pitch_rate, body_yaw_rate, thrust): ''' Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system). time_boot_ms : Timestamp in milliseconds since system boot (uint32_t) target_system : System ID (uint8_t) target_component : Component ID (uint8_t) type_mask : Mappings: If any of these bits are set, the corresponding input should be ignored: bit 1: body roll rate, bit 2: body pitch rate, bit 3: body yaw rate. bit 4-bit 6: reserved, bit 7: throttle, bit 8: attitude (uint8_t) q : Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) (float) body_roll_rate : Body roll rate in radians per second (float) body_pitch_rate : Body roll rate in radians per second (float) body_yaw_rate : Body roll rate in radians per second (float) thrust : Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust) (float) ''' return MAVLink_set_attitude_target_message(time_boot_ms, target_system, target_component, type_mask, q, body_roll_rate, body_pitch_rate, body_yaw_rate, thrust)
Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system). time_boot_ms : Timestamp in milliseconds since system boot (uint32_t) target_system : System ID (uint8_t) target_component : Component ID (uint8_t) type_mask : Mappings: If any of these bits are set, the corresponding input should be ignored: bit 1: body roll rate, bit 2: body pitch rate, bit 3: body yaw rate. bit 4-bit 6: reserved, bit 7: throttle, bit 8: attitude (uint8_t) q : Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) (float) body_roll_rate : Body roll rate in radians per second (float) body_pitch_rate : Body roll rate in radians per second (float) body_yaw_rate : Body roll rate in radians per second (float) thrust : Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust) (float)
def set_attitude_target_send(self, time_boot_ms, target_system, target_component, type_mask, q, body_roll_rate, body_pitch_rate, body_yaw_rate, thrust, force_mavlink1=False): ''' Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system). time_boot_ms : Timestamp in milliseconds since system boot (uint32_t) target_system : System ID (uint8_t) target_component : Component ID (uint8_t) type_mask : Mappings: If any of these bits are set, the corresponding input should be ignored: bit 1: body roll rate, bit 2: body pitch rate, bit 3: body yaw rate. bit 4-bit 6: reserved, bit 7: throttle, bit 8: attitude (uint8_t) q : Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) (float) body_roll_rate : Body roll rate in radians per second (float) body_pitch_rate : Body roll rate in radians per second (float) body_yaw_rate : Body roll rate in radians per second (float) thrust : Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust) (float) ''' return self.send(self.set_attitude_target_encode(time_boot_ms, target_system, target_component, type_mask, q, body_roll_rate, body_pitch_rate, body_yaw_rate, thrust), force_mavlink1=force_mavlink1)
Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way. time_boot_ms : Timestamp in milliseconds since system boot (uint32_t) type_mask : Mappings: If any of these bits are set, the corresponding input should be ignored: bit 1: body roll rate, bit 2: body pitch rate, bit 3: body yaw rate. bit 4-bit 7: reserved, bit 8: attitude (uint8_t) q : Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) (float) body_roll_rate : Body roll rate in radians per second (float) body_pitch_rate : Body roll rate in radians per second (float) body_yaw_rate : Body roll rate in radians per second (float) thrust : Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust) (float)
def attitude_target_encode(self, time_boot_ms, type_mask, q, body_roll_rate, body_pitch_rate, body_yaw_rate, thrust): ''' Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way. time_boot_ms : Timestamp in milliseconds since system boot (uint32_t) type_mask : Mappings: If any of these bits are set, the corresponding input should be ignored: bit 1: body roll rate, bit 2: body pitch rate, bit 3: body yaw rate. bit 4-bit 7: reserved, bit 8: attitude (uint8_t) q : Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) (float) body_roll_rate : Body roll rate in radians per second (float) body_pitch_rate : Body roll rate in radians per second (float) body_yaw_rate : Body roll rate in radians per second (float) thrust : Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust) (float) ''' return MAVLink_attitude_target_message(time_boot_ms, type_mask, q, body_roll_rate, body_pitch_rate, body_yaw_rate, thrust)
Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way. time_boot_ms : Timestamp in milliseconds since system boot (uint32_t) type_mask : Mappings: If any of these bits are set, the corresponding input should be ignored: bit 1: body roll rate, bit 2: body pitch rate, bit 3: body yaw rate. bit 4-bit 7: reserved, bit 8: attitude (uint8_t) q : Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) (float) body_roll_rate : Body roll rate in radians per second (float) body_pitch_rate : Body roll rate in radians per second (float) body_yaw_rate : Body roll rate in radians per second (float) thrust : Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust) (float)
def attitude_target_send(self, time_boot_ms, type_mask, q, body_roll_rate, body_pitch_rate, body_yaw_rate, thrust, force_mavlink1=False): ''' Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way. time_boot_ms : Timestamp in milliseconds since system boot (uint32_t) type_mask : Mappings: If any of these bits are set, the corresponding input should be ignored: bit 1: body roll rate, bit 2: body pitch rate, bit 3: body yaw rate. bit 4-bit 7: reserved, bit 8: attitude (uint8_t) q : Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) (float) body_roll_rate : Body roll rate in radians per second (float) body_pitch_rate : Body roll rate in radians per second (float) body_yaw_rate : Body roll rate in radians per second (float) thrust : Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust) (float) ''' return self.send(self.attitude_target_encode(time_boot_ms, type_mask, q, body_roll_rate, body_pitch_rate, body_yaw_rate, thrust), force_mavlink1=force_mavlink1)
Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system). time_boot_ms : Timestamp in milliseconds since system boot (uint32_t) target_system : System ID (uint8_t) target_component : Component ID (uint8_t) coordinate_frame : Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9 (uint8_t) type_mask : Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate (uint16_t) x : X Position in NED frame in meters (float) y : Y Position in NED frame in meters (float) z : Z Position in NED frame in meters (note, altitude is negative in NED) (float) vx : X velocity in NED frame in meter / s (float) vy : Y velocity in NED frame in meter / s (float) vz : Z velocity in NED frame in meter / s (float) afx : X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afy : Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afz : Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) yaw : yaw setpoint in rad (float) yaw_rate : yaw rate setpoint in rad/s (float)
def set_position_target_local_ned_encode(self, time_boot_ms, target_system, target_component, coordinate_frame, type_mask, x, y, z, vx, vy, vz, afx, afy, afz, yaw, yaw_rate): ''' Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system). time_boot_ms : Timestamp in milliseconds since system boot (uint32_t) target_system : System ID (uint8_t) target_component : Component ID (uint8_t) coordinate_frame : Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9 (uint8_t) type_mask : Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate (uint16_t) x : X Position in NED frame in meters (float) y : Y Position in NED frame in meters (float) z : Z Position in NED frame in meters (note, altitude is negative in NED) (float) vx : X velocity in NED frame in meter / s (float) vy : Y velocity in NED frame in meter / s (float) vz : Z velocity in NED frame in meter / s (float) afx : X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afy : Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afz : Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) yaw : yaw setpoint in rad (float) yaw_rate : yaw rate setpoint in rad/s (float) ''' return MAVLink_set_position_target_local_ned_message(time_boot_ms, target_system, target_component, coordinate_frame, type_mask, x, y, z, vx, vy, vz, afx, afy, afz, yaw, yaw_rate)
Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system). time_boot_ms : Timestamp in milliseconds since system boot (uint32_t) target_system : System ID (uint8_t) target_component : Component ID (uint8_t) coordinate_frame : Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9 (uint8_t) type_mask : Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate (uint16_t) x : X Position in NED frame in meters (float) y : Y Position in NED frame in meters (float) z : Z Position in NED frame in meters (note, altitude is negative in NED) (float) vx : X velocity in NED frame in meter / s (float) vy : Y velocity in NED frame in meter / s (float) vz : Z velocity in NED frame in meter / s (float) afx : X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afy : Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afz : Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) yaw : yaw setpoint in rad (float) yaw_rate : yaw rate setpoint in rad/s (float)
def set_position_target_local_ned_send(self, time_boot_ms, target_system, target_component, coordinate_frame, type_mask, x, y, z, vx, vy, vz, afx, afy, afz, yaw, yaw_rate, force_mavlink1=False): ''' Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system). time_boot_ms : Timestamp in milliseconds since system boot (uint32_t) target_system : System ID (uint8_t) target_component : Component ID (uint8_t) coordinate_frame : Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9 (uint8_t) type_mask : Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate (uint16_t) x : X Position in NED frame in meters (float) y : Y Position in NED frame in meters (float) z : Z Position in NED frame in meters (note, altitude is negative in NED) (float) vx : X velocity in NED frame in meter / s (float) vy : Y velocity in NED frame in meter / s (float) vz : Z velocity in NED frame in meter / s (float) afx : X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afy : Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afz : Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) yaw : yaw setpoint in rad (float) yaw_rate : yaw rate setpoint in rad/s (float) ''' return self.send(self.set_position_target_local_ned_encode(time_boot_ms, target_system, target_component, coordinate_frame, type_mask, x, y, z, vx, vy, vz, afx, afy, afz, yaw, yaw_rate), force_mavlink1=force_mavlink1)
Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way. time_boot_ms : Timestamp in milliseconds since system boot (uint32_t) coordinate_frame : Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9 (uint8_t) type_mask : Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate (uint16_t) x : X Position in NED frame in meters (float) y : Y Position in NED frame in meters (float) z : Z Position in NED frame in meters (note, altitude is negative in NED) (float) vx : X velocity in NED frame in meter / s (float) vy : Y velocity in NED frame in meter / s (float) vz : Z velocity in NED frame in meter / s (float) afx : X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afy : Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afz : Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) yaw : yaw setpoint in rad (float) yaw_rate : yaw rate setpoint in rad/s (float)
def position_target_local_ned_encode(self, time_boot_ms, coordinate_frame, type_mask, x, y, z, vx, vy, vz, afx, afy, afz, yaw, yaw_rate): ''' Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way. time_boot_ms : Timestamp in milliseconds since system boot (uint32_t) coordinate_frame : Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9 (uint8_t) type_mask : Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate (uint16_t) x : X Position in NED frame in meters (float) y : Y Position in NED frame in meters (float) z : Z Position in NED frame in meters (note, altitude is negative in NED) (float) vx : X velocity in NED frame in meter / s (float) vy : Y velocity in NED frame in meter / s (float) vz : Z velocity in NED frame in meter / s (float) afx : X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afy : Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afz : Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) yaw : yaw setpoint in rad (float) yaw_rate : yaw rate setpoint in rad/s (float) ''' return MAVLink_position_target_local_ned_message(time_boot_ms, coordinate_frame, type_mask, x, y, z, vx, vy, vz, afx, afy, afz, yaw, yaw_rate)
Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way. time_boot_ms : Timestamp in milliseconds since system boot (uint32_t) coordinate_frame : Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9 (uint8_t) type_mask : Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate (uint16_t) x : X Position in NED frame in meters (float) y : Y Position in NED frame in meters (float) z : Z Position in NED frame in meters (note, altitude is negative in NED) (float) vx : X velocity in NED frame in meter / s (float) vy : Y velocity in NED frame in meter / s (float) vz : Z velocity in NED frame in meter / s (float) afx : X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afy : Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afz : Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) yaw : yaw setpoint in rad (float) yaw_rate : yaw rate setpoint in rad/s (float)
def position_target_local_ned_send(self, time_boot_ms, coordinate_frame, type_mask, x, y, z, vx, vy, vz, afx, afy, afz, yaw, yaw_rate, force_mavlink1=False): ''' Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way. time_boot_ms : Timestamp in milliseconds since system boot (uint32_t) coordinate_frame : Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9 (uint8_t) type_mask : Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate (uint16_t) x : X Position in NED frame in meters (float) y : Y Position in NED frame in meters (float) z : Z Position in NED frame in meters (note, altitude is negative in NED) (float) vx : X velocity in NED frame in meter / s (float) vy : Y velocity in NED frame in meter / s (float) vz : Z velocity in NED frame in meter / s (float) afx : X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afy : Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afz : Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) yaw : yaw setpoint in rad (float) yaw_rate : yaw rate setpoint in rad/s (float) ''' return self.send(self.position_target_local_ned_encode(time_boot_ms, coordinate_frame, type_mask, x, y, z, vx, vy, vz, afx, afy, afz, yaw, yaw_rate), force_mavlink1=force_mavlink1)
Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system). time_boot_ms : Timestamp in milliseconds 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. (uint32_t) target_system : System ID (uint8_t) target_component : Component ID (uint8_t) coordinate_frame : Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11 (uint8_t) type_mask : Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate (uint16_t) lat_int : X Position in WGS84 frame in 1e7 * meters (int32_t) lon_int : Y Position in WGS84 frame in 1e7 * meters (int32_t) alt : Altitude in meters in AMSL altitude, not WGS84 if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT (float) vx : X velocity in NED frame in meter / s (float) vy : Y velocity in NED frame in meter / s (float) vz : Z velocity in NED frame in meter / s (float) afx : X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afy : Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afz : Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) yaw : yaw setpoint in rad (float) yaw_rate : yaw rate setpoint in rad/s (float)
def set_position_target_global_int_encode(self, time_boot_ms, target_system, target_component, coordinate_frame, type_mask, lat_int, lon_int, alt, vx, vy, vz, afx, afy, afz, yaw, yaw_rate): ''' Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system). time_boot_ms : Timestamp in milliseconds 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. (uint32_t) target_system : System ID (uint8_t) target_component : Component ID (uint8_t) coordinate_frame : Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11 (uint8_t) type_mask : Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate (uint16_t) lat_int : X Position in WGS84 frame in 1e7 * meters (int32_t) lon_int : Y Position in WGS84 frame in 1e7 * meters (int32_t) alt : Altitude in meters in AMSL altitude, not WGS84 if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT (float) vx : X velocity in NED frame in meter / s (float) vy : Y velocity in NED frame in meter / s (float) vz : Z velocity in NED frame in meter / s (float) afx : X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afy : Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afz : Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) yaw : yaw setpoint in rad (float) yaw_rate : yaw rate setpoint in rad/s (float) ''' return MAVLink_set_position_target_global_int_message(time_boot_ms, target_system, target_component, coordinate_frame, type_mask, lat_int, lon_int, alt, vx, vy, vz, afx, afy, afz, yaw, yaw_rate)
Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system). time_boot_ms : Timestamp in milliseconds 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. (uint32_t) target_system : System ID (uint8_t) target_component : Component ID (uint8_t) coordinate_frame : Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11 (uint8_t) type_mask : Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate (uint16_t) lat_int : X Position in WGS84 frame in 1e7 * meters (int32_t) lon_int : Y Position in WGS84 frame in 1e7 * meters (int32_t) alt : Altitude in meters in AMSL altitude, not WGS84 if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT (float) vx : X velocity in NED frame in meter / s (float) vy : Y velocity in NED frame in meter / s (float) vz : Z velocity in NED frame in meter / s (float) afx : X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afy : Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afz : Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) yaw : yaw setpoint in rad (float) yaw_rate : yaw rate setpoint in rad/s (float)
def set_position_target_global_int_send(self, time_boot_ms, target_system, target_component, coordinate_frame, type_mask, lat_int, lon_int, alt, vx, vy, vz, afx, afy, afz, yaw, yaw_rate, force_mavlink1=False): ''' Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system). time_boot_ms : Timestamp in milliseconds 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. (uint32_t) target_system : System ID (uint8_t) target_component : Component ID (uint8_t) coordinate_frame : Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11 (uint8_t) type_mask : Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate (uint16_t) lat_int : X Position in WGS84 frame in 1e7 * meters (int32_t) lon_int : Y Position in WGS84 frame in 1e7 * meters (int32_t) alt : Altitude in meters in AMSL altitude, not WGS84 if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT (float) vx : X velocity in NED frame in meter / s (float) vy : Y velocity in NED frame in meter / s (float) vz : Z velocity in NED frame in meter / s (float) afx : X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afy : Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afz : Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) yaw : yaw setpoint in rad (float) yaw_rate : yaw rate setpoint in rad/s (float) ''' return self.send(self.set_position_target_global_int_encode(time_boot_ms, target_system, target_component, coordinate_frame, type_mask, lat_int, lon_int, alt, vx, vy, vz, afx, afy, afz, yaw, yaw_rate), force_mavlink1=force_mavlink1)
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 in milliseconds 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. (uint32_t) coordinate_frame : Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11 (uint8_t) type_mask : Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate (uint16_t) lat_int : X Position in WGS84 frame in 1e7 * meters (int32_t) lon_int : Y Position in WGS84 frame in 1e7 * meters (int32_t) alt : Altitude in meters in AMSL altitude, not WGS84 if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT (float) vx : X velocity in NED frame in meter / s (float) vy : Y velocity in NED frame in meter / s (float) vz : Z velocity in NED frame in meter / s (float) afx : X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afy : Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afz : Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) yaw : yaw setpoint in rad (float) yaw_rate : yaw rate setpoint in rad/s (float)
def position_target_global_int_encode(self, time_boot_ms, coordinate_frame, type_mask, lat_int, lon_int, alt, vx, vy, vz, afx, afy, afz, yaw, yaw_rate): ''' 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 in milliseconds 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. (uint32_t) coordinate_frame : Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11 (uint8_t) type_mask : Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate (uint16_t) lat_int : X Position in WGS84 frame in 1e7 * meters (int32_t) lon_int : Y Position in WGS84 frame in 1e7 * meters (int32_t) alt : Altitude in meters in AMSL altitude, not WGS84 if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT (float) vx : X velocity in NED frame in meter / s (float) vy : Y velocity in NED frame in meter / s (float) vz : Z velocity in NED frame in meter / s (float) afx : X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afy : Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afz : Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) yaw : yaw setpoint in rad (float) yaw_rate : yaw rate setpoint in rad/s (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)
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 in milliseconds 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. (uint32_t) coordinate_frame : Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11 (uint8_t) type_mask : Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate (uint16_t) lat_int : X Position in WGS84 frame in 1e7 * meters (int32_t) lon_int : Y Position in WGS84 frame in 1e7 * meters (int32_t) alt : Altitude in meters in AMSL altitude, not WGS84 if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT (float) vx : X velocity in NED frame in meter / s (float) vy : Y velocity in NED frame in meter / s (float) vz : Z velocity in NED frame in meter / s (float) afx : X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afy : Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afz : Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) yaw : yaw setpoint in rad (float) yaw_rate : yaw rate setpoint in rad/s (float)
def position_target_global_int_send(self, time_boot_ms, coordinate_frame, type_mask, lat_int, lon_int, alt, vx, vy, vz, afx, afy, afz, yaw, yaw_rate, force_mavlink1=False): ''' 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 in milliseconds 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. (uint32_t) coordinate_frame : Valid options are: MAV_FRAME_GLOBAL_INT = 5, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11 (uint8_t) type_mask : Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate (uint16_t) lat_int : X Position in WGS84 frame in 1e7 * meters (int32_t) lon_int : Y Position in WGS84 frame in 1e7 * meters (int32_t) alt : Altitude in meters in AMSL altitude, not WGS84 if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT (float) vx : X velocity in NED frame in meter / s (float) vy : Y velocity in NED frame in meter / s (float) vz : Z velocity in NED frame in meter / s (float) afx : X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afy : Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) afz : Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N (float) yaw : yaw setpoint in rad (float) yaw_rate : yaw rate setpoint in rad/s (float) ''' return 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)
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 (milliseconds since system boot) (uint32_t) x : X Position (float) y : Y Position (float) z : Z Position (float) roll : Roll (float) pitch : Pitch (float) yaw : Yaw (float)
def local_position_ned_system_global_offset_encode(self, time_boot_ms, x, y, z, roll, pitch, yaw): ''' 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 (milliseconds since system boot) (uint32_t) x : X Position (float) y : Y Position (float) z : Z Position (float) roll : Roll (float) pitch : Pitch (float) yaw : Yaw (float) ''' return MAVLink_local_position_ned_system_global_offset_message(time_boot_ms, x, y, z, roll, pitch, yaw)
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 (milliseconds since system boot) (uint32_t) x : X Position (float) y : Y Position (float) z : Z Position (float) roll : Roll (float) pitch : Pitch (float) yaw : Yaw (float)
def local_position_ned_system_global_offset_send(self, time_boot_ms, x, y, z, roll, pitch, yaw, force_mavlink1=False): ''' 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 (milliseconds since system boot) (uint32_t) x : X Position (float) y : Y Position (float) z : Z Position (float) roll : Roll (float) pitch : Pitch (float) yaw : Yaw (float) ''' return self.send(self.local_position_ned_system_global_offset_encode(time_boot_ms, x, y, z, roll, pitch, yaw), force_mavlink1=force_mavlink1)
DEPRECATED PACKET! Suffers from missing airspeed fields and singularities due to Euler angles. Please use HIL_STATE_QUATERNION instead. Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations. time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) roll : Roll angle (rad) (float) pitch : Pitch angle (rad) (float) yaw : Yaw angle (rad) (float) rollspeed : Body frame roll / phi angular speed (rad/s) (float) pitchspeed : Body frame pitch / theta angular speed (rad/s) (float) yawspeed : Body frame yaw / psi angular speed (rad/s) (float) lat : Latitude, expressed as * 1E7 (int32_t) lon : Longitude, expressed as * 1E7 (int32_t) alt : Altitude in meters, expressed as * 1000 (millimeters) (int32_t) vx : Ground X Speed (Latitude), expressed as m/s * 100 (int16_t) vy : Ground Y Speed (Longitude), expressed as m/s * 100 (int16_t) vz : Ground Z Speed (Altitude), expressed as m/s * 100 (int16_t) xacc : X acceleration (mg) (int16_t) yacc : Y acceleration (mg) (int16_t) zacc : Z acceleration (mg) (int16_t)
def hil_state_encode(self, time_usec, roll, pitch, yaw, rollspeed, pitchspeed, yawspeed, lat, lon, alt, vx, vy, vz, xacc, yacc, zacc): ''' DEPRECATED PACKET! Suffers from missing airspeed fields and singularities due to Euler angles. Please use HIL_STATE_QUATERNION instead. Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations. time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) roll : Roll angle (rad) (float) pitch : Pitch angle (rad) (float) yaw : Yaw angle (rad) (float) rollspeed : Body frame roll / phi angular speed (rad/s) (float) pitchspeed : Body frame pitch / theta angular speed (rad/s) (float) yawspeed : Body frame yaw / psi angular speed (rad/s) (float) lat : Latitude, expressed as * 1E7 (int32_t) lon : Longitude, expressed as * 1E7 (int32_t) alt : Altitude in meters, expressed as * 1000 (millimeters) (int32_t) vx : Ground X Speed (Latitude), expressed as m/s * 100 (int16_t) vy : Ground Y Speed (Longitude), expressed as m/s * 100 (int16_t) vz : Ground Z Speed (Altitude), expressed as m/s * 100 (int16_t) xacc : X acceleration (mg) (int16_t) yacc : Y acceleration (mg) (int16_t) zacc : Z acceleration (mg) (int16_t) ''' return MAVLink_hil_state_message(time_usec, roll, pitch, yaw, rollspeed, pitchspeed, yawspeed, lat, lon, alt, vx, vy, vz, xacc, yacc, zacc)
DEPRECATED PACKET! Suffers from missing airspeed fields and singularities due to Euler angles. Please use HIL_STATE_QUATERNION instead. Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations. time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) roll : Roll angle (rad) (float) pitch : Pitch angle (rad) (float) yaw : Yaw angle (rad) (float) rollspeed : Body frame roll / phi angular speed (rad/s) (float) pitchspeed : Body frame pitch / theta angular speed (rad/s) (float) yawspeed : Body frame yaw / psi angular speed (rad/s) (float) lat : Latitude, expressed as * 1E7 (int32_t) lon : Longitude, expressed as * 1E7 (int32_t) alt : Altitude in meters, expressed as * 1000 (millimeters) (int32_t) vx : Ground X Speed (Latitude), expressed as m/s * 100 (int16_t) vy : Ground Y Speed (Longitude), expressed as m/s * 100 (int16_t) vz : Ground Z Speed (Altitude), expressed as m/s * 100 (int16_t) xacc : X acceleration (mg) (int16_t) yacc : Y acceleration (mg) (int16_t) zacc : Z acceleration (mg) (int16_t)
def hil_state_send(self, time_usec, roll, pitch, yaw, rollspeed, pitchspeed, yawspeed, lat, lon, alt, vx, vy, vz, xacc, yacc, zacc, force_mavlink1=False): ''' DEPRECATED PACKET! Suffers from missing airspeed fields and singularities due to Euler angles. Please use HIL_STATE_QUATERNION instead. Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations. time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) roll : Roll angle (rad) (float) pitch : Pitch angle (rad) (float) yaw : Yaw angle (rad) (float) rollspeed : Body frame roll / phi angular speed (rad/s) (float) pitchspeed : Body frame pitch / theta angular speed (rad/s) (float) yawspeed : Body frame yaw / psi angular speed (rad/s) (float) lat : Latitude, expressed as * 1E7 (int32_t) lon : Longitude, expressed as * 1E7 (int32_t) alt : Altitude in meters, expressed as * 1000 (millimeters) (int32_t) vx : Ground X Speed (Latitude), expressed as m/s * 100 (int16_t) vy : Ground Y Speed (Longitude), expressed as m/s * 100 (int16_t) vz : Ground Z Speed (Altitude), expressed as m/s * 100 (int16_t) xacc : X acceleration (mg) (int16_t) yacc : Y acceleration (mg) (int16_t) zacc : Z acceleration (mg) (int16_t) ''' return self.send(self.hil_state_encode(time_usec, roll, pitch, yaw, rollspeed, pitchspeed, yawspeed, lat, lon, alt, vx, vy, vz, xacc, yacc, zacc), force_mavlink1=force_mavlink1)
Sent from autopilot to simulation. Hardware in the loop control outputs time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) roll_ailerons : Control output -1 .. 1 (float) pitch_elevator : Control output -1 .. 1 (float) yaw_rudder : Control output -1 .. 1 (float) throttle : Throttle 0 .. 1 (float) aux1 : Aux 1, -1 .. 1 (float) aux2 : Aux 2, -1 .. 1 (float) aux3 : Aux 3, -1 .. 1 (float) aux4 : Aux 4, -1 .. 1 (float) mode : System mode (MAV_MODE) (uint8_t) nav_mode : Navigation mode (MAV_NAV_MODE) (uint8_t)
def hil_controls_encode(self, time_usec, roll_ailerons, pitch_elevator, yaw_rudder, throttle, aux1, aux2, aux3, aux4, mode, nav_mode): ''' Sent from autopilot to simulation. Hardware in the loop control outputs time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) roll_ailerons : Control output -1 .. 1 (float) pitch_elevator : Control output -1 .. 1 (float) yaw_rudder : Control output -1 .. 1 (float) throttle : Throttle 0 .. 1 (float) aux1 : Aux 1, -1 .. 1 (float) aux2 : Aux 2, -1 .. 1 (float) aux3 : Aux 3, -1 .. 1 (float) aux4 : Aux 4, -1 .. 1 (float) mode : System mode (MAV_MODE) (uint8_t) nav_mode : Navigation mode (MAV_NAV_MODE) (uint8_t) ''' return MAVLink_hil_controls_message(time_usec, roll_ailerons, pitch_elevator, yaw_rudder, throttle, aux1, aux2, aux3, aux4, mode, nav_mode)
Sent from autopilot to simulation. Hardware in the loop control outputs time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) roll_ailerons : Control output -1 .. 1 (float) pitch_elevator : Control output -1 .. 1 (float) yaw_rudder : Control output -1 .. 1 (float) throttle : Throttle 0 .. 1 (float) aux1 : Aux 1, -1 .. 1 (float) aux2 : Aux 2, -1 .. 1 (float) aux3 : Aux 3, -1 .. 1 (float) aux4 : Aux 4, -1 .. 1 (float) mode : System mode (MAV_MODE) (uint8_t) nav_mode : Navigation mode (MAV_NAV_MODE) (uint8_t)
def hil_controls_send(self, time_usec, roll_ailerons, pitch_elevator, yaw_rudder, throttle, aux1, aux2, aux3, aux4, mode, nav_mode, force_mavlink1=False): ''' Sent from autopilot to simulation. Hardware in the loop control outputs time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) roll_ailerons : Control output -1 .. 1 (float) pitch_elevator : Control output -1 .. 1 (float) yaw_rudder : Control output -1 .. 1 (float) throttle : Throttle 0 .. 1 (float) aux1 : Aux 1, -1 .. 1 (float) aux2 : Aux 2, -1 .. 1 (float) aux3 : Aux 3, -1 .. 1 (float) aux4 : Aux 4, -1 .. 1 (float) mode : System mode (MAV_MODE) (uint8_t) nav_mode : Navigation mode (MAV_NAV_MODE) (uint8_t) ''' return self.send(self.hil_controls_encode(time_usec, roll_ailerons, pitch_elevator, yaw_rudder, throttle, aux1, aux2, aux3, aux4, mode, nav_mode), force_mavlink1=force_mavlink1)
Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification. time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) chan1_raw : RC channel 1 value, in microseconds (uint16_t) chan2_raw : RC channel 2 value, in microseconds (uint16_t) chan3_raw : RC channel 3 value, in microseconds (uint16_t) chan4_raw : RC channel 4 value, in microseconds (uint16_t) chan5_raw : RC channel 5 value, in microseconds (uint16_t) chan6_raw : RC channel 6 value, in microseconds (uint16_t) chan7_raw : RC channel 7 value, in microseconds (uint16_t) chan8_raw : RC channel 8 value, in microseconds (uint16_t) chan9_raw : RC channel 9 value, in microseconds (uint16_t) chan10_raw : RC channel 10 value, in microseconds (uint16_t) chan11_raw : RC channel 11 value, in microseconds (uint16_t) chan12_raw : RC channel 12 value, in microseconds (uint16_t) rssi : Receive signal strength indicator, 0: 0%, 255: 100% (uint8_t)
def hil_rc_inputs_raw_encode(self, time_usec, chan1_raw, chan2_raw, chan3_raw, chan4_raw, chan5_raw, chan6_raw, chan7_raw, chan8_raw, chan9_raw, chan10_raw, chan11_raw, chan12_raw, rssi): ''' Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification. time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) chan1_raw : RC channel 1 value, in microseconds (uint16_t) chan2_raw : RC channel 2 value, in microseconds (uint16_t) chan3_raw : RC channel 3 value, in microseconds (uint16_t) chan4_raw : RC channel 4 value, in microseconds (uint16_t) chan5_raw : RC channel 5 value, in microseconds (uint16_t) chan6_raw : RC channel 6 value, in microseconds (uint16_t) chan7_raw : RC channel 7 value, in microseconds (uint16_t) chan8_raw : RC channel 8 value, in microseconds (uint16_t) chan9_raw : RC channel 9 value, in microseconds (uint16_t) chan10_raw : RC channel 10 value, in microseconds (uint16_t) chan11_raw : RC channel 11 value, in microseconds (uint16_t) chan12_raw : RC channel 12 value, in microseconds (uint16_t) rssi : Receive signal strength indicator, 0: 0%, 255: 100% (uint8_t) ''' return MAVLink_hil_rc_inputs_raw_message(time_usec, chan1_raw, chan2_raw, chan3_raw, chan4_raw, chan5_raw, chan6_raw, chan7_raw, chan8_raw, chan9_raw, chan10_raw, chan11_raw, chan12_raw, rssi)
Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification. time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) chan1_raw : RC channel 1 value, in microseconds (uint16_t) chan2_raw : RC channel 2 value, in microseconds (uint16_t) chan3_raw : RC channel 3 value, in microseconds (uint16_t) chan4_raw : RC channel 4 value, in microseconds (uint16_t) chan5_raw : RC channel 5 value, in microseconds (uint16_t) chan6_raw : RC channel 6 value, in microseconds (uint16_t) chan7_raw : RC channel 7 value, in microseconds (uint16_t) chan8_raw : RC channel 8 value, in microseconds (uint16_t) chan9_raw : RC channel 9 value, in microseconds (uint16_t) chan10_raw : RC channel 10 value, in microseconds (uint16_t) chan11_raw : RC channel 11 value, in microseconds (uint16_t) chan12_raw : RC channel 12 value, in microseconds (uint16_t) rssi : Receive signal strength indicator, 0: 0%, 255: 100% (uint8_t)
def hil_rc_inputs_raw_send(self, time_usec, chan1_raw, chan2_raw, chan3_raw, chan4_raw, chan5_raw, chan6_raw, chan7_raw, chan8_raw, chan9_raw, chan10_raw, chan11_raw, chan12_raw, rssi, force_mavlink1=False): ''' Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification. time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) chan1_raw : RC channel 1 value, in microseconds (uint16_t) chan2_raw : RC channel 2 value, in microseconds (uint16_t) chan3_raw : RC channel 3 value, in microseconds (uint16_t) chan4_raw : RC channel 4 value, in microseconds (uint16_t) chan5_raw : RC channel 5 value, in microseconds (uint16_t) chan6_raw : RC channel 6 value, in microseconds (uint16_t) chan7_raw : RC channel 7 value, in microseconds (uint16_t) chan8_raw : RC channel 8 value, in microseconds (uint16_t) chan9_raw : RC channel 9 value, in microseconds (uint16_t) chan10_raw : RC channel 10 value, in microseconds (uint16_t) chan11_raw : RC channel 11 value, in microseconds (uint16_t) chan12_raw : RC channel 12 value, in microseconds (uint16_t) rssi : Receive signal strength indicator, 0: 0%, 255: 100% (uint8_t) ''' return self.send(self.hil_rc_inputs_raw_encode(time_usec, chan1_raw, chan2_raw, chan3_raw, chan4_raw, chan5_raw, chan6_raw, chan7_raw, chan8_raw, chan9_raw, chan10_raw, chan11_raw, chan12_raw, rssi), force_mavlink1=force_mavlink1)
Sent from autopilot to simulation. Hardware in the loop control outputs (replacement for HIL_CONTROLS) time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) controls : Control outputs -1 .. 1. Channel assignment depends on the simulated hardware. (float) mode : System mode (MAV_MODE), includes arming state. (uint8_t) flags : Flags as bitfield, reserved for future use. (uint64_t)
def hil_actuator_controls_encode(self, time_usec, controls, mode, flags): ''' Sent from autopilot to simulation. Hardware in the loop control outputs (replacement for HIL_CONTROLS) time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) controls : Control outputs -1 .. 1. Channel assignment depends on the simulated hardware. (float) mode : System mode (MAV_MODE), includes arming state. (uint8_t) flags : Flags as bitfield, reserved for future use. (uint64_t) ''' return MAVLink_hil_actuator_controls_message(time_usec, controls, mode, flags)
Sent from autopilot to simulation. Hardware in the loop control outputs (replacement for HIL_CONTROLS) time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) controls : Control outputs -1 .. 1. Channel assignment depends on the simulated hardware. (float) mode : System mode (MAV_MODE), includes arming state. (uint8_t) flags : Flags as bitfield, reserved for future use. (uint64_t)
def hil_actuator_controls_send(self, time_usec, controls, mode, flags, force_mavlink1=False): ''' Sent from autopilot to simulation. Hardware in the loop control outputs (replacement for HIL_CONTROLS) time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) controls : Control outputs -1 .. 1. Channel assignment depends on the simulated hardware. (float) mode : System mode (MAV_MODE), includes arming state. (uint8_t) flags : Flags as bitfield, reserved for future use. (uint64_t) ''' return self.send(self.hil_actuator_controls_encode(time_usec, controls, mode, flags), force_mavlink1=force_mavlink1)
Optical flow from a flow sensor (e.g. optical mouse sensor) time_usec : Timestamp (UNIX) (uint64_t) sensor_id : Sensor ID (uint8_t) flow_x : Flow in pixels * 10 in x-sensor direction (dezi-pixels) (int16_t) flow_y : Flow in pixels * 10 in y-sensor direction (dezi-pixels) (int16_t) flow_comp_m_x : Flow in meters in x-sensor direction, angular-speed compensated (float) flow_comp_m_y : Flow in meters in y-sensor direction, angular-speed compensated (float) quality : Optical flow quality / confidence. 0: bad, 255: maximum quality (uint8_t) ground_distance : Ground distance in meters. Positive value: distance known. Negative value: Unknown distance (float)
def optical_flow_encode(self, time_usec, sensor_id, flow_x, flow_y, flow_comp_m_x, flow_comp_m_y, quality, ground_distance): ''' Optical flow from a flow sensor (e.g. optical mouse sensor) time_usec : Timestamp (UNIX) (uint64_t) sensor_id : Sensor ID (uint8_t) flow_x : Flow in pixels * 10 in x-sensor direction (dezi-pixels) (int16_t) flow_y : Flow in pixels * 10 in y-sensor direction (dezi-pixels) (int16_t) flow_comp_m_x : Flow in meters in x-sensor direction, angular-speed compensated (float) flow_comp_m_y : Flow in meters in y-sensor direction, angular-speed compensated (float) quality : Optical flow quality / confidence. 0: bad, 255: maximum quality (uint8_t) ground_distance : Ground distance in meters. Positive value: distance known. Negative value: Unknown distance (float) ''' return MAVLink_optical_flow_message(time_usec, sensor_id, flow_x, flow_y, flow_comp_m_x, flow_comp_m_y, quality, ground_distance)
Optical flow from a flow sensor (e.g. optical mouse sensor) time_usec : Timestamp (UNIX) (uint64_t) sensor_id : Sensor ID (uint8_t) flow_x : Flow in pixels * 10 in x-sensor direction (dezi-pixels) (int16_t) flow_y : Flow in pixels * 10 in y-sensor direction (dezi-pixels) (int16_t) flow_comp_m_x : Flow in meters in x-sensor direction, angular-speed compensated (float) flow_comp_m_y : Flow in meters in y-sensor direction, angular-speed compensated (float) quality : Optical flow quality / confidence. 0: bad, 255: maximum quality (uint8_t) ground_distance : Ground distance in meters. Positive value: distance known. Negative value: Unknown distance (float)
def optical_flow_send(self, time_usec, sensor_id, flow_x, flow_y, flow_comp_m_x, flow_comp_m_y, quality, ground_distance, force_mavlink1=False): ''' Optical flow from a flow sensor (e.g. optical mouse sensor) time_usec : Timestamp (UNIX) (uint64_t) sensor_id : Sensor ID (uint8_t) flow_x : Flow in pixels * 10 in x-sensor direction (dezi-pixels) (int16_t) flow_y : Flow in pixels * 10 in y-sensor direction (dezi-pixels) (int16_t) flow_comp_m_x : Flow in meters in x-sensor direction, angular-speed compensated (float) flow_comp_m_y : Flow in meters in y-sensor direction, angular-speed compensated (float) quality : Optical flow quality / confidence. 0: bad, 255: maximum quality (uint8_t) ground_distance : Ground distance in meters. Positive value: distance known. Negative value: Unknown distance (float) ''' return self.send(self.optical_flow_encode(time_usec, sensor_id, flow_x, flow_y, flow_comp_m_x, flow_comp_m_y, quality, ground_distance), force_mavlink1=force_mavlink1)
The IMU readings in SI units in NED body frame time_usec : Timestamp (microseconds, synced to UNIX time or since system boot) (uint64_t) xacc : X acceleration (m/s^2) (float) yacc : Y acceleration (m/s^2) (float) zacc : Z acceleration (m/s^2) (float) xgyro : Angular speed around X axis (rad / sec) (float) ygyro : Angular speed around Y axis (rad / sec) (float) zgyro : Angular speed around Z axis (rad / sec) (float) xmag : X Magnetic field (Gauss) (float) ymag : Y Magnetic field (Gauss) (float) zmag : Z Magnetic field (Gauss) (float) abs_pressure : Absolute pressure in millibar (float) diff_pressure : Differential pressure in millibar (float) pressure_alt : Altitude calculated from pressure (float) temperature : Temperature in degrees celsius (float) fields_updated : Bitmask for fields that have updated since last message, bit 0 = xacc, bit 12: temperature (uint16_t)
def highres_imu_encode(self, time_usec, xacc, yacc, zacc, xgyro, ygyro, zgyro, xmag, ymag, zmag, abs_pressure, diff_pressure, pressure_alt, temperature, fields_updated): ''' The IMU readings in SI units in NED body frame time_usec : Timestamp (microseconds, synced to UNIX time or since system boot) (uint64_t) xacc : X acceleration (m/s^2) (float) yacc : Y acceleration (m/s^2) (float) zacc : Z acceleration (m/s^2) (float) xgyro : Angular speed around X axis (rad / sec) (float) ygyro : Angular speed around Y axis (rad / sec) (float) zgyro : Angular speed around Z axis (rad / sec) (float) xmag : X Magnetic field (Gauss) (float) ymag : Y Magnetic field (Gauss) (float) zmag : Z Magnetic field (Gauss) (float) abs_pressure : Absolute pressure in millibar (float) diff_pressure : Differential pressure in millibar (float) pressure_alt : Altitude calculated from pressure (float) temperature : Temperature in degrees celsius (float) fields_updated : Bitmask for fields that have updated since last message, bit 0 = xacc, bit 12: temperature (uint16_t) ''' return MAVLink_highres_imu_message(time_usec, xacc, yacc, zacc, xgyro, ygyro, zgyro, xmag, ymag, zmag, abs_pressure, diff_pressure, pressure_alt, temperature, fields_updated)
The IMU readings in SI units in NED body frame time_usec : Timestamp (microseconds, synced to UNIX time or since system boot) (uint64_t) xacc : X acceleration (m/s^2) (float) yacc : Y acceleration (m/s^2) (float) zacc : Z acceleration (m/s^2) (float) xgyro : Angular speed around X axis (rad / sec) (float) ygyro : Angular speed around Y axis (rad / sec) (float) zgyro : Angular speed around Z axis (rad / sec) (float) xmag : X Magnetic field (Gauss) (float) ymag : Y Magnetic field (Gauss) (float) zmag : Z Magnetic field (Gauss) (float) abs_pressure : Absolute pressure in millibar (float) diff_pressure : Differential pressure in millibar (float) pressure_alt : Altitude calculated from pressure (float) temperature : Temperature in degrees celsius (float) fields_updated : Bitmask for fields that have updated since last message, bit 0 = xacc, bit 12: temperature (uint16_t)
def highres_imu_send(self, time_usec, xacc, yacc, zacc, xgyro, ygyro, zgyro, xmag, ymag, zmag, abs_pressure, diff_pressure, pressure_alt, temperature, fields_updated, force_mavlink1=False): ''' The IMU readings in SI units in NED body frame time_usec : Timestamp (microseconds, synced to UNIX time or since system boot) (uint64_t) xacc : X acceleration (m/s^2) (float) yacc : Y acceleration (m/s^2) (float) zacc : Z acceleration (m/s^2) (float) xgyro : Angular speed around X axis (rad / sec) (float) ygyro : Angular speed around Y axis (rad / sec) (float) zgyro : Angular speed around Z axis (rad / sec) (float) xmag : X Magnetic field (Gauss) (float) ymag : Y Magnetic field (Gauss) (float) zmag : Z Magnetic field (Gauss) (float) abs_pressure : Absolute pressure in millibar (float) diff_pressure : Differential pressure in millibar (float) pressure_alt : Altitude calculated from pressure (float) temperature : Temperature in degrees celsius (float) fields_updated : Bitmask for fields that have updated since last message, bit 0 = xacc, bit 12: temperature (uint16_t) ''' return self.send(self.highres_imu_encode(time_usec, xacc, yacc, zacc, xgyro, ygyro, zgyro, xmag, ymag, zmag, abs_pressure, diff_pressure, pressure_alt, temperature, fields_updated), force_mavlink1=force_mavlink1)
Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor) time_usec : Timestamp (microseconds, synced to UNIX time or since system boot) (uint64_t) sensor_id : Sensor ID (uint8_t) integration_time_us : Integration time in microseconds. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the. (uint32_t) integrated_x : Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.) (float) integrated_y : Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.) (float) integrated_xgyro : RH rotation around X axis (rad) (float) integrated_ygyro : RH rotation around Y axis (rad) (float) integrated_zgyro : RH rotation around Z axis (rad) (float) temperature : Temperature * 100 in centi-degrees Celsius (int16_t) quality : Optical flow quality / confidence. 0: no valid flow, 255: maximum quality (uint8_t) time_delta_distance_us : Time in microseconds since the distance was sampled. (uint32_t) distance : Distance to the center of the flow field in meters. Positive value (including zero): distance known. Negative value: Unknown distance. (float)
def optical_flow_rad_encode(self, time_usec, sensor_id, integration_time_us, integrated_x, integrated_y, integrated_xgyro, integrated_ygyro, integrated_zgyro, temperature, quality, time_delta_distance_us, distance): ''' Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor) time_usec : Timestamp (microseconds, synced to UNIX time or since system boot) (uint64_t) sensor_id : Sensor ID (uint8_t) integration_time_us : Integration time in microseconds. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the. (uint32_t) integrated_x : Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.) (float) integrated_y : Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.) (float) integrated_xgyro : RH rotation around X axis (rad) (float) integrated_ygyro : RH rotation around Y axis (rad) (float) integrated_zgyro : RH rotation around Z axis (rad) (float) temperature : Temperature * 100 in centi-degrees Celsius (int16_t) quality : Optical flow quality / confidence. 0: no valid flow, 255: maximum quality (uint8_t) time_delta_distance_us : Time in microseconds since the distance was sampled. (uint32_t) distance : Distance to the center of the flow field in meters. Positive value (including zero): distance known. Negative value: Unknown distance. (float) ''' return MAVLink_optical_flow_rad_message(time_usec, sensor_id, integration_time_us, integrated_x, integrated_y, integrated_xgyro, integrated_ygyro, integrated_zgyro, temperature, quality, time_delta_distance_us, distance)
Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor) time_usec : Timestamp (microseconds, synced to UNIX time or since system boot) (uint64_t) sensor_id : Sensor ID (uint8_t) integration_time_us : Integration time in microseconds. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the. (uint32_t) integrated_x : Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.) (float) integrated_y : Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.) (float) integrated_xgyro : RH rotation around X axis (rad) (float) integrated_ygyro : RH rotation around Y axis (rad) (float) integrated_zgyro : RH rotation around Z axis (rad) (float) temperature : Temperature * 100 in centi-degrees Celsius (int16_t) quality : Optical flow quality / confidence. 0: no valid flow, 255: maximum quality (uint8_t) time_delta_distance_us : Time in microseconds since the distance was sampled. (uint32_t) distance : Distance to the center of the flow field in meters. Positive value (including zero): distance known. Negative value: Unknown distance. (float)
def optical_flow_rad_send(self, time_usec, sensor_id, integration_time_us, integrated_x, integrated_y, integrated_xgyro, integrated_ygyro, integrated_zgyro, temperature, quality, time_delta_distance_us, distance, force_mavlink1=False): ''' Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor) time_usec : Timestamp (microseconds, synced to UNIX time or since system boot) (uint64_t) sensor_id : Sensor ID (uint8_t) integration_time_us : Integration time in microseconds. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the. (uint32_t) integrated_x : Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.) (float) integrated_y : Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.) (float) integrated_xgyro : RH rotation around X axis (rad) (float) integrated_ygyro : RH rotation around Y axis (rad) (float) integrated_zgyro : RH rotation around Z axis (rad) (float) temperature : Temperature * 100 in centi-degrees Celsius (int16_t) quality : Optical flow quality / confidence. 0: no valid flow, 255: maximum quality (uint8_t) time_delta_distance_us : Time in microseconds since the distance was sampled. (uint32_t) distance : Distance to the center of the flow field in meters. Positive value (including zero): distance known. Negative value: Unknown distance. (float) ''' return self.send(self.optical_flow_rad_encode(time_usec, sensor_id, integration_time_us, integrated_x, integrated_y, integrated_xgyro, integrated_ygyro, integrated_zgyro, temperature, quality, time_delta_distance_us, distance), force_mavlink1=force_mavlink1)
Status of simulation environment, if used q1 : True attitude quaternion component 1, w (1 in null-rotation) (float) q2 : True attitude quaternion component 2, x (0 in null-rotation) (float) q3 : True attitude quaternion component 3, y (0 in null-rotation) (float) q4 : True attitude quaternion component 4, z (0 in null-rotation) (float) roll : Attitude roll expressed as Euler angles, not recommended except for human-readable outputs (float) pitch : Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs (float) yaw : Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs (float) xacc : X acceleration m/s/s (float) yacc : Y acceleration m/s/s (float) zacc : Z acceleration m/s/s (float) xgyro : Angular speed around X axis rad/s (float) ygyro : Angular speed around Y axis rad/s (float) zgyro : Angular speed around Z axis rad/s (float) lat : Latitude in degrees (float) lon : Longitude in degrees (float) alt : Altitude in meters (float) std_dev_horz : Horizontal position standard deviation (float) std_dev_vert : Vertical position standard deviation (float) vn : True velocity in m/s in NORTH direction in earth-fixed NED frame (float) ve : True velocity in m/s in EAST direction in earth-fixed NED frame (float) vd : True velocity in m/s in DOWN direction in earth-fixed NED frame (float)
def sim_state_encode(self, q1, q2, q3, q4, roll, pitch, yaw, xacc, yacc, zacc, xgyro, ygyro, zgyro, lat, lon, alt, std_dev_horz, std_dev_vert, vn, ve, vd): ''' Status of simulation environment, if used q1 : True attitude quaternion component 1, w (1 in null-rotation) (float) q2 : True attitude quaternion component 2, x (0 in null-rotation) (float) q3 : True attitude quaternion component 3, y (0 in null-rotation) (float) q4 : True attitude quaternion component 4, z (0 in null-rotation) (float) roll : Attitude roll expressed as Euler angles, not recommended except for human-readable outputs (float) pitch : Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs (float) yaw : Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs (float) xacc : X acceleration m/s/s (float) yacc : Y acceleration m/s/s (float) zacc : Z acceleration m/s/s (float) xgyro : Angular speed around X axis rad/s (float) ygyro : Angular speed around Y axis rad/s (float) zgyro : Angular speed around Z axis rad/s (float) lat : Latitude in degrees (float) lon : Longitude in degrees (float) alt : Altitude in meters (float) std_dev_horz : Horizontal position standard deviation (float) std_dev_vert : Vertical position standard deviation (float) vn : True velocity in m/s in NORTH direction in earth-fixed NED frame (float) ve : True velocity in m/s in EAST direction in earth-fixed NED frame (float) vd : True velocity in m/s in DOWN direction in earth-fixed NED frame (float) ''' return MAVLink_sim_state_message(q1, q2, q3, q4, roll, pitch, yaw, xacc, yacc, zacc, xgyro, ygyro, zgyro, lat, lon, alt, std_dev_horz, std_dev_vert, vn, ve, vd)
Status generated by radio and injected into MAVLink stream. rssi : Local signal strength (uint8_t) remrssi : Remote signal strength (uint8_t) txbuf : Remaining free buffer space in percent. (uint8_t) noise : Background noise level (uint8_t) remnoise : Remote background noise level (uint8_t) rxerrors : Receive errors (uint16_t) fixed : Count of error corrected packets (uint16_t)
def radio_status_encode(self, rssi, remrssi, txbuf, noise, remnoise, rxerrors, fixed): ''' Status generated by radio and injected into MAVLink stream. rssi : Local signal strength (uint8_t) remrssi : Remote signal strength (uint8_t) txbuf : Remaining free buffer space in percent. (uint8_t) noise : Background noise level (uint8_t) remnoise : Remote background noise level (uint8_t) rxerrors : Receive errors (uint16_t) fixed : Count of error corrected packets (uint16_t) ''' return MAVLink_radio_status_message(rssi, remrssi, txbuf, noise, remnoise, rxerrors, fixed)
Status generated by radio and injected into MAVLink stream. rssi : Local signal strength (uint8_t) remrssi : Remote signal strength (uint8_t) txbuf : Remaining free buffer space in percent. (uint8_t) noise : Background noise level (uint8_t) remnoise : Remote background noise level (uint8_t) rxerrors : Receive errors (uint16_t) fixed : Count of error corrected packets (uint16_t)
def radio_status_send(self, rssi, remrssi, txbuf, noise, remnoise, rxerrors, fixed, force_mavlink1=False): ''' Status generated by radio and injected into MAVLink stream. rssi : Local signal strength (uint8_t) remrssi : Remote signal strength (uint8_t) txbuf : Remaining free buffer space in percent. (uint8_t) noise : Background noise level (uint8_t) remnoise : Remote background noise level (uint8_t) rxerrors : Receive errors (uint16_t) fixed : Count of error corrected packets (uint16_t) ''' return self.send(self.radio_status_encode(rssi, remrssi, txbuf, noise, remnoise, rxerrors, fixed), force_mavlink1=force_mavlink1)
File transfer message target_network : Network ID (0 for broadcast) (uint8_t) target_system : System ID (0 for broadcast) (uint8_t) target_component : Component ID (0 for broadcast) (uint8_t) payload : Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The entire content of this block is opaque unless you understand any the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the mavlink specification. (uint8_t)
def file_transfer_protocol_encode(self, target_network, target_system, target_component, payload): ''' File transfer message target_network : Network ID (0 for broadcast) (uint8_t) target_system : System ID (0 for broadcast) (uint8_t) target_component : Component ID (0 for broadcast) (uint8_t) payload : Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The entire content of this block is opaque unless you understand any the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the mavlink specification. (uint8_t) ''' return MAVLink_file_transfer_protocol_message(target_network, target_system, target_component, payload)
File transfer message target_network : Network ID (0 for broadcast) (uint8_t) target_system : System ID (0 for broadcast) (uint8_t) target_component : Component ID (0 for broadcast) (uint8_t) payload : Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The entire content of this block is opaque unless you understand any the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the mavlink specification. (uint8_t)
def file_transfer_protocol_send(self, target_network, target_system, target_component, payload, force_mavlink1=False): ''' File transfer message target_network : Network ID (0 for broadcast) (uint8_t) target_system : System ID (0 for broadcast) (uint8_t) target_component : Component ID (0 for broadcast) (uint8_t) payload : Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The entire content of this block is opaque unless you understand any the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the mavlink specification. (uint8_t) ''' return self.send(self.file_transfer_protocol_encode(target_network, target_system, target_component, payload), force_mavlink1=force_mavlink1)
Time synchronization message. tc1 : Time sync timestamp 1 (int64_t) ts1 : Time sync timestamp 2 (int64_t)
def timesync_send(self, tc1, ts1, force_mavlink1=False): ''' Time synchronization message. tc1 : Time sync timestamp 1 (int64_t) ts1 : Time sync timestamp 2 (int64_t) ''' return self.send(self.timesync_encode(tc1, ts1), force_mavlink1=force_mavlink1)
Camera-IMU triggering and synchronisation message. time_usec : Timestamp for the image frame in microseconds (uint64_t) seq : Image frame sequence (uint32_t)
def camera_trigger_send(self, time_usec, seq, force_mavlink1=False): ''' Camera-IMU triggering and synchronisation message. time_usec : Timestamp for the image frame in microseconds (uint64_t) seq : Image frame sequence (uint32_t) ''' return self.send(self.camera_trigger_encode(time_usec, seq), force_mavlink1=force_mavlink1)
The global position, as returned by the Global Positioning System (GPS). This is NOT the global position estimate of the sytem, but rather a RAW sensor value. See message GLOBAL_POSITION for the global position estimate. Coordinate frame is right- handed, Z-axis up (GPS frame). time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) fix_type : 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix. (uint8_t) lat : Latitude (WGS84), in degrees * 1E7 (int32_t) lon : Longitude (WGS84), in degrees * 1E7 (int32_t) alt : Altitude (AMSL, not WGS84), in meters * 1000 (positive for up) (int32_t) eph : GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535 (uint16_t) epv : GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: 65535 (uint16_t) vel : GPS ground speed (m/s * 100). If unknown, set to: 65535 (uint16_t) vn : GPS velocity in cm/s in NORTH direction in earth-fixed NED frame (int16_t) ve : GPS velocity in cm/s in EAST direction in earth-fixed NED frame (int16_t) vd : GPS velocity in cm/s in DOWN direction in earth-fixed NED frame (int16_t) cog : Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535 (uint16_t) satellites_visible : Number of satellites visible. If unknown, set to 255 (uint8_t)
def hil_gps_send(self, time_usec, fix_type, lat, lon, alt, eph, epv, vel, vn, ve, vd, cog, satellites_visible, force_mavlink1=False): ''' The global position, as returned by the Global Positioning System (GPS). This is NOT the global position estimate of the sytem, but rather a RAW sensor value. See message GLOBAL_POSITION for the global position estimate. Coordinate frame is right- handed, Z-axis up (GPS frame). time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) fix_type : 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix. (uint8_t) lat : Latitude (WGS84), in degrees * 1E7 (int32_t) lon : Longitude (WGS84), in degrees * 1E7 (int32_t) alt : Altitude (AMSL, not WGS84), in meters * 1000 (positive for up) (int32_t) eph : GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535 (uint16_t) epv : GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: 65535 (uint16_t) vel : GPS ground speed (m/s * 100). If unknown, set to: 65535 (uint16_t) vn : GPS velocity in cm/s in NORTH direction in earth-fixed NED frame (int16_t) ve : GPS velocity in cm/s in EAST direction in earth-fixed NED frame (int16_t) vd : GPS velocity in cm/s in DOWN direction in earth-fixed NED frame (int16_t) cog : Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535 (uint16_t) satellites_visible : Number of satellites visible. If unknown, set to 255 (uint8_t) ''' return self.send(self.hil_gps_encode(time_usec, fix_type, lat, lon, alt, eph, epv, vel, vn, ve, vd, cog, satellites_visible), force_mavlink1=force_mavlink1)
The global position, as returned by the Global Positioning System (GPS). This is NOT the global position estimate of the sytem, but rather a RAW sensor value. See message GLOBAL_POSITION for the global position estimate. Coordinate frame is right- handed, Z-axis up (GPS frame). time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) fix_type : 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix. (uint8_t) lat : Latitude (WGS84), in degrees * 1E7 (int32_t) lon : Longitude (WGS84), in degrees * 1E7 (int32_t) alt : Altitude (AMSL, not WGS84), in meters * 1000 (positive for up) (int32_t) eph : GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535 (uint16_t) epv : GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: 65535 (uint16_t) vel : GPS ground speed (m/s * 100). If unknown, set to: 65535 (uint16_t) vn : GPS velocity in cm/s in NORTH direction in earth-fixed NED frame (int16_t) ve : GPS velocity in cm/s in EAST direction in earth-fixed NED frame (int16_t) vd : GPS velocity in cm/s in DOWN direction in earth-fixed NED frame (int16_t) cog : Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535 (uint16_t) satellites_visible : Number of satellites visible. If unknown, set to 255 (uint8_t)
def hil_gps_encode(self, time_usec, fix_type, lat, lon, alt, eph, epv, vel, vn, ve, vd, cog, satellites_visible): ''' The global position, as returned by the Global Positioning System (GPS). This is NOT the global position estimate of the sytem, but rather a RAW sensor value. See message GLOBAL_POSITION for the global position estimate. Coordinate frame is right- handed, Z-axis up (GPS frame). time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) fix_type : 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix. (uint8_t) lat : Latitude (WGS84), in degrees * 1E7 (int32_t) lon : Longitude (WGS84), in degrees * 1E7 (int32_t) alt : Altitude (AMSL, not WGS84), in meters * 1000 (positive for up) (int32_t) eph : GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535 (uint16_t) epv : GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: 65535 (uint16_t) vel : GPS ground speed (m/s * 100). If unknown, set to: 65535 (uint16_t) vn : GPS velocity in cm/s in NORTH direction in earth-fixed NED frame (int16_t) ve : GPS velocity in cm/s in EAST direction in earth-fixed NED frame (int16_t) vd : GPS velocity in cm/s in DOWN direction in earth-fixed NED frame (int16_t) cog : Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535 (uint16_t) satellites_visible : Number of satellites visible. If unknown, set to 255 (uint8_t) ''' return MAVLink_hil_gps_message(time_usec, fix_type, lat, lon, alt, eph, epv, vel, vn, ve, vd, cog, satellites_visible)
Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor) time_usec : Timestamp (microseconds, synced to UNIX time or since system boot) (uint64_t) sensor_id : Sensor ID (uint8_t) integration_time_us : Integration time in microseconds. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the. (uint32_t) integrated_x : Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.) (float) integrated_y : Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.) (float) integrated_xgyro : RH rotation around X axis (rad) (float) integrated_ygyro : RH rotation around Y axis (rad) (float) integrated_zgyro : RH rotation around Z axis (rad) (float) temperature : Temperature * 100 in centi-degrees Celsius (int16_t) quality : Optical flow quality / confidence. 0: no valid flow, 255: maximum quality (uint8_t) time_delta_distance_us : Time in microseconds since the distance was sampled. (uint32_t) distance : Distance to the center of the flow field in meters. Positive value (including zero): distance known. Negative value: Unknown distance. (float)
def hil_optical_flow_encode(self, time_usec, sensor_id, integration_time_us, integrated_x, integrated_y, integrated_xgyro, integrated_ygyro, integrated_zgyro, temperature, quality, time_delta_distance_us, distance): ''' Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor) time_usec : Timestamp (microseconds, synced to UNIX time or since system boot) (uint64_t) sensor_id : Sensor ID (uint8_t) integration_time_us : Integration time in microseconds. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the. (uint32_t) integrated_x : Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.) (float) integrated_y : Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.) (float) integrated_xgyro : RH rotation around X axis (rad) (float) integrated_ygyro : RH rotation around Y axis (rad) (float) integrated_zgyro : RH rotation around Z axis (rad) (float) temperature : Temperature * 100 in centi-degrees Celsius (int16_t) quality : Optical flow quality / confidence. 0: no valid flow, 255: maximum quality (uint8_t) time_delta_distance_us : Time in microseconds since the distance was sampled. (uint32_t) distance : Distance to the center of the flow field in meters. Positive value (including zero): distance known. Negative value: Unknown distance. (float) ''' return MAVLink_hil_optical_flow_message(time_usec, sensor_id, integration_time_us, integrated_x, integrated_y, integrated_xgyro, integrated_ygyro, integrated_zgyro, temperature, quality, time_delta_distance_us, distance)
Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations. time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) attitude_quaternion : Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation) (float) rollspeed : Body frame roll / phi angular speed (rad/s) (float) pitchspeed : Body frame pitch / theta angular speed (rad/s) (float) yawspeed : Body frame yaw / psi angular speed (rad/s) (float) lat : Latitude, expressed as * 1E7 (int32_t) lon : Longitude, expressed as * 1E7 (int32_t) alt : Altitude in meters, expressed as * 1000 (millimeters) (int32_t) vx : Ground X Speed (Latitude), expressed as m/s * 100 (int16_t) vy : Ground Y Speed (Longitude), expressed as m/s * 100 (int16_t) vz : Ground Z Speed (Altitude), expressed as m/s * 100 (int16_t) ind_airspeed : Indicated airspeed, expressed as m/s * 100 (uint16_t) true_airspeed : True airspeed, expressed as m/s * 100 (uint16_t) xacc : X acceleration (mg) (int16_t) yacc : Y acceleration (mg) (int16_t) zacc : Z acceleration (mg) (int16_t)
def hil_state_quaternion_encode(self, time_usec, attitude_quaternion, rollspeed, pitchspeed, yawspeed, lat, lon, alt, vx, vy, vz, ind_airspeed, true_airspeed, xacc, yacc, zacc): ''' Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations. time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) attitude_quaternion : Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation) (float) rollspeed : Body frame roll / phi angular speed (rad/s) (float) pitchspeed : Body frame pitch / theta angular speed (rad/s) (float) yawspeed : Body frame yaw / psi angular speed (rad/s) (float) lat : Latitude, expressed as * 1E7 (int32_t) lon : Longitude, expressed as * 1E7 (int32_t) alt : Altitude in meters, expressed as * 1000 (millimeters) (int32_t) vx : Ground X Speed (Latitude), expressed as m/s * 100 (int16_t) vy : Ground Y Speed (Longitude), expressed as m/s * 100 (int16_t) vz : Ground Z Speed (Altitude), expressed as m/s * 100 (int16_t) ind_airspeed : Indicated airspeed, expressed as m/s * 100 (uint16_t) true_airspeed : True airspeed, expressed as m/s * 100 (uint16_t) xacc : X acceleration (mg) (int16_t) yacc : Y acceleration (mg) (int16_t) zacc : Z acceleration (mg) (int16_t) ''' return MAVLink_hil_state_quaternion_message(time_usec, attitude_quaternion, rollspeed, pitchspeed, yawspeed, lat, lon, alt, vx, vy, vz, ind_airspeed, true_airspeed, xacc, yacc, zacc)
Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations. time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) attitude_quaternion : Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation) (float) rollspeed : Body frame roll / phi angular speed (rad/s) (float) pitchspeed : Body frame pitch / theta angular speed (rad/s) (float) yawspeed : Body frame yaw / psi angular speed (rad/s) (float) lat : Latitude, expressed as * 1E7 (int32_t) lon : Longitude, expressed as * 1E7 (int32_t) alt : Altitude in meters, expressed as * 1000 (millimeters) (int32_t) vx : Ground X Speed (Latitude), expressed as m/s * 100 (int16_t) vy : Ground Y Speed (Longitude), expressed as m/s * 100 (int16_t) vz : Ground Z Speed (Altitude), expressed as m/s * 100 (int16_t) ind_airspeed : Indicated airspeed, expressed as m/s * 100 (uint16_t) true_airspeed : True airspeed, expressed as m/s * 100 (uint16_t) xacc : X acceleration (mg) (int16_t) yacc : Y acceleration (mg) (int16_t) zacc : Z acceleration (mg) (int16_t)
def hil_state_quaternion_send(self, time_usec, attitude_quaternion, rollspeed, pitchspeed, yawspeed, lat, lon, alt, vx, vy, vz, ind_airspeed, true_airspeed, xacc, yacc, zacc, force_mavlink1=False): ''' Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations. time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t) attitude_quaternion : Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation) (float) rollspeed : Body frame roll / phi angular speed (rad/s) (float) pitchspeed : Body frame pitch / theta angular speed (rad/s) (float) yawspeed : Body frame yaw / psi angular speed (rad/s) (float) lat : Latitude, expressed as * 1E7 (int32_t) lon : Longitude, expressed as * 1E7 (int32_t) alt : Altitude in meters, expressed as * 1000 (millimeters) (int32_t) vx : Ground X Speed (Latitude), expressed as m/s * 100 (int16_t) vy : Ground Y Speed (Longitude), expressed as m/s * 100 (int16_t) vz : Ground Z Speed (Altitude), expressed as m/s * 100 (int16_t) ind_airspeed : Indicated airspeed, expressed as m/s * 100 (uint16_t) true_airspeed : True airspeed, expressed as m/s * 100 (uint16_t) xacc : X acceleration (mg) (int16_t) yacc : Y acceleration (mg) (int16_t) zacc : Z acceleration (mg) (int16_t) ''' return self.send(self.hil_state_quaternion_encode(time_usec, attitude_quaternion, rollspeed, pitchspeed, yawspeed, lat, lon, alt, vx, vy, vz, ind_airspeed, true_airspeed, xacc, yacc, zacc), force_mavlink1=force_mavlink1)
The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) xacc : X acceleration (mg) (int16_t) yacc : Y acceleration (mg) (int16_t) zacc : Z acceleration (mg) (int16_t) xgyro : Angular speed around X axis (millirad /sec) (int16_t) ygyro : Angular speed around Y axis (millirad /sec) (int16_t) zgyro : Angular speed around Z axis (millirad /sec) (int16_t) xmag : X Magnetic field (milli tesla) (int16_t) ymag : Y Magnetic field (milli tesla) (int16_t) zmag : Z Magnetic field (milli tesla) (int16_t)
def scaled_imu2_encode(self, time_boot_ms, xacc, yacc, zacc, xgyro, ygyro, zgyro, xmag, ymag, zmag): ''' The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) xacc : X acceleration (mg) (int16_t) yacc : Y acceleration (mg) (int16_t) zacc : Z acceleration (mg) (int16_t) xgyro : Angular speed around X axis (millirad /sec) (int16_t) ygyro : Angular speed around Y axis (millirad /sec) (int16_t) zgyro : Angular speed around Z axis (millirad /sec) (int16_t) xmag : X Magnetic field (milli tesla) (int16_t) ymag : Y Magnetic field (milli tesla) (int16_t) zmag : Z Magnetic field (milli tesla) (int16_t) ''' return MAVLink_scaled_imu2_message(time_boot_ms, xacc, yacc, zacc, xgyro, ygyro, zgyro, xmag, ymag, zmag)
The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) xacc : X acceleration (mg) (int16_t) yacc : Y acceleration (mg) (int16_t) zacc : Z acceleration (mg) (int16_t) xgyro : Angular speed around X axis (millirad /sec) (int16_t) ygyro : Angular speed around Y axis (millirad /sec) (int16_t) zgyro : Angular speed around Z axis (millirad /sec) (int16_t) xmag : X Magnetic field (milli tesla) (int16_t) ymag : Y Magnetic field (milli tesla) (int16_t) zmag : Z Magnetic field (milli tesla) (int16_t)
def scaled_imu2_send(self, time_boot_ms, xacc, yacc, zacc, xgyro, ygyro, zgyro, xmag, ymag, zmag, force_mavlink1=False): ''' The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) xacc : X acceleration (mg) (int16_t) yacc : Y acceleration (mg) (int16_t) zacc : Z acceleration (mg) (int16_t) xgyro : Angular speed around X axis (millirad /sec) (int16_t) ygyro : Angular speed around Y axis (millirad /sec) (int16_t) zgyro : Angular speed around Z axis (millirad /sec) (int16_t) xmag : X Magnetic field (milli tesla) (int16_t) ymag : Y Magnetic field (milli tesla) (int16_t) zmag : Z Magnetic field (milli tesla) (int16_t) ''' return self.send(self.scaled_imu2_encode(time_boot_ms, xacc, yacc, zacc, xgyro, ygyro, zgyro, xmag, ymag, zmag), force_mavlink1=force_mavlink1)