INSTRUCTION
stringlengths
1
46.3k
RESPONSE
stringlengths
75
80.2k
speak some text
def say(self, text, priority='important'): '''speak some text''' ''' http://cvs.freebsoft.org/doc/speechd/ssip.html see 4.3.1 for priorities''' self.console.writeln(text) if self.settings.speech and self.say_backend is not None: self.say_backend(text, priority=priority)
Load a previously created file list or create a new one if none is available.
def loadFileList(self): """Load a previously created file list or create a new one if none is available.""" try: data = open(self.filelist_file, 'rb') except IOError: '''print "No SRTM cached file list. Creating new one!"''' if self.offline == 0: ...
SRTM data is split into different directories, get a list of all of them and create a dictionary for easy lookup.
def createFileList(self): """SRTM data is split into different directories, get a list of all of them and create a dictionary for easy lookup.""" global childFileListDownload if childFileListDownload is None or not childFileListDownload.is_alive(): childFileListDownload =...
Get a SRTM tile object. This function can return either an SRTM1 or SRTM3 object depending on what is available, however currently it only returns SRTM3 objects.
def getTile(self, lat, lon): """Get a SRTM tile object. This function can return either an SRTM1 or SRTM3 object depending on what is available, however currently it only returns SRTM3 objects.""" global childFileListDownload if childFileListDownload is not None and child...
Returns the weighted average of two values and handles the case where one value is None. If both values are None, None is returned.
def _avg(value1, value2, weight): """Returns the weighted average of two values and handles the case where one value is None. If both values are None, None is returned. """ if value1 is None: return value2 if value2 is None: return value1 retur...
Get the value of a pixel from the data, handling voids in the SRTM data.
def getPixelValue(self, x, y): """Get the value of a pixel from the data, handling voids in the SRTM data.""" assert x < self.size, "x: %d<%d" % (x, self.size) assert y < self.size, "y: %d<%d" % (y, self.size) # Same as calcOffset, inlined for performance reasons offs...
Calculate offset into data array. Only uses to test correctness of the formula.
def calcOffset(self, x, y): """Calculate offset into data array. Only uses to test correctness of the formula.""" # Datalayout # X = longitude # Y = latitude # Sample for size 1201x1201 # ( 0/1200) ( 1/1200) ... (1199/1200) (1200/1200) ...
Get the altitude of a lat lon pair, using the four neighbouring pixels for interpolation.
def getAltitudeFromLatLon(self, lat, lon): """Get the altitude of a lat lon pair, using the four neighbouring pixels for interpolation. """ # print "-----\nFromLatLon", lon, lat lat -= self.lat lon -= self.lon # print "lon, lat", lon, lat if lat < 0.0 ...
message receive routine
def recv_msg(self): '''message receive routine''' if self._index >= self._count: return None m = self._msgs[self._index] type = m.get_type() self._index += 1 self.percent = (100.0 * self._index) / self._count self.messages[type] = m self._times...
rewind to start
def rewind(self): '''rewind to start''' self._index = 0 self.percent = 0 self.messages = {} self._flightmode_index = 0 self._timestamp = None self.flightmode = None self.params = {}
reduce data using flightmode selections
def reduce_by_flightmodes(self, flightmode_selections): '''reduce data using flightmode selections''' if len(flightmode_selections) == 0: return all_false = True for s in flightmode_selections: if s: all_false = False if all_false: ...
set a parameter on a mavlink connection
def mavset(self, mav, name, value, retries=3): '''set a parameter on a mavlink connection''' got_ack = False while retries > 0 and not got_ack: retries -= 1 mav.param_set_send(name.upper(), float(value)) tstart = time.time() while time.time() - tst...
save parameters to a file
def save(self, filename, wildcard='*', verbose=False): '''save parameters to a file''' f = open(filename, mode='w') k = list(self.keys()) k.sort() count = 0 for p in k: if p and fnmatch.fnmatch(str(p).upper(), wildcard.upper()): f.write("%-16.1...
load parameters from a file
def load(self, filename, wildcard='*', mav=None, check=True): '''load parameters from a file''' try: f = open(filename, mode='r') except: print("Failed to open file '%s'" % filename) return False count = 0 changed = 0 for line in f: ...
show parameters
def show(self, wildcard='*'): '''show parameters''' k = sorted(self.keys()) for p in k: if fnmatch.fnmatch(str(p).upper(), wildcard.upper()): print("%-16.16s %f" % (str(p), self.get(p)))
show differences with another parameter file
def diff(self, filename, wildcard='*'): '''show differences with another parameter file''' other = MAVParmDict() if not other.load(filename): return keys = sorted(list(set(self.keys()).union(set(other.keys())))) for k in keys: if not fnmatch.fnmatch(str(k)...
generate main header per XML file
def generate_enums(basename, xml): '''generate main header per XML file''' directory = os.path.join(basename, '''enums''') mavparse.mkdir_p(directory) for en in xml.enum: f = open(os.path.join(directory, en.name+".java"), mode='w') t.write(f, ''' /* AUTO-GENERATED FILE. DO NOT MODIFY. ...
copy the fixed protocol headers to the target directory
def copy_fixed_headers(directory, xml): '''copy the fixed protocol headers to the target directory''' import shutil hlist = [ 'Parser.java', 'Messages/MAVLinkMessage.java', 'Messages/MAVLinkPayload.java', 'Messages/MAVLinkStats.java' ] basepath = os.path.dirname(os.path.realpath(__file__)) srcpath =...
work out the struct format for a type
def mavfmt(field, typeInfo=False): '''work out the struct format for a type''' map = { 'float' : ('float', 'Float'), 'double' : ('double', 'Double'), 'char' : ('byte', 'Byte'), 'int8_t' : ('byte', 'Byte'), 'uint8_t' : ('short', 'UnsignedByte'), 'uint8_...
generate headers for one XML file
def generate_one(basename, xml): '''generate headers for one XML file''' directory = os.path.join(basename, xml.basename) print("Generating Java implementation in directory %s" % directory) mavparse.mkdir_p(directory) if xml.little_endian: xml.mavlink_endian = "MAVLINK_LITTLE_...
generate complete MAVLink Java implemenation
def generate(basename, xml_list): '''generate complete MAVLink Java implemenation''' for xml in xml_list: generate_one(basename, xml) generate_enums(basename, xml) generate_MAVLinkMessage(basename, xml_list) copy_fixed_headers(basename, xml_list[0])
The heartbeat message shows that a system is present and responding. The type of the MAV and Autopilot hardware allow the receiving system to treat further messages from this system appropriate (e.g. by laying out the user interface based on the autopilot)...
def heartbeat_encode(self, type, autopilot, base_mode, custom_mode, system_status, mavlink_version=2): ''' The heartbeat message shows that a system is present and responding. The type of the MAV and Autopilot hardware allow the receiving system to treat f...
The heartbeat message shows that a system is present and responding. The type of the MAV and Autopilot hardware allow the receiving system to treat further messages from this system appropriate (e.g. by laying out the user interface based on the autopilot)...
def heartbeat_send(self, type, autopilot, base_mode, custom_mode, system_status, mavlink_version=2, force_mavlink1=False): ''' The heartbeat message shows that a system is present and responding. The type of the MAV and Autopilot hardware allow the receivi...
disarm motors
def cmd_disarm(self, args): '''disarm motors''' p2 = 0 if len(args) == 1 and args[0] == 'force': p2 = 21196 self.master.mav.command_long_send( self.target_system, # target_system 0, mavutil.mavlink.MAV_CMD_COMPONENT_ARM_DISARM, # command ...
Sends up to 20 raw float values. Index : Index of message (uint16_t) value1 : value1 (float) value2 : value2 (float) value3 : value3 (float) value4 ...
def aq_telemetry_f_encode(self, Index, value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12, value13, value14, value15, value16, value17, value18, value19, value20): ''' Sends up to 20 raw float values. Index ...
Sends ESC32 telemetry data for up to 4 motors. Multiple messages may be sent in sequence when system has > 4 motors. Data is described as follows: // unsigned int state : 3; // unsigned int vin : 12; // x 100 // unsigned int amps...
def aq_esc_telemetry_encode(self, time_boot_ms, seq, num_motors, num_in_seq, escid, status_age, data_version, data0, data1): ''' Sends ESC32 telemetry data for up to 4 motors. Multiple messages may be sent in sequence when system has > 4 motors. Data is de...
Sends ESC32 telemetry data for up to 4 motors. Multiple messages may be sent in sequence when system has > 4 motors. Data is described as follows: // unsigned int state : 3; // unsigned int vin : 12; // x 100 // unsigned int amps...
def aq_esc_telemetry_send(self, time_boot_ms, seq, num_motors, num_in_seq, escid, status_age, data_version, data0, data1, force_mavlink1=False): ''' Sends ESC32 telemetry data for up to 4 motors. Multiple messages may be sent in sequence when system has > 4 motors. Data ...
child process - this holds all the GUI elements
def child_task(self): '''child process - this holds all the GUI elements''' self.parent_pipe_send.close() self.parent_pipe_recv.close() import wx_processguard from wx_loader import wx from wxconsole_ui import ConsoleFrame app = wx.App(False) app.frame = C...
watch for menu events from child
def watch_thread(self): '''watch for menu events from child''' from mp_settings import MPSetting try: while True: msg = self.parent_pipe_recv.recv() if self.menu_callback is not None: self.menu_callback(msg) time.sle...
write to the console
def write(self, text, fg='black', bg='white'): '''write to the console''' try: self.parent_pipe_send.send(Text(text, fg, bg)) except Exception: pass
set a status value
def set_status(self, name, text='', row=0, fg='black', bg='white'): '''set a status value''' if self.is_alive(): self.parent_pipe_send.send(Value(name, text, row, fg, bg))
close the console
def close(self): '''close the console''' self.close_event.set() if self.is_alive(): self.child.join(2)
Radio buttons for Original/RGB/HSV/YUV images
def initUI(self): #self.setMinimumSize(WIDTH,HEIGTH) #self.setMaximumSize(WIDTH,HEIGTH) '''Radio buttons for Original/RGB/HSV/YUV images''' self.origButton = QRadioButton("Original") self.rgbButton = QRadioButton("RGB") self.hsvButton = QRadioButton("HSV") self....
called on idle
def idle_task(self): '''called on idle''' if self.module('console') is not None and not self.menu_added_console: self.menu_added_console = True self.module('console').add_menu(self.menu) if self.module('map') is not None and not self.menu_added_map: self.menu_...
handle rally alt change
def cmd_rally_alt(self, args): '''handle rally alt change''' if (len(args) < 2): print("Usage: rally alt RALLYNUM newAlt <newBreakAlt>") return if not self.have_list: print("Please list rally points first") return idx = int(args[0]) ...
handle rally add
def cmd_rally_add(self, args): '''handle rally add''' if len(args) < 1: alt = self.settings.rallyalt else: alt = float(args[0]) if len(args) < 2: break_alt = self.settings.rally_breakalt else: break_alt = float(args[1]) if...
handle rally move
def cmd_rally_move(self, args): '''handle rally move''' if len(args) < 1: print("Usage: rally move RALLYNUM") return if not self.have_list: print("Please list rally points first") return idx = int(args[0]) if idx <= 0 or idx > self...
rally point commands
def cmd_rally(self, args): '''rally point commands''' #TODO: add_land arg if len(args) < 1: self.print_usage() return elif args[0] == "add": self.cmd_rally_add(args[1:]) elif args[0] == "move": self.cmd_rally_move(args[1:]) ...
handle incoming mavlink packet
def mavlink_packet(self, m): '''handle incoming mavlink packet''' type = m.get_type() if type in ['COMMAND_ACK']: if m.command == mavutil.mavlink.MAV_CMD_DO_GO_AROUND: if (m.result == 0 and self.abort_ack_received == False): self.say("Landing Abort...
send rally points from fenceloader
def send_rally_point(self, i): '''send rally points from fenceloader''' p = self.rallyloader.rally_point(i) p.target_system = self.target_system p.target_component = self.target_component self.master.mav.send(p)
send rally points from rallyloader
def send_rally_points(self): '''send rally points from rallyloader''' self.mav_param.mavset(self.master,'RALLY_TOTAL',self.rallyloader.rally_count(),3) for i in range(self.rallyloader.rally_count()): self.send_rally_point(i)
Returns last Bumper. @return last JdeRobotTypes Bumper saved
def getBumper(self): ''' Returns last Bumper. @return last JdeRobotTypes Bumper saved ''' if self.hasproxy(): self.lock.acquire() bumper = self.bumper self.lock.release() return bumper return None
Translates from ROS Image to JderobotTypes Image. @param img: ROS Image to translate @param bridge: bridge to do translation @type img: sensor_msgs.msg.Image @type brige: CvBridge @return a JderobotTypes.Image translated from img
def imageMsg2Image(img, bridge): ''' Translates from ROS Image to JderobotTypes Image. @param img: ROS Image to translate @param bridge: bridge to do translation @type img: sensor_msgs.msg.Image @type brige: CvBridge @return a JderobotTypes.Image translated from img ''' image = ...
Translates from ROS Images to JderobotTypes Rgbd. @param rgb: ROS color Image to translate @param d: ROS depth image to translate @type rgb: ImageROS @type d: ImageROS @return a Rgbd translated from Images
def Images2Rgbd(rgb, d): ''' Translates from ROS Images to JderobotTypes Rgbd. @param rgb: ROS color Image to translate @param d: ROS depth image to translate @type rgb: ImageROS @type d: ImageROS @return a Rgbd translated from Images ''' data = Rgbd() data.color=imageMsg2...
Callback function to receive and save Rgbd Scans. @param rgb: ROS color Image to translate @param d: ROS depth image to translate @type rgb: ImageROS @type d: ImageROS
def __callback (self, rgb, d): ''' Callback function to receive and save Rgbd Scans. @param rgb: ROS color Image to translate @param d: ROS depth image to translate @type rgb: ImageROS @type d: ImageROS ''' data = Images2Rgbd(rgb, d) self.lo...
Starts (Subscribes) the client.
def start (self): ''' Starts (Subscribes) the client. ''' self.subrgb = rospy.Subscriber(self.topicrgb, ImageROS) self.subd = rospy.Subscriber(self.topicd, ImageROS) self.ts = message_filters.ApproximateTimeSynchronizer([subrgb, subd], 1, 0.1, allow_headerless=True) ...
Returns last RgbdData. @return last JdeRobotTypes Rgbd saved
def getRgbdData(self): ''' Returns last RgbdData. @return last JdeRobotTypes Rgbd saved ''' self.lock.acquire() data = self.data self.lock.release() return data
Offsets and calibrations values for hardware sensors. This makes it easier to debug the calibration process. mag_ofs_x : magnetometer X offset (int16_t) mag_ofs_y : magnetometer Y offset (int16_t) mag_ofs_z ...
def sensor_offsets_encode(self, mag_ofs_x, mag_ofs_y, mag_ofs_z, mag_declination, raw_press, raw_temp, gyro_cal_x, gyro_cal_y, gyro_cal_z, accel_cal_x, accel_cal_y, accel_cal_z): ''' Offsets and calibrations values for hardware sensors. This makes it easier to debug the c...
Offsets and calibrations values for hardware sensors. This makes it easier to debug the calibration process. mag_ofs_x : magnetometer X offset (int16_t) mag_ofs_y : magnetometer Y offset (int16_t) mag_ofs_z ...
def sensor_offsets_send(self, mag_ofs_x, mag_ofs_y, mag_ofs_z, mag_declination, raw_press, raw_temp, gyro_cal_x, gyro_cal_y, gyro_cal_z, accel_cal_x, accel_cal_y, accel_cal_z, force_mavlink1=False): ''' Offsets and calibrations values for hardware sensors. This makes it e...
Deprecated. Use MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS instead. Set the magnetometer offsets target_system : System ID (uint8_t) target_component : Component ID (uint8_t) mag_ofs_x : magnetometer X offset (int16_t) ...
def set_mag_offsets_encode(self, target_system, target_component, mag_ofs_x, mag_ofs_y, mag_ofs_z): ''' Deprecated. Use MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS instead. Set the magnetometer offsets target_system : System ID (uint8_t) ...
Deprecated. Use MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS instead. Set the magnetometer offsets target_system : System ID (uint8_t) target_component : Component ID (uint8_t) mag_ofs_x : magnetometer X offset (int16_t) ...
def set_mag_offsets_send(self, target_system, target_component, mag_ofs_x, mag_ofs_y, mag_ofs_z, force_mavlink1=False): ''' Deprecated. Use MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS instead. Set the magnetometer offsets target_system : System ID (u...
raw ADC output adc1 : ADC output 1 (uint16_t) adc2 : ADC output 2 (uint16_t) adc3 : ADC output 3 (uint16_t) adc4 : ADC output 4 (uint16_t) adc5 ...
def ap_adc_encode(self, adc1, adc2, adc3, adc4, adc5, adc6): ''' raw ADC output adc1 : ADC output 1 (uint16_t) adc2 : ADC output 2 (uint16_t) adc3 : ADC output 3 (uint16_t) ...
raw ADC output adc1 : ADC output 1 (uint16_t) adc2 : ADC output 2 (uint16_t) adc3 : ADC output 3 (uint16_t) adc4 : ADC output 4 (uint16_t) adc5 ...
def ap_adc_send(self, adc1, adc2, adc3, adc4, adc5, adc6, force_mavlink1=False): ''' raw ADC output adc1 : ADC output 1 (uint16_t) adc2 : ADC output 2 (uint16_t) adc3 : ADC out...
Configure on-board Camera Control System. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) mode : Mode enumeration from 1 to N //P, TV, AV, M, Etc (0 means ignore) (uint8_t) shutter_sp...
def digicam_configure_encode(self, target_system, target_component, mode, shutter_speed, aperture, iso, exposure_type, command_id, engine_cut_off, extra_param, extra_value): ''' Configure on-board Camera Control System. target_system : System ID (uint8_t) ...
Configure on-board Camera Control System. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) mode : Mode enumeration from 1 to N //P, TV, AV, M, Etc (0 means ignore) (uint8_t) shutter_sp...
def digicam_configure_send(self, target_system, target_component, mode, shutter_speed, aperture, iso, exposure_type, command_id, engine_cut_off, extra_param, extra_value, force_mavlink1=False): ''' Configure on-board Camera Control System. target_system : Sys...
Control on-board Camera Control System to take shots. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) session : 0: stop, 1: start or keep it up //Session control e.g. show/hide lens (uint8_t) ...
def digicam_control_encode(self, target_system, target_component, session, zoom_pos, zoom_step, focus_lock, shot, command_id, extra_param, extra_value): ''' Control on-board Camera Control System to take shots. target_system : System ID (uint8_t) ...
Control on-board Camera Control System to take shots. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) session : 0: stop, 1: start or keep it up //Session control e.g. show/hide lens (uint8_t) ...
def digicam_control_send(self, target_system, target_component, session, zoom_pos, zoom_step, focus_lock, shot, command_id, extra_param, extra_value, force_mavlink1=False): ''' Control on-board Camera Control System to take shots. target_system : System ID (u...
Message to configure a camera mount, directional antenna, etc. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) mount_mode : mount operating mode (see MAV_MOUNT_MODE enum) (uint8_t) stab_rol...
def mount_configure_encode(self, target_system, target_component, mount_mode, stab_roll, stab_pitch, stab_yaw): ''' Message to configure a camera mount, directional antenna, etc. target_system : System ID (uint8_t) target_component : ...
Message to configure a camera mount, directional antenna, etc. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) mount_mode : mount operating mode (see MAV_MOUNT_MODE enum) (uint8_t) stab_rol...
def mount_configure_send(self, target_system, target_component, mount_mode, stab_roll, stab_pitch, stab_yaw, force_mavlink1=False): ''' Message to configure a camera mount, directional antenna, etc. target_system : System ID (uint8_t) target_c...
Message to control a camera mount, directional antenna, etc. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) input_a : pitch(deg*100) or lat, depending on mount mode (int32_t) input_b ...
def mount_control_encode(self, target_system, target_component, input_a, input_b, input_c, save_position): ''' Message to control a camera mount, directional antenna, etc. target_system : System ID (uint8_t) target_component : Compone...
Message to control a camera mount, directional antenna, etc. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) input_a : pitch(deg*100) or lat, depending on mount mode (int32_t) input_b ...
def mount_control_send(self, target_system, target_component, input_a, input_b, input_c, save_position, force_mavlink1=False): ''' Message to control a camera mount, directional antenna, etc. target_system : System ID (uint8_t) target_componen...
Message with some status from APM to GCS about camera or antenna mount target_system : System ID (uint8_t) target_component : Component ID (uint8_t) pointing_a : pitch(deg*100) (int32_t) pointing_b : roll...
def mount_status_encode(self, target_system, target_component, pointing_a, pointing_b, pointing_c): ''' Message with some status from APM to GCS about camera or antenna mount target_system : System ID (uint8_t) target_component : Comp...
Message with some status from APM to GCS about camera or antenna mount target_system : System ID (uint8_t) target_component : Component ID (uint8_t) pointing_a : pitch(deg*100) (int32_t) pointing_b : roll...
def mount_status_send(self, target_system, target_component, pointing_a, pointing_b, pointing_c, force_mavlink1=False): ''' Message with some status from APM to GCS about camera or antenna mount target_system : System ID (uint8_t) target_compo...
A fence point. Used to set a point when from GCS -> MAV. Also used to return a point from MAV -> GCS target_system : System ID (uint8_t) target_component : Component ID (uint8_t) idx : point index (first point is...
def fence_point_encode(self, target_system, target_component, idx, count, lat, lng): ''' A fence point. Used to set a point when from GCS -> MAV. Also used to return a point from MAV -> GCS target_system : System ID (uint8_t) t...
A fence point. Used to set a point when from GCS -> MAV. Also used to return a point from MAV -> GCS target_system : System ID (uint8_t) target_component : Component ID (uint8_t) idx : point index (first point is...
def fence_point_send(self, target_system, target_component, idx, count, lat, lng, force_mavlink1=False): ''' A fence point. Used to set a point when from GCS -> MAV. Also used to return a point from MAV -> GCS target_system : System ID (uint8_...
Request a current fence point from MAV target_system : System ID (uint8_t) target_component : Component ID (uint8_t) idx : point index (first point is 1, 0 is for return point) (uint8_t)
def fence_fetch_point_send(self, target_system, target_component, idx, force_mavlink1=False): ''' Request a current fence point from MAV target_system : System ID (uint8_t) target_component : Component ID (uint8_t) idx...
Status of geo-fencing. Sent in extended status stream when fencing enabled breach_status : 0 if currently inside fence, 1 if outside (uint8_t) breach_count : number of fence breaches (uint16_t) breach_type : last bre...
def fence_status_encode(self, breach_status, breach_count, breach_type, breach_time): ''' Status of geo-fencing. Sent in extended status stream when fencing enabled breach_status : 0 if currently inside fence, 1 if outside (uint8_t) ...
Status of geo-fencing. Sent in extended status stream when fencing enabled breach_status : 0 if currently inside fence, 1 if outside (uint8_t) breach_count : number of fence breaches (uint16_t) breach_type : last bre...
def fence_status_send(self, breach_status, breach_count, breach_type, breach_time, force_mavlink1=False): ''' Status of geo-fencing. Sent in extended status stream when fencing enabled breach_status : 0 if currently inside fence, 1 if outside ...
Status of DCM attitude estimator omegaIx : X gyro drift estimate rad/s (float) omegaIy : Y gyro drift estimate rad/s (float) omegaIz : Z gyro drift estimate rad/s (float) accel_weight : av...
def ahrs_encode(self, omegaIx, omegaIy, omegaIz, accel_weight, renorm_val, error_rp, error_yaw): ''' Status of DCM attitude estimator omegaIx : X gyro drift estimate rad/s (float) omegaIy : Y gyro drift estimate rad/s (...
Status of DCM attitude estimator omegaIx : X gyro drift estimate rad/s (float) omegaIy : Y gyro drift estimate rad/s (float) omegaIz : Z gyro drift estimate rad/s (float) accel_weight : av...
def ahrs_send(self, omegaIx, omegaIy, omegaIz, accel_weight, renorm_val, error_rp, error_yaw, force_mavlink1=False): ''' Status of DCM attitude estimator omegaIx : X gyro drift estimate rad/s (float) omegaIy : Y gyro dr...
Status of simulation environment, if used roll : Roll angle (rad) (float) pitch : Pitch angle (rad) (float) yaw : Yaw angle (rad) (float) xacc : X acceleration m/s/s (floa...
def simstate_encode(self, roll, pitch, yaw, xacc, yacc, zacc, xgyro, ygyro, zgyro, lat, lng): ''' Status of simulation environment, if used roll : Roll angle (rad) (float) pitch : Pitch angle (rad) (float) ...
Status of simulation environment, if used roll : Roll angle (rad) (float) pitch : Pitch angle (rad) (float) yaw : Yaw angle (rad) (float) xacc : X acceleration m/s/s (floa...
def simstate_send(self, roll, pitch, yaw, xacc, yacc, zacc, xgyro, ygyro, zgyro, lat, lng, force_mavlink1=False): ''' Status of simulation environment, if used roll : Roll angle (rad) (float) pitch : Pitch angle (r...
Status of key hardware Vcc : board voltage (mV) (uint16_t) I2Cerr : I2C error count (uint8_t)
def hwstatus_send(self, Vcc, I2Cerr, force_mavlink1=False): ''' Status of key hardware Vcc : board voltage (mV) (uint16_t) I2Cerr : I2C error count (uint8_t) ''' return self.send(se...
Status generated by radio rssi : local signal strength (uint8_t) remrssi : remote signal strength (uint8_t) txbuf : how full the tx buffer is as a percentage (uint8_t) noise : ...
def radio_encode(self, rssi, remrssi, txbuf, noise, remnoise, rxerrors, fixed): ''' Status generated by radio rssi : local signal strength (uint8_t) remrssi : remote signal strength (uint8_t) txbuf ...
Status generated by radio rssi : local signal strength (uint8_t) remrssi : remote signal strength (uint8_t) txbuf : how full the tx buffer is as a percentage (uint8_t) noise : ...
def radio_send(self, rssi, remrssi, txbuf, noise, remnoise, rxerrors, fixed, force_mavlink1=False): ''' Status generated by radio rssi : local signal strength (uint8_t) remrssi : remote signal strength (uint8_t) ...
Status of AP_Limits. Sent in extended status stream when AP_Limits is enabled limits_state : state of AP_Limits, (see enum LimitState, LIMITS_STATE) (uint8_t) last_trigger : time of last breach in milliseconds since boot (uint32_t) ...
def limits_status_encode(self, limits_state, last_trigger, last_action, last_recovery, last_clear, breach_count, mods_enabled, mods_required, mods_triggered): ''' Status of AP_Limits. Sent in extended status stream when AP_Limits is enabled limits_state ...
Status of AP_Limits. Sent in extended status stream when AP_Limits is enabled limits_state : state of AP_Limits, (see enum LimitState, LIMITS_STATE) (uint8_t) last_trigger : time of last breach in milliseconds since boot (uint32_t) ...
def limits_status_send(self, limits_state, last_trigger, last_action, last_recovery, last_clear, breach_count, mods_enabled, mods_required, mods_triggered, force_mavlink1=False): ''' Status of AP_Limits. Sent in extended status stream when AP_Limits is enabled ...
Wind estimation direction : wind direction that wind is coming from (degrees) (float) speed : wind speed in ground plane (m/s) (float) speed_z : vertical wind speed (m/s) (float)
def wind_send(self, direction, speed, speed_z, force_mavlink1=False): ''' Wind estimation direction : wind direction that wind is coming from (degrees) (float) speed : wind speed in ground plane (m/s) (float) ...
Data packet, size 16 type : data type (uint8_t) len : data length (uint8_t) data : raw data (uint8_t)
def data16_send(self, type, len, data, force_mavlink1=False): ''' Data packet, size 16 type : data type (uint8_t) len : data length (uint8_t) data : raw data (uint8_t) ...
Data packet, size 32 type : data type (uint8_t) len : data length (uint8_t) data : raw data (uint8_t)
def data32_send(self, type, len, data, force_mavlink1=False): ''' Data packet, size 32 type : data type (uint8_t) len : data length (uint8_t) data : raw data (uint8_t) ...
Data packet, size 64 type : data type (uint8_t) len : data length (uint8_t) data : raw data (uint8_t)
def data64_send(self, type, len, data, force_mavlink1=False): ''' Data packet, size 64 type : data type (uint8_t) len : data length (uint8_t) data : raw data (uint8_t) ...
Data packet, size 96 type : data type (uint8_t) len : data length (uint8_t) data : raw data (uint8_t)
def data96_send(self, type, len, data, force_mavlink1=False): ''' Data packet, size 96 type : data type (uint8_t) len : data length (uint8_t) data : raw data (uint8_t) ...
Rangefinder reporting distance : distance in meters (float) voltage : raw voltage if available, zero otherwise (float)
def rangefinder_send(self, distance, voltage, force_mavlink1=False): ''' Rangefinder reporting distance : distance in meters (float) voltage : raw voltage if available, zero otherwise (float) ''' ...
Airspeed auto-calibration vx : GPS velocity north m/s (float) vy : GPS velocity east m/s (float) vz : GPS velocity down m/s (float) diff_pressure : Differential pressure pasc...
def airspeed_autocal_encode(self, vx, vy, vz, diff_pressure, EAS2TAS, ratio, state_x, state_y, state_z, Pax, Pby, Pcz): ''' Airspeed auto-calibration vx : GPS velocity north m/s (float) vy : GPS velocity east ...
Airspeed auto-calibration vx : GPS velocity north m/s (float) vy : GPS velocity east m/s (float) vz : GPS velocity down m/s (float) diff_pressure : Differential pressure pasc...
def airspeed_autocal_send(self, vx, vy, vz, diff_pressure, EAS2TAS, ratio, state_x, state_y, state_z, Pax, Pby, Pcz, force_mavlink1=False): ''' Airspeed auto-calibration vx : GPS velocity north m/s (float) vy ...
A rally point. Used to set a point when from GCS -> MAV. Also used to return a point from MAV -> GCS target_system : System ID (uint8_t) target_component : Component ID (uint8_t) idx : point index (first point is...
def rally_point_encode(self, target_system, target_component, idx, count, lat, lng, alt, break_alt, land_dir, flags): ''' A rally point. Used to set a point when from GCS -> MAV. Also used to return a point from MAV -> GCS target_system : Syst...
A rally point. Used to set a point when from GCS -> MAV. Also used to return a point from MAV -> GCS target_system : System ID (uint8_t) target_component : Component ID (uint8_t) idx : point index (first point is...
def rally_point_send(self, target_system, target_component, idx, count, lat, lng, alt, break_alt, land_dir, flags, force_mavlink1=False): ''' A rally point. Used to set a point when from GCS -> MAV. Also used to return a point from MAV -> GCS target_syste...
Request a current rally point from MAV. MAV should respond with a RALLY_POINT message. MAV should not respond if the request is invalid. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) idx...
def rally_fetch_point_send(self, target_system, target_component, idx, force_mavlink1=False): ''' Request a current rally point from MAV. MAV should respond with a RALLY_POINT message. MAV should not respond if the request is invalid. targ...
Status of compassmot calibration throttle : throttle (percent*10) (uint16_t) current : current (amps) (float) interference : interference (percent) (uint16_t) CompensationX : Motor Compensation X...
def compassmot_status_encode(self, throttle, current, interference, CompensationX, CompensationY, CompensationZ): ''' Status of compassmot calibration throttle : throttle (percent*10) (uint16_t) current : current (amps) ...
Status of compassmot calibration throttle : throttle (percent*10) (uint16_t) current : current (amps) (float) interference : interference (percent) (uint16_t) CompensationX : Motor Compensation X...
def compassmot_status_send(self, throttle, current, interference, CompensationX, CompensationY, CompensationZ, force_mavlink1=False): ''' Status of compassmot calibration throttle : throttle (percent*10) (uint16_t) current ...
Status of secondary AHRS filter if available roll : Roll angle (rad) (float) pitch : Pitch angle (rad) (float) yaw : Yaw angle (rad) (float) altitude : Altitude (MSL) (float) ...
def ahrs2_encode(self, roll, pitch, yaw, altitude, lat, lng): ''' Status of secondary AHRS filter if available roll : Roll angle (rad) (float) pitch : Pitch angle (rad) (float) yaw ...
Status of secondary AHRS filter if available roll : Roll angle (rad) (float) pitch : Pitch angle (rad) (float) yaw : Yaw angle (rad) (float) altitude : Altitude (MSL) (float) ...
def ahrs2_send(self, roll, pitch, yaw, altitude, lat, lng, force_mavlink1=False): ''' Status of secondary AHRS filter if available roll : Roll angle (rad) (float) pitch : Pitch angle (rad) (float) y...
Camera Event time_usec : Image timestamp (microseconds since UNIX epoch, according to camera clock) (uint64_t) target_system : System ID (uint8_t) cam_idx : Camera ID (uint8_t) img_idx : Imag...
def camera_status_encode(self, time_usec, target_system, cam_idx, img_idx, event_id, p1, p2, p3, p4): ''' Camera Event time_usec : Image timestamp (microseconds since UNIX epoch, according to camera clock) (uint64_t) target_system ...
Camera Event time_usec : Image timestamp (microseconds since UNIX epoch, according to camera clock) (uint64_t) target_system : System ID (uint8_t) cam_idx : Camera ID (uint8_t) img_idx : Imag...
def camera_status_send(self, time_usec, target_system, cam_idx, img_idx, event_id, p1, p2, p3, p4, force_mavlink1=False): ''' Camera Event time_usec : Image timestamp (microseconds since UNIX epoch, according to camera clock) (uint64_t) ta...
Camera Capture Feedback time_usec : Image timestamp (microseconds since UNIX epoch), as passed in by CAMERA_STATUS message (or autopilot if no CCB) (uint64_t) target_system : System ID (uint8_t) cam_idx : Camera ID (uint8_t) ...
def camera_feedback_encode(self, time_usec, target_system, cam_idx, img_idx, lat, lng, alt_msl, alt_rel, roll, pitch, yaw, foc_len, flags): ''' Camera Capture Feedback time_usec : Image timestamp (microseconds since UNIX epoch), as passed in by CAMERA_STA...
Camera Capture Feedback time_usec : Image timestamp (microseconds since UNIX epoch), as passed in by CAMERA_STATUS message (or autopilot if no CCB) (uint64_t) target_system : System ID (uint8_t) cam_idx : Camera ID (uint8_t) ...
def camera_feedback_send(self, time_usec, target_system, cam_idx, img_idx, lat, lng, alt_msl, alt_rel, roll, pitch, yaw, foc_len, flags, force_mavlink1=False): ''' Camera Capture Feedback time_usec : Image timestamp (microseconds since UNIX epoch), as pas...
2nd Battery status voltage : voltage in millivolts (uint16_t) current_battery : Battery current, in 10*milliamperes (1 = 10 milliampere), -1: autopilot does not measure the current (int16_t)
def battery2_send(self, voltage, current_battery, force_mavlink1=False): ''' 2nd Battery status voltage : voltage in millivolts (uint16_t) current_battery : Battery current, in 10*milliamperes (1 = 10 milliampere), -1: autopilo...
Status of third AHRS filter if available. This is for ANU research group (Ali and Sean) roll : Roll angle (rad) (float) pitch : Pitch angle (rad) (float) yaw : Yaw angle (rad) (float) ...
def ahrs3_encode(self, roll, pitch, yaw, altitude, lat, lng, v1, v2, v3, v4): ''' Status of third AHRS filter if available. This is for ANU research group (Ali and Sean) roll : Roll angle (rad) (float) pitch ...
Status of third AHRS filter if available. This is for ANU research group (Ali and Sean) roll : Roll angle (rad) (float) pitch : Pitch angle (rad) (float) yaw : Yaw angle (rad) (float) ...
def ahrs3_send(self, roll, pitch, yaw, altitude, lat, lng, v1, v2, v3, v4, force_mavlink1=False): ''' Status of third AHRS filter if available. This is for ANU research group (Ali and Sean) roll : Roll angle (rad) (float) ...
Request the autopilot version from the system/component. target_system : System ID (uint8_t) target_component : Component ID (uint8_t)
def autopilot_version_request_send(self, target_system, target_component, force_mavlink1=False): ''' Request the autopilot version from the system/component. target_system : System ID (uint8_t) target_component : Component ID (uint8_t...