id
int32
0
252k
repo
stringlengths
7
55
path
stringlengths
4
127
func_name
stringlengths
1
88
original_string
stringlengths
75
19.8k
language
stringclasses
1 value
code
stringlengths
75
19.8k
code_tokens
list
docstring
stringlengths
3
17.3k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
87
242
235,100
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/matrixpilot.py
MAVLink.extended_sys_state_send
def extended_sys_state_send(self, vtol_state, landed_state, force_mavlink1=False): ''' Provides state for additional features vtol_state : The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration. (uint8_t) ...
python
def extended_sys_state_send(self, vtol_state, landed_state, force_mavlink1=False): ''' Provides state for additional features vtol_state : The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration. (uint8_t) ...
[ "def", "extended_sys_state_send", "(", "self", ",", "vtol_state", ",", "landed_state", ",", "force_mavlink1", "=", "False", ")", ":", "return", "self", ".", "send", "(", "self", ".", "extended_sys_state_encode", "(", "vtol_state", ",", "landed_state", ")", ",", ...
Provides state for additional features vtol_state : The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration. (uint8_t) landed_state : The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknow...
[ "Provides", "state", "for", "additional", "features" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/matrixpilot.py#L12923-L12931
235,101
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/matrixpilot.py
MAVLink.named_value_float_send
def named_value_float_send(self, time_boot_ms, name, value, force_mavlink1=False): ''' Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental de...
python
def named_value_float_send(self, time_boot_ms, name, value, force_mavlink1=False): ''' Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental de...
[ "def", "named_value_float_send", "(", "self", ",", "time_boot_ms", ",", "name", ",", "value", ",", "force_mavlink1", "=", "False", ")", ":", "return", "self", ".", "send", "(", "self", ".", "named_value_float_encode", "(", "time_boot_ms", ",", "name", ",", "...
Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output. time_boot_ms : Timestamp (milliseconds since system boot) (ui...
[ "Send", "a", "key", "-", "value", "pair", "as", "float", ".", "The", "use", "of", "this", "message", "is", "discouraged", "for", "normal", "packets", "but", "a", "quite", "efficient", "way", "for", "testing", "new", "messages", "and", "getting", "experimen...
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/matrixpilot.py#L13101-L13113
235,102
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/matrixpilot.py
MAVLink.named_value_int_send
def named_value_int_send(self, time_boot_ms, name, value, force_mavlink1=False): ''' Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental ...
python
def named_value_int_send(self, time_boot_ms, name, value, force_mavlink1=False): ''' Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental ...
[ "def", "named_value_int_send", "(", "self", ",", "time_boot_ms", ",", "name", ",", "value", ",", "force_mavlink1", "=", "False", ")", ":", "return", "self", ".", "send", "(", "self", ".", "named_value_int_encode", "(", "time_boot_ms", ",", "name", ",", "valu...
Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output. time_boot_ms : Timestamp (milliseconds since system boot) (...
[ "Send", "a", "key", "-", "value", "pair", "as", "integer", ".", "The", "use", "of", "this", "message", "is", "discouraged", "for", "normal", "packets", "but", "a", "quite", "efficient", "way", "for", "testing", "new", "messages", "and", "getting", "experim...
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/matrixpilot.py#L13129-L13141
235,103
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/matrixpilot.py
MAVLink.debug_send
def debug_send(self, time_boot_ms, ind, value, force_mavlink1=False): ''' Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N. time_boot_ms : Time...
python
def debug_send(self, time_boot_ms, ind, value, force_mavlink1=False): ''' Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N. time_boot_ms : Time...
[ "def", "debug_send", "(", "self", ",", "time_boot_ms", ",", "ind", ",", "value", ",", "force_mavlink1", "=", "False", ")", ":", "return", "self", ".", "send", "(", "self", ".", "debug_encode", "(", "time_boot_ms", ",", "ind", ",", "value", ")", ",", "f...
Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N. time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) ind : index of deb...
[ "Send", "a", "debug", "value", ".", "The", "index", "is", "used", "to", "discriminate", "between", "values", ".", "These", "values", "show", "up", "in", "the", "plot", "of", "QGroundControl", "as", "DEBUG", "N", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/matrixpilot.py#L13186-L13197
235,104
JdeRobot/base
src/libs/comm_py/comm/ros/publisherMotors.py
PublisherMotors.sendVX
def sendVX(self, vx): ''' Sends VX velocity. @param vx: VX velocity @type vx: float ''' self.lock.acquire() self.data.vx = vx self.lock.release()
python
def sendVX(self, vx): ''' Sends VX velocity. @param vx: VX velocity @type vx: float ''' self.lock.acquire() self.data.vx = vx self.lock.release()
[ "def", "sendVX", "(", "self", ",", "vx", ")", ":", "self", ".", "lock", ".", "acquire", "(", ")", "self", ".", "data", ".", "vx", "=", "vx", "self", ".", "lock", ".", "release", "(", ")" ]
Sends VX velocity. @param vx: VX velocity @type vx: float
[ "Sends", "VX", "velocity", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/libs/comm_py/comm/ros/publisherMotors.py#L138-L149
235,105
JdeRobot/base
src/libs/comm_py/comm/ros/publisherMotors.py
PublisherMotors.sendVY
def sendVY(self, vy): ''' Sends VY velocity. @param vy: VY velocity @type vy: float ''' self.lock.acquire() self.data.vy = vy self.lock.release()
python
def sendVY(self, vy): ''' Sends VY velocity. @param vy: VY velocity @type vy: float ''' self.lock.acquire() self.data.vy = vy self.lock.release()
[ "def", "sendVY", "(", "self", ",", "vy", ")", ":", "self", ".", "lock", ".", "acquire", "(", ")", "self", ".", "data", ".", "vy", "=", "vy", "self", ".", "lock", ".", "release", "(", ")" ]
Sends VY velocity. @param vy: VY velocity @type vy: float
[ "Sends", "VY", "velocity", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/libs/comm_py/comm/ros/publisherMotors.py#L151-L162
235,106
JdeRobot/base
src/libs/comm_py/comm/ros/publisherMotors.py
PublisherMotors.sendAZ
def sendAZ(self, az): ''' Sends AZ velocity. @param az: AZ velocity @type az: float ''' self.lock.acquire() self.data.az = az self.lock.release()
python
def sendAZ(self, az): ''' Sends AZ velocity. @param az: AZ velocity @type az: float ''' self.lock.acquire() self.data.az = az self.lock.release()
[ "def", "sendAZ", "(", "self", ",", "az", ")", ":", "self", ".", "lock", ".", "acquire", "(", ")", "self", ".", "data", ".", "az", "=", "az", "self", ".", "lock", ".", "release", "(", ")" ]
Sends AZ velocity. @param az: AZ velocity @type az: float
[ "Sends", "AZ", "velocity", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/libs/comm_py/comm/ros/publisherMotors.py#L164-L175
235,107
JdeRobot/base
src/libs/comm_py/comm/ros/listenerBumper.py
bumperEvent2BumperData
def bumperEvent2BumperData(event): ''' Translates from ROS BumperScan to JderobotTypes BumperData. @param event: ROS BumperScan to translate @type event: BumperScan @return a BumperData translated from event # bumper LEFT = 0 CENTER = 1 RIGHT = 2 # state RELEASED = ...
python
def bumperEvent2BumperData(event): ''' Translates from ROS BumperScan to JderobotTypes BumperData. @param event: ROS BumperScan to translate @type event: BumperScan @return a BumperData translated from event # bumper LEFT = 0 CENTER = 1 RIGHT = 2 # state RELEASED = ...
[ "def", "bumperEvent2BumperData", "(", "event", ")", ":", "bump", "=", "BumperData", "(", ")", "bump", ".", "state", "=", "event", ".", "state", "bump", ".", "bumper", "=", "event", ".", "bumper", "#bump.timeStamp = event.header.stamp.secs + (event.header.stamp.nsecs...
Translates from ROS BumperScan to JderobotTypes BumperData. @param event: ROS BumperScan to translate @type event: BumperScan @return a BumperData translated from event # bumper LEFT = 0 CENTER = 1 RIGHT = 2 # state RELEASED = 0 PRESSED = 1
[ "Translates", "from", "ROS", "BumperScan", "to", "JderobotTypes", "BumperData", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/libs/comm_py/comm/ros/listenerBumper.py#L11-L36
235,108
JdeRobot/base
src/libs/comm_py/comm/ros/listenerBumper.py
ListenerBumper.__callback
def __callback (self, event): ''' Callback function to receive and save Bumper Scans. @param event: ROS BumperScan received @type event: BumperScan ''' bump = bumperEvent2BumperData(event) if bump.state == 1: self.lock.acquire() ...
python
def __callback (self, event): ''' Callback function to receive and save Bumper Scans. @param event: ROS BumperScan received @type event: BumperScan ''' bump = bumperEvent2BumperData(event) if bump.state == 1: self.lock.acquire() ...
[ "def", "__callback", "(", "self", ",", "event", ")", ":", "bump", "=", "bumperEvent2BumperData", "(", "event", ")", "if", "bump", ".", "state", "==", "1", ":", "self", ".", "lock", ".", "acquire", "(", ")", "self", ".", "time", "=", "current_milli_time...
Callback function to receive and save Bumper Scans. @param event: ROS BumperScan received @type event: BumperScan
[ "Callback", "function", "to", "receive", "and", "save", "Bumper", "Scans", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/libs/comm_py/comm/ros/listenerBumper.py#L58-L73
235,109
JdeRobot/base
src/libs/comm_py/comm/ros/listenerBumper.py
ListenerBumper.getBumperData
def getBumperData(self): ''' Returns last BumperData. @return last JdeRobotTypes BumperData saved ''' self.lock.acquire() t = current_milli_time() if (t - self.time) > 500: self.data.state = 0 bump = self.data self.lock.release() ...
python
def getBumperData(self): ''' Returns last BumperData. @return last JdeRobotTypes BumperData saved ''' self.lock.acquire() t = current_milli_time() if (t - self.time) > 500: self.data.state = 0 bump = self.data self.lock.release() ...
[ "def", "getBumperData", "(", "self", ")", ":", "self", ".", "lock", ".", "acquire", "(", ")", "t", "=", "current_milli_time", "(", ")", "if", "(", "t", "-", "self", ".", "time", ")", ">", "500", ":", "self", ".", "data", ".", "state", "=", "0", ...
Returns last BumperData. @return last JdeRobotTypes BumperData saved
[ "Returns", "last", "BumperData", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/libs/comm_py/comm/ros/listenerBumper.py#L89-L103
235,110
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_battery.py
BatteryModule.cmd_bat
def cmd_bat(self, args): '''show battery levels''' print("Flight battery: %u%%" % self.battery_level) if self.settings.numcells != 0: print("%.2f V/cell for %u cells - approx %u%%" % (self.per_cell, self.settings.numcell...
python
def cmd_bat(self, args): '''show battery levels''' print("Flight battery: %u%%" % self.battery_level) if self.settings.numcells != 0: print("%.2f V/cell for %u cells - approx %u%%" % (self.per_cell, self.settings.numcell...
[ "def", "cmd_bat", "(", "self", ",", "args", ")", ":", "print", "(", "\"Flight battery: %u%%\"", "%", "self", ".", "battery_level", ")", "if", "self", ".", "settings", ".", "numcells", "!=", "0", ":", "print", "(", "\"%.2f V/cell for %u cells - approx %u%%\"", ...
show battery levels
[ "show", "battery", "levels" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_battery.py#L38-L44
235,111
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_battery.py
BatteryModule.battery_update
def battery_update(self, SYS_STATUS): '''update battery level''' # main flight battery self.battery_level = SYS_STATUS.battery_remaining self.voltage_level = SYS_STATUS.voltage_battery self.current_battery = SYS_STATUS.current_battery if self.settings.numcells != 0: ...
python
def battery_update(self, SYS_STATUS): '''update battery level''' # main flight battery self.battery_level = SYS_STATUS.battery_remaining self.voltage_level = SYS_STATUS.voltage_battery self.current_battery = SYS_STATUS.current_battery if self.settings.numcells != 0: ...
[ "def", "battery_update", "(", "self", ",", "SYS_STATUS", ")", ":", "# main flight battery", "self", ".", "battery_level", "=", "SYS_STATUS", ".", "battery_remaining", "self", ".", "voltage_level", "=", "SYS_STATUS", ".", "voltage_battery", "self", ".", "current_batt...
update battery level
[ "update", "battery", "level" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_battery.py#L92-L99
235,112
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_calibration.py
CalibrationModule.cmd_accelcal
def cmd_accelcal(self, args): '''do a full 3D accel calibration''' mav = self.master # ack the APM to begin 3D calibration of accelerometers mav.mav.command_long_send(mav.target_system, mav.target_component, mavutil.mavlink.MAV_CMD_PREFLIGHT_CALIBRATION,...
python
def cmd_accelcal(self, args): '''do a full 3D accel calibration''' mav = self.master # ack the APM to begin 3D calibration of accelerometers mav.mav.command_long_send(mav.target_system, mav.target_component, mavutil.mavlink.MAV_CMD_PREFLIGHT_CALIBRATION,...
[ "def", "cmd_accelcal", "(", "self", ",", "args", ")", ":", "mav", "=", "self", ".", "master", "# ack the APM to begin 3D calibration of accelerometers", "mav", ".", "mav", ".", "command_long_send", "(", "mav", ".", "target_system", ",", "mav", ".", "target_compone...
do a full 3D accel calibration
[ "do", "a", "full", "3D", "accel", "calibration" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_calibration.py#L34-L42
235,113
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_calibration.py
CalibrationModule.cmd_gyrocal
def cmd_gyrocal(self, args): '''do a full gyro calibration''' mav = self.master mav.mav.command_long_send(mav.target_system, mav.target_component, mavutil.mavlink.MAV_CMD_PREFLIGHT_CALIBRATION, 0, 1, 0, 0, 0, 0, 0, 0)
python
def cmd_gyrocal(self, args): '''do a full gyro calibration''' mav = self.master mav.mav.command_long_send(mav.target_system, mav.target_component, mavutil.mavlink.MAV_CMD_PREFLIGHT_CALIBRATION, 0, 1, 0, 0, 0, 0, 0, 0)
[ "def", "cmd_gyrocal", "(", "self", ",", "args", ")", ":", "mav", "=", "self", ".", "master", "mav", ".", "mav", ".", "command_long_send", "(", "mav", ".", "target_system", ",", "mav", ".", "target_component", ",", "mavutil", ".", "mavlink", ".", "MAV_CMD...
do a full gyro calibration
[ "do", "a", "full", "gyro", "calibration" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_calibration.py#L44-L49
235,114
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_calibration.py
CalibrationModule.cmd_magcal
def cmd_magcal(self, args): '''control magnetometer calibration''' if len(args) < 1: print("Usage: magcal <start|accept|cancel>") return if args[0] == 'start': self.master.mav.command_long_send( self.settings.target_system, # target_system ...
python
def cmd_magcal(self, args): '''control magnetometer calibration''' if len(args) < 1: print("Usage: magcal <start|accept|cancel>") return if args[0] == 'start': self.master.mav.command_long_send( self.settings.target_system, # target_system ...
[ "def", "cmd_magcal", "(", "self", ",", "args", ")", ":", "if", "len", "(", "args", ")", "<", "1", ":", "print", "(", "\"Usage: magcal <start|accept|cancel>\"", ")", "return", "if", "args", "[", "0", "]", "==", "'start'", ":", "self", ".", "master", "."...
control magnetometer calibration
[ "control", "magnetometer", "calibration" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_calibration.py#L114-L158
235,115
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_fence.py
FenceModule.set_fence_enabled
def set_fence_enabled(self, do_enable): '''Enable or disable fence''' self.master.mav.command_long_send( self.target_system, self.target_component, mavutil.mavlink.MAV_CMD_DO_FENCE_ENABLE, 0, do_enable, 0, 0, 0, 0, 0, 0)
python
def set_fence_enabled(self, do_enable): '''Enable or disable fence''' self.master.mav.command_long_send( self.target_system, self.target_component, mavutil.mavlink.MAV_CMD_DO_FENCE_ENABLE, 0, do_enable, 0, 0, 0, 0, 0, 0)
[ "def", "set_fence_enabled", "(", "self", ",", "do_enable", ")", ":", "self", ".", "master", ".", "mav", ".", "command_long_send", "(", "self", ".", "target_system", ",", "self", ".", "target_component", ",", "mavutil", ".", "mavlink", ".", "MAV_CMD_DO_FENCE_EN...
Enable or disable fence
[ "Enable", "or", "disable", "fence" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_fence.py#L96-L102
235,116
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_fence.py
FenceModule.cmd_fence_move
def cmd_fence_move(self, args): '''handle fencepoint move''' if len(args) < 1: print("Usage: fence move FENCEPOINTNUM") return if not self.have_list: print("Please list fence points first") return idx = int(args[0]) if idx <= 0 or ...
python
def cmd_fence_move(self, args): '''handle fencepoint move''' if len(args) < 1: print("Usage: fence move FENCEPOINTNUM") return if not self.have_list: print("Please list fence points first") return idx = int(args[0]) if idx <= 0 or ...
[ "def", "cmd_fence_move", "(", "self", ",", "args", ")", ":", "if", "len", "(", "args", ")", "<", "1", ":", "print", "(", "\"Usage: fence move FENCEPOINTNUM\"", ")", "return", "if", "not", "self", ".", "have_list", ":", "print", "(", "\"Please list fence poin...
handle fencepoint move
[ "handle", "fencepoint", "move" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_fence.py#L104-L130
235,117
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_fence.py
FenceModule.cmd_fence_remove
def cmd_fence_remove(self, args): '''handle fencepoint remove''' if len(args) < 1: print("Usage: fence remove FENCEPOINTNUM") return if not self.have_list: print("Please list fence points first") return idx = int(args[0]) if idx <=...
python
def cmd_fence_remove(self, args): '''handle fencepoint remove''' if len(args) < 1: print("Usage: fence remove FENCEPOINTNUM") return if not self.have_list: print("Please list fence points first") return idx = int(args[0]) if idx <=...
[ "def", "cmd_fence_remove", "(", "self", ",", "args", ")", ":", "if", "len", "(", "args", ")", "<", "1", ":", "print", "(", "\"Usage: fence remove FENCEPOINTNUM\"", ")", "return", "if", "not", "self", ".", "have_list", ":", "print", "(", "\"Please list fence ...
handle fencepoint remove
[ "handle", "fencepoint", "remove" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_fence.py#L132-L151
235,118
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_fence.py
FenceModule.send_fence
def send_fence(self): '''send fence points from fenceloader''' # must disable geo-fencing when loading self.fenceloader.target_system = self.target_system self.fenceloader.target_component = self.target_component self.fenceloader.reindex() action = self.get_mav_param('FEN...
python
def send_fence(self): '''send fence points from fenceloader''' # must disable geo-fencing when loading self.fenceloader.target_system = self.target_system self.fenceloader.target_component = self.target_component self.fenceloader.reindex() action = self.get_mav_param('FEN...
[ "def", "send_fence", "(", "self", ")", ":", "# must disable geo-fencing when loading", "self", ".", "fenceloader", ".", "target_system", "=", "self", ".", "target_system", "self", ".", "fenceloader", ".", "target_component", "=", "self", ".", "target_component", "se...
send fence points from fenceloader
[ "send", "fence", "points", "from", "fenceloader" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_fence.py#L208-L231
235,119
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_fence.py
FenceModule.fetch_fence_point
def fetch_fence_point(self ,i): '''fetch one fence point''' self.master.mav.fence_fetch_point_send(self.target_system, self.target_component, i) tstart = time.time() p = None while time.time() - tstart < 3: p = self....
python
def fetch_fence_point(self ,i): '''fetch one fence point''' self.master.mav.fence_fetch_point_send(self.target_system, self.target_component, i) tstart = time.time() p = None while time.time() - tstart < 3: p = self....
[ "def", "fetch_fence_point", "(", "self", ",", "i", ")", ":", "self", ".", "master", ".", "mav", ".", "fence_fetch_point_send", "(", "self", ".", "target_system", ",", "self", ".", "target_component", ",", "i", ")", "tstart", "=", "time", ".", "time", "("...
fetch one fence point
[ "fetch", "one", "fence", "point" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_fence.py#L233-L248
235,120
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_fence.py
FenceModule.fence_draw_callback
def fence_draw_callback(self, points): '''callback from drawing a fence''' self.fenceloader.clear() if len(points) < 3: return self.fenceloader.target_system = self.target_system self.fenceloader.target_component = self.target_component bounds = mp_util.polygo...
python
def fence_draw_callback(self, points): '''callback from drawing a fence''' self.fenceloader.clear() if len(points) < 3: return self.fenceloader.target_system = self.target_system self.fenceloader.target_component = self.target_component bounds = mp_util.polygo...
[ "def", "fence_draw_callback", "(", "self", ",", "points", ")", ":", "self", ".", "fenceloader", ".", "clear", "(", ")", "if", "len", "(", "points", ")", "<", "3", ":", "return", "self", ".", "fenceloader", ".", "target_system", "=", "self", ".", "targe...
callback from drawing a fence
[ "callback", "from", "drawing", "a", "fence" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_fence.py#L250-L266
235,121
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_console.py
ConsoleModule.add_menu
def add_menu(self, menu): '''add a new menu''' self.menu.add(menu) self.mpstate.console.set_menu(self.menu, self.menu_callback)
python
def add_menu(self, menu): '''add a new menu''' self.menu.add(menu) self.mpstate.console.set_menu(self.menu, self.menu_callback)
[ "def", "add_menu", "(", "self", ",", "menu", ")", ":", "self", ".", "menu", ".", "add", "(", "menu", ")", "self", ".", "mpstate", ".", "console", ".", "set_menu", "(", "self", ".", "menu", ",", "self", ".", "menu_callback", ")" ]
add a new menu
[ "add", "a", "new", "menu" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_console.py#L67-L70
235,122
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_console.py
ConsoleModule.estimated_time_remaining
def estimated_time_remaining(self, lat, lon, wpnum, speed): '''estimate time remaining in mission in seconds''' idx = wpnum if wpnum >= self.module('wp').wploader.count(): return 0 distance = 0 done = set() while idx < self.module('wp').wploader.count(): ...
python
def estimated_time_remaining(self, lat, lon, wpnum, speed): '''estimate time remaining in mission in seconds''' idx = wpnum if wpnum >= self.module('wp').wploader.count(): return 0 distance = 0 done = set() while idx < self.module('wp').wploader.count(): ...
[ "def", "estimated_time_remaining", "(", "self", ",", "lat", ",", "lon", ",", "wpnum", ",", "speed", ")", ":", "idx", "=", "wpnum", "if", "wpnum", ">=", "self", ".", "module", "(", "'wp'", ")", ".", "wploader", ".", "count", "(", ")", ":", "return", ...
estimate time remaining in mission in seconds
[ "estimate", "time", "remaining", "in", "mission", "in", "seconds" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_console.py#L90-L117
235,123
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/rotmat.py
Vector3.angle
def angle(self, v): '''return the angle between this vector and another vector''' return acos((self * v) / (self.length() * v.length()))
python
def angle(self, v): '''return the angle between this vector and another vector''' return acos((self * v) / (self.length() * v.length()))
[ "def", "angle", "(", "self", ",", "v", ")", ":", "return", "acos", "(", "(", "self", "*", "v", ")", "/", "(", "self", ".", "length", "(", ")", "*", "v", ".", "length", "(", ")", ")", ")" ]
return the angle between this vector and another vector
[ "return", "the", "angle", "between", "this", "vector", "and", "another", "vector" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/rotmat.py#L114-L116
235,124
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/rotmat.py
Matrix3.from_euler
def from_euler(self, roll, pitch, yaw): '''fill the matrix from Euler angles in radians''' cp = cos(pitch) sp = sin(pitch) sr = sin(roll) cr = cos(roll) sy = sin(yaw) cy = cos(yaw) self.a.x = cp * cy self.a.y = (sr * sp * cy) - (cr * sy) s...
python
def from_euler(self, roll, pitch, yaw): '''fill the matrix from Euler angles in radians''' cp = cos(pitch) sp = sin(pitch) sr = sin(roll) cr = cos(roll) sy = sin(yaw) cy = cos(yaw) self.a.x = cp * cy self.a.y = (sr * sp * cy) - (cr * sy) s...
[ "def", "from_euler", "(", "self", ",", "roll", ",", "pitch", ",", "yaw", ")", ":", "cp", "=", "cos", "(", "pitch", ")", "sp", "=", "sin", "(", "pitch", ")", "sr", "=", "sin", "(", "roll", ")", "cr", "=", "cos", "(", "roll", ")", "sy", "=", ...
fill the matrix from Euler angles in radians
[ "fill", "the", "matrix", "from", "Euler", "angles", "in", "radians" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/rotmat.py#L154-L171
235,125
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/rotmat.py
Matrix3.from_euler312
def from_euler312(self, roll, pitch, yaw): '''fill the matrix from Euler angles in radians in 312 convention''' c3 = cos(pitch) s3 = sin(pitch) s2 = sin(roll) c2 = cos(roll) s1 = sin(yaw) c1 = cos(yaw) self.a.x = c1 * c3 - s1 * s2 * s3 self.b.y = ...
python
def from_euler312(self, roll, pitch, yaw): '''fill the matrix from Euler angles in radians in 312 convention''' c3 = cos(pitch) s3 = sin(pitch) s2 = sin(roll) c2 = cos(roll) s1 = sin(yaw) c1 = cos(yaw) self.a.x = c1 * c3 - s1 * s2 * s3 self.b.y = ...
[ "def", "from_euler312", "(", "self", ",", "roll", ",", "pitch", ",", "yaw", ")", ":", "c3", "=", "cos", "(", "pitch", ")", "s3", "=", "sin", "(", "pitch", ")", "s2", "=", "sin", "(", "roll", ")", "c2", "=", "cos", "(", "roll", ")", "s1", "=",...
fill the matrix from Euler angles in radians in 312 convention
[ "fill", "the", "matrix", "from", "Euler", "angles", "in", "radians", "in", "312", "convention" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/rotmat.py#L201-L218
235,126
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/rotmat.py
Matrix3.rotate
def rotate(self, g): '''rotate the matrix by a given amount on 3 axes''' temp_matrix = Matrix3() a = self.a b = self.b c = self.c temp_matrix.a.x = a.y * g.z - a.z * g.y temp_matrix.a.y = a.z * g.x - a.x * g.z temp_matrix.a.z = a.x * g.y - a.y * g.x ...
python
def rotate(self, g): '''rotate the matrix by a given amount on 3 axes''' temp_matrix = Matrix3() a = self.a b = self.b c = self.c temp_matrix.a.x = a.y * g.z - a.z * g.y temp_matrix.a.y = a.z * g.x - a.x * g.z temp_matrix.a.z = a.x * g.y - a.y * g.x ...
[ "def", "rotate", "(", "self", ",", "g", ")", ":", "temp_matrix", "=", "Matrix3", "(", ")", "a", "=", "self", ".", "a", "b", "=", "self", ".", "b", "c", "=", "self", ".", "c", "temp_matrix", ".", "a", ".", "x", "=", "a", ".", "y", "*", "g", ...
rotate the matrix by a given amount on 3 axes
[ "rotate", "the", "matrix", "by", "a", "given", "amount", "on", "3", "axes" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/rotmat.py#L262-L279
235,127
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/rotmat.py
Matrix3.normalize
def normalize(self): '''re-normalise a rotation matrix''' error = self.a * self.b t0 = self.a - (self.b * (0.5 * error)) t1 = self.b - (self.a * (0.5 * error)) t2 = t0 % t1 self.a = t0 * (1.0 / t0.length()) self.b = t1 * (1.0 / t1.length()) self.c = t2 * (...
python
def normalize(self): '''re-normalise a rotation matrix''' error = self.a * self.b t0 = self.a - (self.b * (0.5 * error)) t1 = self.b - (self.a * (0.5 * error)) t2 = t0 % t1 self.a = t0 * (1.0 / t0.length()) self.b = t1 * (1.0 / t1.length()) self.c = t2 * (...
[ "def", "normalize", "(", "self", ")", ":", "error", "=", "self", ".", "a", "*", "self", ".", "b", "t0", "=", "self", ".", "a", "-", "(", "self", ".", "b", "*", "(", "0.5", "*", "error", ")", ")", "t1", "=", "self", ".", "b", "-", "(", "se...
re-normalise a rotation matrix
[ "re", "-", "normalise", "a", "rotation", "matrix" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/rotmat.py#L281-L289
235,128
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/rotmat.py
Matrix3.trace
def trace(self): '''the trace of the matrix''' return self.a.x + self.b.y + self.c.z
python
def trace(self): '''the trace of the matrix''' return self.a.x + self.b.y + self.c.z
[ "def", "trace", "(", "self", ")", ":", "return", "self", ".", "a", ".", "x", "+", "self", ".", "b", ".", "y", "+", "self", ".", "c", ".", "z" ]
the trace of the matrix
[ "the", "trace", "of", "the", "matrix" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/rotmat.py#L291-L293
235,129
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/rotmat.py
Matrix3.from_axis_angle
def from_axis_angle(self, axis, angle): '''create a rotation matrix from axis and angle''' ux = axis.x uy = axis.y uz = axis.z ct = cos(angle) st = sin(angle) self.a.x = ct + (1-ct) * ux**2 self.a.y = ux*uy*(1-ct) - uz*st self.a.z = ux*uz*(1-ct) + ...
python
def from_axis_angle(self, axis, angle): '''create a rotation matrix from axis and angle''' ux = axis.x uy = axis.y uz = axis.z ct = cos(angle) st = sin(angle) self.a.x = ct + (1-ct) * ux**2 self.a.y = ux*uy*(1-ct) - uz*st self.a.z = ux*uz*(1-ct) + ...
[ "def", "from_axis_angle", "(", "self", ",", "axis", ",", "angle", ")", ":", "ux", "=", "axis", ".", "x", "uy", "=", "axis", ".", "y", "uz", "=", "axis", ".", "z", "ct", "=", "cos", "(", "angle", ")", "st", "=", "sin", "(", "angle", ")", "self...
create a rotation matrix from axis and angle
[ "create", "a", "rotation", "matrix", "from", "axis", "and", "angle" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/rotmat.py#L295-L310
235,130
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/rotmat.py
Matrix3.from_two_vectors
def from_two_vectors(self, vec1, vec2): '''get a rotation matrix from two vectors. This returns a rotation matrix which when applied to vec1 will produce a vector pointing in the same direction as vec2''' angle = vec1.angle(vec2) cross = vec1 % vec2 if cross.length(...
python
def from_two_vectors(self, vec1, vec2): '''get a rotation matrix from two vectors. This returns a rotation matrix which when applied to vec1 will produce a vector pointing in the same direction as vec2''' angle = vec1.angle(vec2) cross = vec1 % vec2 if cross.length(...
[ "def", "from_two_vectors", "(", "self", ",", "vec1", ",", "vec2", ")", ":", "angle", "=", "vec1", ".", "angle", "(", "vec2", ")", "cross", "=", "vec1", "%", "vec2", "if", "cross", ".", "length", "(", ")", "==", "0", ":", "# the two vectors are colinear...
get a rotation matrix from two vectors. This returns a rotation matrix which when applied to vec1 will produce a vector pointing in the same direction as vec2
[ "get", "a", "rotation", "matrix", "from", "two", "vectors", ".", "This", "returns", "a", "rotation", "matrix", "which", "when", "applied", "to", "vec1", "will", "produce", "a", "vector", "pointing", "in", "the", "same", "direction", "as", "vec2" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/rotmat.py#L313-L323
235,131
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/rotmat.py
Line.plane_intersection
def plane_intersection(self, plane, forward_only=False): '''return point where line intersects with a plane''' l_dot_n = self.vector * plane.normal if l_dot_n == 0.0: # line is parallel to the plane return None d = ((plane.point - self.point) * plane.normal) / l_d...
python
def plane_intersection(self, plane, forward_only=False): '''return point where line intersects with a plane''' l_dot_n = self.vector * plane.normal if l_dot_n == 0.0: # line is parallel to the plane return None d = ((plane.point - self.point) * plane.normal) / l_d...
[ "def", "plane_intersection", "(", "self", ",", "plane", ",", "forward_only", "=", "False", ")", ":", "l_dot_n", "=", "self", ".", "vector", "*", "plane", ".", "normal", "if", "l_dot_n", "==", "0.0", ":", "# line is parallel to the plane", "return", "None", "...
return point where line intersects with a plane
[ "return", "point", "where", "line", "intersects", "with", "a", "plane" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/rotmat.py#L348-L357
235,132
JdeRobot/base
src/libs/comm_py/comm/ice/rgbdIceClient.py
RgbdCamera.getRgbd
def getRgbd(self): ''' Returns last Rgbd. @return last JdeRobotTypes Rgbd saved ''' img = Rgb() if self.hasproxy(): self.lock.acquire() img = self.image self.lock.release() return img
python
def getRgbd(self): ''' Returns last Rgbd. @return last JdeRobotTypes Rgbd saved ''' img = Rgb() if self.hasproxy(): self.lock.acquire() img = self.image self.lock.release() return img
[ "def", "getRgbd", "(", "self", ")", ":", "img", "=", "Rgb", "(", ")", "if", "self", ".", "hasproxy", "(", ")", ":", "self", ".", "lock", ".", "acquire", "(", ")", "img", "=", "self", ".", "image", "self", ".", "lock", ".", "release", "(", ")", ...
Returns last Rgbd. @return last JdeRobotTypes Rgbd saved
[ "Returns", "last", "Rgbd", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/libs/comm_py/comm/ice/rgbdIceClient.py#L97-L109
235,133
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_graph.py
Graph.add_mavlink_packet
def add_mavlink_packet(self, msg): '''add data to the graph''' mtype = msg.get_type() if mtype not in self.msg_types: return for i in range(len(self.fields)): if mtype not in self.field_types[i]: continue f = self.fields[i] ...
python
def add_mavlink_packet(self, msg): '''add data to the graph''' mtype = msg.get_type() if mtype not in self.msg_types: return for i in range(len(self.fields)): if mtype not in self.field_types[i]: continue f = self.fields[i] ...
[ "def", "add_mavlink_packet", "(", "self", ",", "msg", ")", ":", "mtype", "=", "msg", ".", "get_type", "(", ")", "if", "mtype", "not", "in", "self", ".", "msg_types", ":", "return", "for", "i", "in", "range", "(", "len", "(", "self", ".", "fields", ...
add data to the graph
[ "add", "data", "to", "the", "graph" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_graph.py#L104-L115
235,134
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/generator/mavgen_javascript.py
generate
def generate(basename, xml): '''generate complete javascript implementation''' if basename.endswith('.js'): filename = basename else: filename = basename + '.js' msgs = [] enums = [] filelist = [] for x in xml: msgs.extend(x.message) enums.extend(x.enum) ...
python
def generate(basename, xml): '''generate complete javascript implementation''' if basename.endswith('.js'): filename = basename else: filename = basename + '.js' msgs = [] enums = [] filelist = [] for x in xml: msgs.extend(x.message) enums.extend(x.enum) ...
[ "def", "generate", "(", "basename", ",", "xml", ")", ":", "if", "basename", ".", "endswith", "(", "'.js'", ")", ":", "filename", "=", "basename", "else", ":", "filename", "=", "basename", "+", "'.js'", "msgs", "=", "[", "]", "enums", "=", "[", "]", ...
generate complete javascript implementation
[ "generate", "complete", "javascript", "implementation" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/generator/mavgen_javascript.py#L538-L574
235,135
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/tools/mavflightmodes.py
flight_modes
def flight_modes(logfile): '''show flight modes for a log file''' print("Processing log %s" % filename) mlog = mavutil.mavlink_connection(filename) mode = "" previous_mode = "" mode_start_timestamp = -1 time_in_mode = {} previous_percent = -1 seconds_per_percent = -1 filesize =...
python
def flight_modes(logfile): '''show flight modes for a log file''' print("Processing log %s" % filename) mlog = mavutil.mavlink_connection(filename) mode = "" previous_mode = "" mode_start_timestamp = -1 time_in_mode = {} previous_percent = -1 seconds_per_percent = -1 filesize =...
[ "def", "flight_modes", "(", "logfile", ")", ":", "print", "(", "\"Processing log %s\"", "%", "filename", ")", "mlog", "=", "mavutil", ".", "mavlink_connection", "(", "filename", ")", "mode", "=", "\"\"", "previous_mode", "=", "\"\"", "mode_start_timestamp", "=",...
show flight modes for a log file
[ "show", "flight", "modes", "for", "a", "log", "file" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/tools/mavflightmodes.py#L18-L80
235,136
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/tools/MAVExplorer.py
have_graph
def have_graph(name): '''return true if we have a graph of the given name''' for g in mestate.graphs: if g.name == name: return True return False
python
def have_graph(name): '''return true if we have a graph of the given name''' for g in mestate.graphs: if g.name == name: return True return False
[ "def", "have_graph", "(", "name", ")", ":", "for", "g", "in", "mestate", ".", "graphs", ":", "if", "g", ".", "name", "==", "name", ":", "return", "True", "return", "False" ]
return true if we have a graph of the given name
[ "return", "true", "if", "we", "have", "a", "graph", "of", "the", "given", "name" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/tools/MAVExplorer.py#L67-L72
235,137
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/tools/MAVExplorer.py
expression_ok
def expression_ok(expression): '''return True if an expression is OK with current messages''' expression_ok = True fields = expression.split() for f in fields: try: if f.endswith(':2'): f = f[:-2] if mavutil.evaluate_expression(f, mestate.status.msgs) is N...
python
def expression_ok(expression): '''return True if an expression is OK with current messages''' expression_ok = True fields = expression.split() for f in fields: try: if f.endswith(':2'): f = f[:-2] if mavutil.evaluate_expression(f, mestate.status.msgs) is N...
[ "def", "expression_ok", "(", "expression", ")", ":", "expression_ok", "=", "True", "fields", "=", "expression", ".", "split", "(", ")", "for", "f", "in", "fields", ":", "try", ":", "if", "f", ".", "endswith", "(", "':2'", ")", ":", "f", "=", "f", "...
return True if an expression is OK with current messages
[ "return", "True", "if", "an", "expression", "is", "OK", "with", "current", "messages" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/tools/MAVExplorer.py#L129-L142
235,138
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/tools/MAVExplorer.py
load_graph_xml
def load_graph_xml(xml, filename, load_all=False): '''load a graph from one xml string''' ret = [] try: root = objectify.fromstring(xml) except Exception: return [] if root.tag != 'graphs': return [] if not hasattr(root, 'graph'): return [] for g in root.graph...
python
def load_graph_xml(xml, filename, load_all=False): '''load a graph from one xml string''' ret = [] try: root = objectify.fromstring(xml) except Exception: return [] if root.tag != 'graphs': return [] if not hasattr(root, 'graph'): return [] for g in root.graph...
[ "def", "load_graph_xml", "(", "xml", ",", "filename", ",", "load_all", "=", "False", ")", ":", "ret", "=", "[", "]", "try", ":", "root", "=", "objectify", ".", "fromstring", "(", "xml", ")", "except", "Exception", ":", "return", "[", "]", "if", "root...
load a graph from one xml string
[ "load", "a", "graph", "from", "one", "xml", "string" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/tools/MAVExplorer.py#L144-L167
235,139
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/tools/MAVExplorer.py
cmd_condition
def cmd_condition(args): '''control MAVExporer conditions''' if len(args) == 0: print("condition is: %s" % mestate.settings.condition) return mestate.settings.condition = ' '.join(args) if len(mestate.settings.condition) == 0 or mestate.settings.condition == 'clear': mestate.sett...
python
def cmd_condition(args): '''control MAVExporer conditions''' if len(args) == 0: print("condition is: %s" % mestate.settings.condition) return mestate.settings.condition = ' '.join(args) if len(mestate.settings.condition) == 0 or mestate.settings.condition == 'clear': mestate.sett...
[ "def", "cmd_condition", "(", "args", ")", ":", "if", "len", "(", "args", ")", "==", "0", ":", "print", "(", "\"condition is: %s\"", "%", "mestate", ".", "settings", ".", "condition", ")", "return", "mestate", ".", "settings", ".", "condition", "=", "' '"...
control MAVExporer conditions
[ "control", "MAVExporer", "conditions" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/tools/MAVExplorer.py#L260-L267
235,140
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v20/ualberta.py
MAVLink.ualberta_sys_status_send
def ualberta_sys_status_send(self, mode, nav_mode, pilot, force_mavlink1=False): ''' System status specific to ualberta uav mode : System mode, see UALBERTA_AUTOPILOT_MODE ENUM (uint8_t) nav_mode : Navigation mode, se...
python
def ualberta_sys_status_send(self, mode, nav_mode, pilot, force_mavlink1=False): ''' System status specific to ualberta uav mode : System mode, see UALBERTA_AUTOPILOT_MODE ENUM (uint8_t) nav_mode : Navigation mode, se...
[ "def", "ualberta_sys_status_send", "(", "self", ",", "mode", ",", "nav_mode", ",", "pilot", ",", "force_mavlink1", "=", "False", ")", ":", "return", "self", ".", "send", "(", "self", ".", "ualberta_sys_status_encode", "(", "mode", ",", "nav_mode", ",", "pilo...
System status specific to ualberta uav mode : System mode, see UALBERTA_AUTOPILOT_MODE ENUM (uint8_t) nav_mode : Navigation mode, see UALBERTA_NAV_MODE ENUM (uint8_t) pilot : Pilot mode, see UALBERTA_PILOT_MODE (u...
[ "System", "status", "specific", "to", "ualberta", "uav" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v20/ualberta.py#L7434-L7443
235,141
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v20/ualberta.py
MAVLink.button_change_send
def button_change_send(self, time_boot_ms, last_change_ms, state, force_mavlink1=False): ''' Report button state change time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) last_change_ms : Time of last change of bu...
python
def button_change_send(self, time_boot_ms, last_change_ms, state, force_mavlink1=False): ''' Report button state change time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) last_change_ms : Time of last change of bu...
[ "def", "button_change_send", "(", "self", ",", "time_boot_ms", ",", "last_change_ms", ",", "state", ",", "force_mavlink1", "=", "False", ")", ":", "return", "self", ".", "send", "(", "self", ".", "button_change_encode", "(", "time_boot_ms", ",", "last_change_ms"...
Report button state change time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t) last_change_ms : Time of last change of button state (uint32_t) state : Bitmap state of buttons (uint8_t)
[ "Report", "button", "state", "change" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v20/ualberta.py#L12186-L12195
235,142
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/lib/ANUGA/redfearn.py
convert_from_latlon_to_utm
def convert_from_latlon_to_utm(points=None, latitudes=None, longitudes=None, false_easting=None, false_northing=None): """Convert latitude and longitude data to UTM as a list of coordinates. ...
python
def convert_from_latlon_to_utm(points=None, latitudes=None, longitudes=None, false_easting=None, false_northing=None): """Convert latitude and longitude data to UTM as a list of coordinates. ...
[ "def", "convert_from_latlon_to_utm", "(", "points", "=", "None", ",", "latitudes", "=", "None", ",", "longitudes", "=", "None", ",", "false_easting", "=", "None", ",", "false_northing", "=", "None", ")", ":", "old_geo", "=", "Geo_reference", "(", ")", "utm_p...
Convert latitude and longitude data to UTM as a list of coordinates. Input points: list of points given in decimal degrees (latitude, longitude) or latitudes: list of latitudes and longitudes: list of longitudes false_easting (optional) false_northing (optional) Output points: Lis...
[ "Convert", "latitude", "and", "longitude", "data", "to", "UTM", "as", "a", "list", "of", "coordinates", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/lib/ANUGA/redfearn.py#L199-L243
235,143
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/quaternion.py
QuaternionBase.dcm
def dcm(self): """ Get the DCM :returns: 3x3 array """ if self._dcm is None: if self._q is not None: # try to get dcm from q self._dcm = self._q_to_dcm(self.q) elif self._euler is not None: # try to get get ...
python
def dcm(self): """ Get the DCM :returns: 3x3 array """ if self._dcm is None: if self._q is not None: # try to get dcm from q self._dcm = self._q_to_dcm(self.q) elif self._euler is not None: # try to get get ...
[ "def", "dcm", "(", "self", ")", ":", "if", "self", ".", "_dcm", "is", "None", ":", "if", "self", ".", "_q", "is", "not", "None", ":", "# try to get dcm from q", "self", ".", "_dcm", "=", "self", ".", "_q_to_dcm", "(", "self", ".", "q", ")", "elif",...
Get the DCM :returns: 3x3 array
[ "Get", "the", "DCM" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/quaternion.py#L128-L141
235,144
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/tools/mavgpslock.py
lock_time
def lock_time(logfile): '''work out gps lock times for a log file''' print("Processing log %s" % filename) mlog = mavutil.mavlink_connection(filename) locked = False start_time = 0.0 total_time = 0.0 t = None m = mlog.recv_match(type=['GPS_RAW_INT','GPS_RAW'], condition=args.condition) ...
python
def lock_time(logfile): '''work out gps lock times for a log file''' print("Processing log %s" % filename) mlog = mavutil.mavlink_connection(filename) locked = False start_time = 0.0 total_time = 0.0 t = None m = mlog.recv_match(type=['GPS_RAW_INT','GPS_RAW'], condition=args.condition) ...
[ "def", "lock_time", "(", "logfile", ")", ":", "print", "(", "\"Processing log %s\"", "%", "filename", ")", "mlog", "=", "mavutil", ".", "mavlink_connection", "(", "filename", ")", "locked", "=", "False", "start_time", "=", "0.0", "total_time", "=", "0.0", "t...
work out gps lock times for a log file
[ "work", "out", "gps", "lock", "times", "for", "a", "log", "file" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/tools/mavgpslock.py#L19-L58
235,145
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py
MPSlipMapFrame.on_menu
def on_menu(self, event): '''handle menu selection''' state = self.state # see if it is a popup menu if state.popup_object is not None: obj = state.popup_object ret = obj.popup_menu.find_selected(event) if ret is not None: ret.call_hand...
python
def on_menu(self, event): '''handle menu selection''' state = self.state # see if it is a popup menu if state.popup_object is not None: obj = state.popup_object ret = obj.popup_menu.find_selected(event) if ret is not None: ret.call_hand...
[ "def", "on_menu", "(", "self", ",", "event", ")", ":", "state", "=", "self", ".", "state", "# see if it is a popup menu", "if", "state", ".", "popup_object", "is", "not", "None", ":", "obj", "=", "state", ".", "popup_object", "ret", "=", "obj", ".", "pop...
handle menu selection
[ "handle", "menu", "selection" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py#L49-L88
235,146
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py
MPSlipMapFrame.follow
def follow(self, object): '''follow an object on the map''' state = self.state (px,py) = state.panel.pixmapper(object.latlon) ratio = 0.25 if (px > ratio*state.width and px < (1.0-ratio)*state.width and py > ratio*state.height and py < (1.0-rat...
python
def follow(self, object): '''follow an object on the map''' state = self.state (px,py) = state.panel.pixmapper(object.latlon) ratio = 0.25 if (px > ratio*state.width and px < (1.0-ratio)*state.width and py > ratio*state.height and py < (1.0-rat...
[ "def", "follow", "(", "self", ",", "object", ")", ":", "state", "=", "self", ".", "state", "(", "px", ",", "py", ")", "=", "state", ".", "panel", ".", "pixmapper", "(", "object", ".", "latlon", ")", "ratio", "=", "0.25", "if", "(", "px", ">", "...
follow an object on the map
[ "follow", "an", "object", "on", "the", "map" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py#L101-L118
235,147
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py
MPSlipMapFrame.add_object
def add_object(self, obj): '''add an object to a later''' state = self.state if not obj.layer in state.layers: # its a new layer state.layers[obj.layer] = {} state.layers[obj.layer][obj.key] = obj state.need_redraw = True
python
def add_object(self, obj): '''add an object to a later''' state = self.state if not obj.layer in state.layers: # its a new layer state.layers[obj.layer] = {} state.layers[obj.layer][obj.key] = obj state.need_redraw = True
[ "def", "add_object", "(", "self", ",", "obj", ")", ":", "state", "=", "self", ".", "state", "if", "not", "obj", ".", "layer", "in", "state", ".", "layers", ":", "# its a new layer", "state", ".", "layers", "[", "obj", ".", "layer", "]", "=", "{", "...
add an object to a later
[ "add", "an", "object", "to", "a", "later" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py#L120-L127
235,148
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py
MPSlipMapFrame.remove_object
def remove_object(self, key): '''remove an object by key from all layers''' state = self.state for layer in state.layers: state.layers[layer].pop(key, None) state.need_redraw = True
python
def remove_object(self, key): '''remove an object by key from all layers''' state = self.state for layer in state.layers: state.layers[layer].pop(key, None) state.need_redraw = True
[ "def", "remove_object", "(", "self", ",", "key", ")", ":", "state", "=", "self", ".", "state", "for", "layer", "in", "state", ".", "layers", ":", "state", ".", "layers", "[", "layer", "]", ".", "pop", "(", "key", ",", "None", ")", "state", ".", "...
remove an object by key from all layers
[ "remove", "an", "object", "by", "key", "from", "all", "layers" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py#L129-L134
235,149
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py
MPSlipMapPanel.current_view
def current_view(self): '''return a tuple representing the current view''' state = self.state return (state.lat, state.lon, state.width, state.height, state.ground_width, state.mt.tiles_pending())
python
def current_view(self): '''return a tuple representing the current view''' state = self.state return (state.lat, state.lon, state.width, state.height, state.ground_width, state.mt.tiles_pending())
[ "def", "current_view", "(", "self", ")", ":", "state", "=", "self", ".", "state", "return", "(", "state", ".", "lat", ",", "state", ".", "lon", ",", "state", ".", "width", ",", "state", ".", "height", ",", "state", ".", "ground_width", ",", "state", ...
return a tuple representing the current view
[ "return", "a", "tuple", "representing", "the", "current", "view" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py#L276-L280
235,150
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py
MPSlipMapPanel.coordinates
def coordinates(self, x, y): '''return coordinates of a pixel in the map''' state = self.state return state.mt.coord_from_area(x, y, state.lat, state.lon, state.width, state.ground_width)
python
def coordinates(self, x, y): '''return coordinates of a pixel in the map''' state = self.state return state.mt.coord_from_area(x, y, state.lat, state.lon, state.width, state.ground_width)
[ "def", "coordinates", "(", "self", ",", "x", ",", "y", ")", ":", "state", "=", "self", ".", "state", "return", "state", ".", "mt", ".", "coord_from_area", "(", "x", ",", "y", ",", "state", ".", "lat", ",", "state", ".", "lon", ",", "state", ".", ...
return coordinates of a pixel in the map
[ "return", "coordinates", "of", "a", "pixel", "in", "the", "map" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py#L282-L285
235,151
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py
MPSlipMapPanel.re_center
def re_center(self, x, y, lat, lon): '''re-center view for pixel x,y''' state = self.state if lat is None or lon is None: return (lat2,lon2) = self.coordinates(x, y) distance = mp_util.gps_distance(lat2, lon2, lat, lon) bearing = mp_util.gps_bearing(lat2, lon...
python
def re_center(self, x, y, lat, lon): '''re-center view for pixel x,y''' state = self.state if lat is None or lon is None: return (lat2,lon2) = self.coordinates(x, y) distance = mp_util.gps_distance(lat2, lon2, lat, lon) bearing = mp_util.gps_bearing(lat2, lon...
[ "def", "re_center", "(", "self", ",", "x", ",", "y", ",", "lat", ",", "lon", ")", ":", "state", "=", "self", ".", "state", "if", "lat", "is", "None", "or", "lon", "is", "None", ":", "return", "(", "lat2", ",", "lon2", ")", "=", "self", ".", "...
re-center view for pixel x,y
[ "re", "-", "center", "view", "for", "pixel", "x", "y" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py#L287-L295
235,152
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py
MPSlipMapPanel.change_zoom
def change_zoom(self, zoom): '''zoom in or out by zoom factor, keeping centered''' state = self.state if self.mouse_pos: (x,y) = (self.mouse_pos.x, self.mouse_pos.y) else: (x,y) = (state.width/2, state.height/2) (lat,lon) = self.coordinates(x, y) s...
python
def change_zoom(self, zoom): '''zoom in or out by zoom factor, keeping centered''' state = self.state if self.mouse_pos: (x,y) = (self.mouse_pos.x, self.mouse_pos.y) else: (x,y) = (state.width/2, state.height/2) (lat,lon) = self.coordinates(x, y) s...
[ "def", "change_zoom", "(", "self", ",", "zoom", ")", ":", "state", "=", "self", ".", "state", "if", "self", ".", "mouse_pos", ":", "(", "x", ",", "y", ")", "=", "(", "self", ".", "mouse_pos", ".", "x", ",", "self", ".", "mouse_pos", ".", "y", "...
zoom in or out by zoom factor, keeping centered
[ "zoom", "in", "or", "out", "by", "zoom", "factor", "keeping", "centered" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py#L297-L309
235,153
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py
MPSlipMapPanel.enter_position
def enter_position(self): '''enter new position''' state = self.state dlg = wx.TextEntryDialog(self, 'Enter new position', 'Position') dlg.SetValue("%f %f" % (state.lat, state.lon)) if dlg.ShowModal() == wx.ID_OK: latlon = dlg.GetValue().split() dlg.Destro...
python
def enter_position(self): '''enter new position''' state = self.state dlg = wx.TextEntryDialog(self, 'Enter new position', 'Position') dlg.SetValue("%f %f" % (state.lat, state.lon)) if dlg.ShowModal() == wx.ID_OK: latlon = dlg.GetValue().split() dlg.Destro...
[ "def", "enter_position", "(", "self", ")", ":", "state", "=", "self", ".", "state", "dlg", "=", "wx", ".", "TextEntryDialog", "(", "self", ",", "'Enter new position'", ",", "'Position'", ")", "dlg", ".", "SetValue", "(", "\"%f %f\"", "%", "(", "state", "...
enter new position
[ "enter", "new", "position" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py#L311-L322
235,154
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py
MPSlipMapPanel.update_position
def update_position(self): '''update position text''' state = self.state pos = self.mouse_pos newtext = '' alt = 0 if pos is not None: (lat,lon) = self.coordinates(pos.x, pos.y) newtext += 'Cursor: %f %f (%s)' % (lat, lon, mp_util.latlon_to_grid((l...
python
def update_position(self): '''update position text''' state = self.state pos = self.mouse_pos newtext = '' alt = 0 if pos is not None: (lat,lon) = self.coordinates(pos.x, pos.y) newtext += 'Cursor: %f %f (%s)' % (lat, lon, mp_util.latlon_to_grid((l...
[ "def", "update_position", "(", "self", ")", ":", "state", "=", "self", ".", "state", "pos", "=", "self", ".", "mouse_pos", "newtext", "=", "''", "alt", "=", "0", "if", "pos", "is", "not", "None", ":", "(", "lat", ",", "lon", ")", "=", "self", "."...
update position text
[ "update", "position", "text" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py#L324-L360
235,155
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py
MPSlipMapPanel.selected_objects
def selected_objects(self, pos): '''return a list of matching objects for a position''' state = self.state selected = [] (px, py) = pos for layer in state.layers: for key in state.layers[layer]: obj = state.layers[layer][key] distance =...
python
def selected_objects(self, pos): '''return a list of matching objects for a position''' state = self.state selected = [] (px, py) = pos for layer in state.layers: for key in state.layers[layer]: obj = state.layers[layer][key] distance =...
[ "def", "selected_objects", "(", "self", ",", "pos", ")", ":", "state", "=", "self", ".", "state", "selected", "=", "[", "]", "(", "px", ",", "py", ")", "=", "pos", "for", "layer", "in", "state", ".", "layers", ":", "for", "key", "in", "state", "....
return a list of matching objects for a position
[ "return", "a", "list", "of", "matching", "objects", "for", "a", "position" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py#L458-L470
235,156
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py
MPSlipMapPanel.show_default_popup
def show_default_popup(self, pos): '''show default popup menu''' state = self.state if state.default_popup.popup is not None: wx_menu = state.default_popup.popup.wx_menu() state.frame.PopupMenu(wx_menu, pos)
python
def show_default_popup(self, pos): '''show default popup menu''' state = self.state if state.default_popup.popup is not None: wx_menu = state.default_popup.popup.wx_menu() state.frame.PopupMenu(wx_menu, pos)
[ "def", "show_default_popup", "(", "self", ",", "pos", ")", ":", "state", "=", "self", ".", "state", "if", "state", ".", "default_popup", ".", "popup", "is", "not", "None", ":", "wx_menu", "=", "state", ".", "default_popup", ".", "popup", ".", "wx_menu", ...
show default popup menu
[ "show", "default", "popup", "menu" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py#L485-L490
235,157
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py
MPSlipMapPanel.clear_thumbnails
def clear_thumbnails(self): '''clear all thumbnails from the map''' state = self.state for l in state.layers: keys = state.layers[l].keys()[:] for key in keys: if (isinstance(state.layers[l][key], SlipThumbnail) and not isinstance(state...
python
def clear_thumbnails(self): '''clear all thumbnails from the map''' state = self.state for l in state.layers: keys = state.layers[l].keys()[:] for key in keys: if (isinstance(state.layers[l][key], SlipThumbnail) and not isinstance(state...
[ "def", "clear_thumbnails", "(", "self", ")", ":", "state", "=", "self", ".", "state", "for", "l", "in", "state", ".", "layers", ":", "keys", "=", "state", ".", "layers", "[", "l", "]", ".", "keys", "(", ")", "[", ":", "]", "for", "key", "in", "...
clear all thumbnails from the map
[ "clear", "all", "thumbnails", "from", "the", "map" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py#L545-L553
235,158
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py
MPSlipMapPanel.on_key_down
def on_key_down(self, event): '''handle keyboard input''' state = self.state # send all key events to the parent if self.mouse_pos: latlon = self.coordinates(self.mouse_pos.x, self.mouse_pos.y) selected = self.selected_objects(self.mouse_pos) state.ev...
python
def on_key_down(self, event): '''handle keyboard input''' state = self.state # send all key events to the parent if self.mouse_pos: latlon = self.coordinates(self.mouse_pos.x, self.mouse_pos.y) selected = self.selected_objects(self.mouse_pos) state.ev...
[ "def", "on_key_down", "(", "self", ",", "event", ")", ":", "state", "=", "self", ".", "state", "# send all key events to the parent", "if", "self", ".", "mouse_pos", ":", "latlon", "=", "self", ".", "coordinates", "(", "self", ".", "mouse_pos", ".", "x", "...
handle keyboard input
[ "handle", "keyboard", "input" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py#L555-L577
235,159
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/mavexpression.py
evaluate_expression
def evaluate_expression(expression, vars): '''evaluation an expression''' try: v = eval(expression, globals(), vars) except NameError: return None except ZeroDivisionError: return None return v
python
def evaluate_expression(expression, vars): '''evaluation an expression''' try: v = eval(expression, globals(), vars) except NameError: return None except ZeroDivisionError: return None return v
[ "def", "evaluate_expression", "(", "expression", ",", "vars", ")", ":", "try", ":", "v", "=", "eval", "(", "expression", ",", "globals", "(", ")", ",", "vars", ")", "except", "NameError", ":", "return", "None", "except", "ZeroDivisionError", ":", "return",...
evaluation an expression
[ "evaluation", "an", "expression" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/mavexpression.py#L26-L34
235,160
JdeRobot/base
src/tools/colorTuner_py/QDarkStyleSheet/qdarkstyle/compile_qrc.py
compile_all
def compile_all(): """ Compile style.qrc using rcc, pyside-rcc and pyrcc4 """ # print("Compiling for Qt: style.qrc -> style.rcc") # os.system("rcc style.qrc -o style.rcc") print("Compiling for PyQt4: style.qrc -> pyqt_style_rc.py") os.system("pyrcc4 -py3 style.qrc -o pyqt_style_rc.py") p...
python
def compile_all(): """ Compile style.qrc using rcc, pyside-rcc and pyrcc4 """ # print("Compiling for Qt: style.qrc -> style.rcc") # os.system("rcc style.qrc -o style.rcc") print("Compiling for PyQt4: style.qrc -> pyqt_style_rc.py") os.system("pyrcc4 -py3 style.qrc -o pyqt_style_rc.py") p...
[ "def", "compile_all", "(", ")", ":", "# print(\"Compiling for Qt: style.qrc -> style.rcc\")", "# os.system(\"rcc style.qrc -o style.rcc\")", "print", "(", "\"Compiling for PyQt4: style.qrc -> pyqt_style_rc.py\"", ")", "os", ".", "system", "(", "\"pyrcc4 -py3 style.qrc -o pyqt_style_rc....
Compile style.qrc using rcc, pyside-rcc and pyrcc4
[ "Compile", "style", ".", "qrc", "using", "rcc", "pyside", "-", "rcc", "and", "pyrcc4" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/tools/colorTuner_py/QDarkStyleSheet/qdarkstyle/compile_qrc.py#L39-L50
235,161
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py
null_term
def null_term(str): '''null terminate a string''' idx = str.find("\0") if idx != -1: str = str[:idx] return str
python
def null_term(str): '''null terminate a string''' idx = str.find("\0") if idx != -1: str = str[:idx] return str
[ "def", "null_term", "(", "str", ")", ":", "idx", "=", "str", ".", "find", "(", "\"\\0\"", ")", "if", "idx", "!=", "-", "1", ":", "str", "=", "str", "[", ":", "idx", "]", "return", "str" ]
null terminate a string
[ "null", "terminate", "a", "string" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py#L71-L76
235,162
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py
DFReader_is_text_log
def DFReader_is_text_log(filename): '''return True if a file appears to be a valid text log''' f = open(filename) ret = (f.read(8000).find('FMT, ') != -1) f.close() return ret
python
def DFReader_is_text_log(filename): '''return True if a file appears to be a valid text log''' f = open(filename) ret = (f.read(8000).find('FMT, ') != -1) f.close() return ret
[ "def", "DFReader_is_text_log", "(", "filename", ")", ":", "f", "=", "open", "(", "filename", ")", "ret", "=", "(", "f", ".", "read", "(", "8000", ")", ".", "find", "(", "'FMT, '", ")", "!=", "-", "1", ")", "f", ".", "close", "(", ")", "return", ...
return True if a file appears to be a valid text log
[ "return", "True", "if", "a", "file", "appears", "to", "be", "a", "valid", "text", "log" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py#L594-L599
235,163
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py
DFMessage.get_msgbuf
def get_msgbuf(self): '''create a binary message buffer for a message''' values = [] for i in range(len(self.fmt.columns)): if i >= len(self.fmt.msg_mults): continue mul = self.fmt.msg_mults[i] name = self.fmt.columns[i] if name == ...
python
def get_msgbuf(self): '''create a binary message buffer for a message''' values = [] for i in range(len(self.fmt.columns)): if i >= len(self.fmt.msg_mults): continue mul = self.fmt.msg_mults[i] name = self.fmt.columns[i] if name == ...
[ "def", "get_msgbuf", "(", "self", ")", ":", "values", "=", "[", "]", "for", "i", "in", "range", "(", "len", "(", "self", ".", "fmt", ".", "columns", ")", ")", ":", "if", "i", ">=", "len", "(", "self", ".", "fmt", ".", "msg_mults", ")", ":", "...
create a binary message buffer for a message
[ "create", "a", "binary", "message", "buffer", "for", "a", "message" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py#L121-L135
235,164
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py
DFReaderClock_usec.find_time_base
def find_time_base(self, gps, first_us_stamp): '''work out time basis for the log - even newer style''' t = self._gpsTimeToTime(gps.GWk, gps.GMS) self.set_timebase(t - gps.TimeUS*0.000001) # this ensures FMT messages get appropriate timestamp: self.timestamp = self.timebase + fir...
python
def find_time_base(self, gps, first_us_stamp): '''work out time basis for the log - even newer style''' t = self._gpsTimeToTime(gps.GWk, gps.GMS) self.set_timebase(t - gps.TimeUS*0.000001) # this ensures FMT messages get appropriate timestamp: self.timestamp = self.timebase + fir...
[ "def", "find_time_base", "(", "self", ",", "gps", ",", "first_us_stamp", ")", ":", "t", "=", "self", ".", "_gpsTimeToTime", "(", "gps", ".", "GWk", ",", "gps", ".", "GMS", ")", "self", ".", "set_timebase", "(", "t", "-", "gps", ".", "TimeUS", "*", ...
work out time basis for the log - even newer style
[ "work", "out", "time", "basis", "for", "the", "log", "-", "even", "newer", "style" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py#L166-L171
235,165
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py
DFReaderClock_msec.find_time_base
def find_time_base(self, gps, first_ms_stamp): '''work out time basis for the log - new style''' t = self._gpsTimeToTime(gps.Week, gps.TimeMS) self.set_timebase(t - gps.T*0.001) self.timestamp = self.timebase + first_ms_stamp*0.001
python
def find_time_base(self, gps, first_ms_stamp): '''work out time basis for the log - new style''' t = self._gpsTimeToTime(gps.Week, gps.TimeMS) self.set_timebase(t - gps.T*0.001) self.timestamp = self.timebase + first_ms_stamp*0.001
[ "def", "find_time_base", "(", "self", ",", "gps", ",", "first_ms_stamp", ")", ":", "t", "=", "self", ".", "_gpsTimeToTime", "(", "gps", ".", "Week", ",", "gps", ".", "TimeMS", ")", "self", ".", "set_timebase", "(", "t", "-", "gps", ".", "T", "*", "...
work out time basis for the log - new style
[ "work", "out", "time", "basis", "for", "the", "log", "-", "new", "style" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py#L204-L208
235,166
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py
DFReaderClock_px4.find_time_base
def find_time_base(self, gps): '''work out time basis for the log - PX4 native''' t = gps.GPSTime * 1.0e-6 self.timebase = t - self.px4_timebase
python
def find_time_base(self, gps): '''work out time basis for the log - PX4 native''' t = gps.GPSTime * 1.0e-6 self.timebase = t - self.px4_timebase
[ "def", "find_time_base", "(", "self", ",", "gps", ")", ":", "t", "=", "gps", ".", "GPSTime", "*", "1.0e-6", "self", ".", "timebase", "=", "t", "-", "self", ".", "px4_timebase" ]
work out time basis for the log - PX4 native
[ "work", "out", "time", "basis", "for", "the", "log", "-", "PX4", "native" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py#L225-L228
235,167
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py
DFReaderClock_gps_interpolated.gps_message_arrived
def gps_message_arrived(self, m): '''adjust time base from GPS message''' # msec-style GPS message? gps_week = getattr(m, 'Week', None) gps_timems = getattr(m, 'TimeMS', None) if gps_week is None: # usec-style GPS message? gps_week = getattr(m, 'GWk', None...
python
def gps_message_arrived(self, m): '''adjust time base from GPS message''' # msec-style GPS message? gps_week = getattr(m, 'Week', None) gps_timems = getattr(m, 'TimeMS', None) if gps_week is None: # usec-style GPS message? gps_week = getattr(m, 'GWk', None...
[ "def", "gps_message_arrived", "(", "self", ",", "m", ")", ":", "# msec-style GPS message?", "gps_week", "=", "getattr", "(", "m", ",", "'Week'", ",", "None", ")", "gps_timems", "=", "getattr", "(", "m", ",", "'TimeMS'", ",", "None", ")", "if", "gps_week", ...
adjust time base from GPS message
[ "adjust", "time", "base", "from", "GPS", "message" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py#L270-L298
235,168
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py
DFReader._rewind
def _rewind(self): '''reset state on rewind''' self.messages = { 'MAV' : self } self.flightmode = "UNKNOWN" self.percent = 0 if self.clock: self.clock.rewind_event()
python
def _rewind(self): '''reset state on rewind''' self.messages = { 'MAV' : self } self.flightmode = "UNKNOWN" self.percent = 0 if self.clock: self.clock.rewind_event()
[ "def", "_rewind", "(", "self", ")", ":", "self", ".", "messages", "=", "{", "'MAV'", ":", "self", "}", "self", ".", "flightmode", "=", "\"UNKNOWN\"", "self", ".", "percent", "=", "0", "if", "self", ".", "clock", ":", "self", ".", "clock", ".", "rew...
reset state on rewind
[ "reset", "state", "on", "rewind" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py#L318-L324
235,169
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py
DFReader.init_clock
def init_clock(self): '''work out time basis for the log''' self._rewind() # speculatively create a gps clock in case we don't find anything # better gps_clock = DFReaderClock_gps_interpolated() self.clock = gps_clock px4_msg_time = None px4_msg_gps = N...
python
def init_clock(self): '''work out time basis for the log''' self._rewind() # speculatively create a gps clock in case we don't find anything # better gps_clock = DFReaderClock_gps_interpolated() self.clock = gps_clock px4_msg_time = None px4_msg_gps = N...
[ "def", "init_clock", "(", "self", ")", ":", "self", ".", "_rewind", "(", ")", "# speculatively create a gps clock in case we don't find anything", "# better", "gps_clock", "=", "DFReaderClock_gps_interpolated", "(", ")", "self", ".", "clock", "=", "gps_clock", "px4_msg_...
work out time basis for the log
[ "work", "out", "time", "basis", "for", "the", "log" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py#L343-L431
235,170
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py
DFReader._set_time
def _set_time(self, m): '''set time for a message''' # really just left here for profiling m._timestamp = self.timestamp if len(m._fieldnames) > 0 and self.clock is not None: self.clock.set_message_timestamp(m)
python
def _set_time(self, m): '''set time for a message''' # really just left here for profiling m._timestamp = self.timestamp if len(m._fieldnames) > 0 and self.clock is not None: self.clock.set_message_timestamp(m)
[ "def", "_set_time", "(", "self", ",", "m", ")", ":", "# really just left here for profiling", "m", ".", "_timestamp", "=", "self", ".", "timestamp", "if", "len", "(", "m", ".", "_fieldnames", ")", ">", "0", "and", "self", ".", "clock", "is", "not", "None...
set time for a message
[ "set", "time", "for", "a", "message" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py#L433-L438
235,171
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py
DFReader._add_msg
def _add_msg(self, m): '''add a new message''' type = m.get_type() self.messages[type] = m if self.clock: self.clock.message_arrived(m) if type == 'MSG': if m.Message.find("Rover") != -1: self.mav_type = mavutil.mavlink.MAV_TYPE_GROUND_RO...
python
def _add_msg(self, m): '''add a new message''' type = m.get_type() self.messages[type] = m if self.clock: self.clock.message_arrived(m) if type == 'MSG': if m.Message.find("Rover") != -1: self.mav_type = mavutil.mavlink.MAV_TYPE_GROUND_RO...
[ "def", "_add_msg", "(", "self", ",", "m", ")", ":", "type", "=", "m", ".", "get_type", "(", ")", "self", ".", "messages", "[", "type", "]", "=", "m", "if", "self", ".", "clock", ":", "self", ".", "clock", ".", "message_arrived", "(", "m", ")", ...
add a new message
[ "add", "a", "new", "message" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py#L443-L473
235,172
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py
DFReader.recv_match
def recv_match(self, condition=None, type=None, blocking=False): '''recv the next message that matches the given condition type can be a string or a list of strings''' if type is not None and not isinstance(type, list): type = [type] while True: m = self.recv_msg(...
python
def recv_match(self, condition=None, type=None, blocking=False): '''recv the next message that matches the given condition type can be a string or a list of strings''' if type is not None and not isinstance(type, list): type = [type] while True: m = self.recv_msg(...
[ "def", "recv_match", "(", "self", ",", "condition", "=", "None", ",", "type", "=", "None", ",", "blocking", "=", "False", ")", ":", "if", "type", "is", "not", "None", "and", "not", "isinstance", "(", "type", ",", "list", ")", ":", "type", "=", "[",...
recv the next message that matches the given condition type can be a string or a list of strings
[ "recv", "the", "next", "message", "that", "matches", "the", "given", "condition", "type", "can", "be", "a", "string", "or", "a", "list", "of", "strings" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py#L475-L488
235,173
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py
DFReader.param
def param(self, name, default=None): '''convenient function for returning an arbitrary MAVLink parameter with a default''' if not name in self.params: return default return self.params[name]
python
def param(self, name, default=None): '''convenient function for returning an arbitrary MAVLink parameter with a default''' if not name in self.params: return default return self.params[name]
[ "def", "param", "(", "self", ",", "name", ",", "default", "=", "None", ")", ":", "if", "not", "name", "in", "self", ".", "params", ":", "return", "default", "return", "self", ".", "params", "[", "name", "]" ]
convenient function for returning an arbitrary MAVLink parameter with a default
[ "convenient", "function", "for", "returning", "an", "arbitrary", "MAVLink", "parameter", "with", "a", "default" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/DFReader.py#L494-L499
235,174
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/slugs.py
MAVLink.cpu_load_send
def cpu_load_send(self, sensLoad, ctrlLoad, batVolt, force_mavlink1=False): ''' Sensor and DSC control loads. sensLoad : Sensor DSC Load (uint8_t) ctrlLoad : Control DSC Load (uint8_t) batVolt ...
python
def cpu_load_send(self, sensLoad, ctrlLoad, batVolt, force_mavlink1=False): ''' Sensor and DSC control loads. sensLoad : Sensor DSC Load (uint8_t) ctrlLoad : Control DSC Load (uint8_t) batVolt ...
[ "def", "cpu_load_send", "(", "self", ",", "sensLoad", ",", "ctrlLoad", ",", "batVolt", ",", "force_mavlink1", "=", "False", ")", ":", "return", "self", ".", "send", "(", "self", ".", "cpu_load_encode", "(", "sensLoad", ",", "ctrlLoad", ",", "batVolt", ")",...
Sensor and DSC control loads. sensLoad : Sensor DSC Load (uint8_t) ctrlLoad : Control DSC Load (uint8_t) batVolt : Battery Voltage in millivolts (uint16_t)
[ "Sensor", "and", "DSC", "control", "loads", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/slugs.py#L7816-L7825
235,175
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/slugs.py
MAVLink.ctrl_srfc_pt_send
def ctrl_srfc_pt_send(self, target, bitfieldPt, force_mavlink1=False): ''' This message sets the control surfaces for selective passthrough mode. target : The system setting the commands (uint8_t) bitfieldPt : Bitfield co...
python
def ctrl_srfc_pt_send(self, target, bitfieldPt, force_mavlink1=False): ''' This message sets the control surfaces for selective passthrough mode. target : The system setting the commands (uint8_t) bitfieldPt : Bitfield co...
[ "def", "ctrl_srfc_pt_send", "(", "self", ",", "target", ",", "bitfieldPt", ",", "force_mavlink1", "=", "False", ")", ":", "return", "self", ".", "send", "(", "self", ".", "ctrl_srfc_pt_encode", "(", "target", ",", "bitfieldPt", ")", ",", "force_mavlink1", "=...
This message sets the control surfaces for selective passthrough mode. target : The system setting the commands (uint8_t) bitfieldPt : Bitfield containing the passthrough configuration, see CONTROL_SURFACE_FLAG ENUM. (uint16_t)
[ "This", "message", "sets", "the", "control", "surfaces", "for", "selective", "passthrough", "mode", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/slugs.py#L8025-L8033
235,176
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/slugs.py
MAVLink.slugs_mobile_location_send
def slugs_mobile_location_send(self, target, latitude, longitude, force_mavlink1=False): ''' Transmits the last known position of the mobile GS to the UAV. Very relevant when Track Mobile is enabled target : The system reporting the act...
python
def slugs_mobile_location_send(self, target, latitude, longitude, force_mavlink1=False): ''' Transmits the last known position of the mobile GS to the UAV. Very relevant when Track Mobile is enabled target : The system reporting the act...
[ "def", "slugs_mobile_location_send", "(", "self", ",", "target", ",", "latitude", ",", "longitude", ",", "force_mavlink1", "=", "False", ")", ":", "return", "self", ".", "send", "(", "self", ".", "slugs_mobile_location_encode", "(", "target", ",", "latitude", ...
Transmits the last known position of the mobile GS to the UAV. Very relevant when Track Mobile is enabled target : The system reporting the action (uint8_t) latitude : Mobile Latitude (float) longitude :...
[ "Transmits", "the", "last", "known", "position", "of", "the", "mobile", "GS", "to", "the", "UAV", ".", "Very", "relevant", "when", "Track", "Mobile", "is", "enabled" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/slugs.py#L8097-L8107
235,177
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/slugs.py
MAVLink.slugs_configuration_camera_send
def slugs_configuration_camera_send(self, target, idOrder, order, force_mavlink1=False): ''' Control for camara. target : The system setting the commands (uint8_t) idOrder : ID 0: brightness 1: aperture 2: iris 3: ICR ...
python
def slugs_configuration_camera_send(self, target, idOrder, order, force_mavlink1=False): ''' Control for camara. target : The system setting the commands (uint8_t) idOrder : ID 0: brightness 1: aperture 2: iris 3: ICR ...
[ "def", "slugs_configuration_camera_send", "(", "self", ",", "target", ",", "idOrder", ",", "order", ",", "force_mavlink1", "=", "False", ")", ":", "return", "self", ".", "send", "(", "self", ".", "slugs_configuration_camera_encode", "(", "target", ",", "idOrder"...
Control for camara. target : The system setting the commands (uint8_t) idOrder : ID 0: brightness 1: aperture 2: iris 3: ICR 4: backlight (uint8_t) order : 1: up/on 2: down/off 3: auto/reset/no action (uint8_t)
[ "Control", "for", "camara", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/slugs.py#L8120-L8129
235,178
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/slugs.py
MAVLink.volt_sensor_send
def volt_sensor_send(self, r2Type, voltage, reading2, force_mavlink1=False): ''' Transmits the readings from the voltage and current sensors r2Type : It is the value of reading 2: 0 - Current, 1 - Foreward Sonar, 2 - Back Sonar, 3 - RPM (uint8_t) ...
python
def volt_sensor_send(self, r2Type, voltage, reading2, force_mavlink1=False): ''' Transmits the readings from the voltage and current sensors r2Type : It is the value of reading 2: 0 - Current, 1 - Foreward Sonar, 2 - Back Sonar, 3 - RPM (uint8_t) ...
[ "def", "volt_sensor_send", "(", "self", ",", "r2Type", ",", "voltage", ",", "reading2", ",", "force_mavlink1", "=", "False", ")", ":", "return", "self", ".", "send", "(", "self", ".", "volt_sensor_encode", "(", "r2Type", ",", "voltage", ",", "reading2", ")...
Transmits the readings from the voltage and current sensors r2Type : It is the value of reading 2: 0 - Current, 1 - Foreward Sonar, 2 - Back Sonar, 3 - RPM (uint8_t) voltage : Voltage in uS of PWM. 0 uS = 0V, 20 uS = 21.5V (uint16_t) ...
[ "Transmits", "the", "readings", "from", "the", "voltage", "and", "current", "sensors" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/slugs.py#L8172-L8181
235,179
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/slugs.py
MAVLink.ptz_status_send
def ptz_status_send(self, zoom, pan, tilt, force_mavlink1=False): ''' Transmits the actual Pan, Tilt and Zoom values of the camera unit zoom : The actual Zoom Value (uint8_t) pan : The Pan value in 10ths of degre...
python
def ptz_status_send(self, zoom, pan, tilt, force_mavlink1=False): ''' Transmits the actual Pan, Tilt and Zoom values of the camera unit zoom : The actual Zoom Value (uint8_t) pan : The Pan value in 10ths of degre...
[ "def", "ptz_status_send", "(", "self", ",", "zoom", ",", "pan", ",", "tilt", ",", "force_mavlink1", "=", "False", ")", ":", "return", "self", ".", "send", "(", "self", ".", "ptz_status_encode", "(", "zoom", ",", "pan", ",", "tilt", ")", ",", "force_mav...
Transmits the actual Pan, Tilt and Zoom values of the camera unit zoom : The actual Zoom Value (uint8_t) pan : The Pan value in 10ths of degree (int16_t) tilt : The Tilt value in 10ths of degree (int16_t)
[ "Transmits", "the", "actual", "Pan", "Tilt", "and", "Zoom", "values", "of", "the", "camera", "unit" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/slugs.py#L8194-L8203
235,180
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/paparazzi.py
MAVLink.script_request_send
def script_request_send(self, target_system, target_component, seq, force_mavlink1=False): ''' Request script item with the sequence number seq. The response of the system to this message should be a SCRIPT_ITEM message. target_system ...
python
def script_request_send(self, target_system, target_component, seq, force_mavlink1=False): ''' Request script item with the sequence number seq. The response of the system to this message should be a SCRIPT_ITEM message. target_system ...
[ "def", "script_request_send", "(", "self", ",", "target_system", ",", "target_component", ",", "seq", ",", "force_mavlink1", "=", "False", ")", ":", "return", "self", ".", "send", "(", "self", ".", "script_request_encode", "(", "target_system", ",", "target_comp...
Request script item with the sequence number seq. The response of the system to this message should be a SCRIPT_ITEM message. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) seq ...
[ "Request", "script", "item", "with", "the", "sequence", "number", "seq", ".", "The", "response", "of", "the", "system", "to", "this", "message", "should", "be", "a", "SCRIPT_ITEM", "message", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/paparazzi.py#L7322-L7333
235,181
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/paparazzi.py
MAVLink.script_count_send
def script_count_send(self, target_system, target_component, count, force_mavlink1=False): ''' This message is emitted as response to SCRIPT_REQUEST_LIST by the MAV to get the number of mission scripts. target_system : System ID (uint8_t) ...
python
def script_count_send(self, target_system, target_component, count, force_mavlink1=False): ''' This message is emitted as response to SCRIPT_REQUEST_LIST by the MAV to get the number of mission scripts. target_system : System ID (uint8_t) ...
[ "def", "script_count_send", "(", "self", ",", "target_system", ",", "target_component", ",", "count", ",", "force_mavlink1", "=", "False", ")", ":", "return", "self", ".", "send", "(", "self", ".", "script_count_encode", "(", "target_system", ",", "target_compon...
This message is emitted as response to SCRIPT_REQUEST_LIST by the MAV to get the number of mission scripts. target_system : System ID (uint8_t) target_component : Component ID (uint8_t) count : Number of script ite...
[ "This", "message", "is", "emitted", "as", "response", "to", "SCRIPT_REQUEST_LIST", "by", "the", "MAV", "to", "get", "the", "number", "of", "mission", "scripts", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/paparazzi.py#L7367-L7377
235,182
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/paparazzi.py
MAVLink.script_current_send
def script_current_send(self, seq, force_mavlink1=False): ''' This message informs about the currently active SCRIPT. seq : Active Sequence (uint16_t) ''' return self.send(self.script_current_encode(seq), force_mavli...
python
def script_current_send(self, seq, force_mavlink1=False): ''' This message informs about the currently active SCRIPT. seq : Active Sequence (uint16_t) ''' return self.send(self.script_current_encode(seq), force_mavli...
[ "def", "script_current_send", "(", "self", ",", "seq", ",", "force_mavlink1", "=", "False", ")", ":", "return", "self", ".", "send", "(", "self", ".", "script_current_encode", "(", "seq", ")", ",", "force_mavlink1", "=", "force_mavlink1", ")" ]
This message informs about the currently active SCRIPT. seq : Active Sequence (uint16_t)
[ "This", "message", "informs", "about", "the", "currently", "active", "SCRIPT", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/paparazzi.py#L7388-L7395
235,183
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/generator/mavgen_c.py
generate
def generate(basename, xml_list): '''generate complete MAVLink C implemenation''' for idx in range(len(xml_list)): xml = xml_list[idx] xml.xml_idx = idx generate_one(basename, xml) copy_fixed_headers(basename, xml_list[0])
python
def generate(basename, xml_list): '''generate complete MAVLink C implemenation''' for idx in range(len(xml_list)): xml = xml_list[idx] xml.xml_idx = idx generate_one(basename, xml) copy_fixed_headers(basename, xml_list[0])
[ "def", "generate", "(", "basename", ",", "xml_list", ")", ":", "for", "idx", "in", "range", "(", "len", "(", "xml_list", ")", ")", ":", "xml", "=", "xml_list", "[", "idx", "]", "xml", ".", "xml_idx", "=", "idx", "generate_one", "(", "basename", ",", ...
generate complete MAVLink C implemenation
[ "generate", "complete", "MAVLink", "C", "implemenation" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/generator/mavgen_c.py#L689-L696
235,184
JdeRobot/base
src/libs/comm_py/comm/ice/pose3dIceClient.py
Pose3D.update
def update(self): ''' Updates Pose3d. ''' pos = Pose3d() if self.hasproxy(): pose = self.proxy.getPose3DData() pos.yaw = self.quat2Yaw(pose.q0, pose.q1, pose.q2, pose.q3) pos.pitch = self.quat2Pitch(pose.q0, pose.q1, pose.q2, pose.q3) ...
python
def update(self): ''' Updates Pose3d. ''' pos = Pose3d() if self.hasproxy(): pose = self.proxy.getPose3DData() pos.yaw = self.quat2Yaw(pose.q0, pose.q1, pose.q2, pose.q3) pos.pitch = self.quat2Pitch(pose.q0, pose.q1, pose.q2, pose.q3) ...
[ "def", "update", "(", "self", ")", ":", "pos", "=", "Pose3d", "(", ")", "if", "self", ".", "hasproxy", "(", ")", ":", "pose", "=", "self", ".", "proxy", ".", "getPose3DData", "(", ")", "pos", ".", "yaw", "=", "self", ".", "quat2Yaw", "(", "pose",...
Updates Pose3d.
[ "Updates", "Pose3d", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/libs/comm_py/comm/ice/pose3dIceClient.py#L68-L86
235,185
JdeRobot/base
src/libs/comm_py/comm/ice/pose3dIceClient.py
Pose3D.getPose3d
def getPose3d(self): ''' Returns last Pose3d. @return last JdeRobotTypes Pose3d saved ''' self.lock.acquire() pose = self.pose self.lock.release() return pose
python
def getPose3d(self): ''' Returns last Pose3d. @return last JdeRobotTypes Pose3d saved ''' self.lock.acquire() pose = self.pose self.lock.release() return pose
[ "def", "getPose3d", "(", "self", ")", ":", "self", ".", "lock", ".", "acquire", "(", ")", "pose", "=", "self", ".", "pose", "self", ".", "lock", ".", "release", "(", ")", "return", "pose" ]
Returns last Pose3d. @return last JdeRobotTypes Pose3d saved
[ "Returns", "last", "Pose3d", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/libs/comm_py/comm/ice/pose3dIceClient.py#L97-L107
235,186
JdeRobot/base
src/libs/comm_py/comm/ice/pose3dIceClient.py
Pose3D.quat2Roll
def quat2Roll (self, qw, qx, qy, qz): ''' Translates from Quaternion to Roll. @param qw,qx,qy,qz: Quaternion values @type qw,qx,qy,qz: float @return Roll value translated from Quaternion ''' rotateXa0=2.0*(qy*qz + qw*qx) rotateXa1=qw*qw - qx*qx - qy*q...
python
def quat2Roll (self, qw, qx, qy, qz): ''' Translates from Quaternion to Roll. @param qw,qx,qy,qz: Quaternion values @type qw,qx,qy,qz: float @return Roll value translated from Quaternion ''' rotateXa0=2.0*(qy*qz + qw*qx) rotateXa1=qw*qw - qx*qx - qy*q...
[ "def", "quat2Roll", "(", "self", ",", "qw", ",", "qx", ",", "qy", ",", "qz", ")", ":", "rotateXa0", "=", "2.0", "*", "(", "qy", "*", "qz", "+", "qw", "*", "qx", ")", "rotateXa1", "=", "qw", "*", "qw", "-", "qx", "*", "qx", "-", "qy", "*", ...
Translates from Quaternion to Roll. @param qw,qx,qy,qz: Quaternion values @type qw,qx,qy,qz: float @return Roll value translated from Quaternion
[ "Translates", "from", "Quaternion", "to", "Roll", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/libs/comm_py/comm/ice/pose3dIceClient.py#L150-L167
235,187
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_speech.py
SpeechModule.kill_speech_dispatcher
def kill_speech_dispatcher(self): '''kill speech dispatcher processs''' if not 'HOME' in os.environ: return pidpath = os.path.join(os.environ['HOME'], '.speech-dispatcher', 'pid', 'speech-dispatcher.pid') if os.path.exists(pidpath): ...
python
def kill_speech_dispatcher(self): '''kill speech dispatcher processs''' if not 'HOME' in os.environ: return pidpath = os.path.join(os.environ['HOME'], '.speech-dispatcher', 'pid', 'speech-dispatcher.pid') if os.path.exists(pidpath): ...
[ "def", "kill_speech_dispatcher", "(", "self", ")", ":", "if", "not", "'HOME'", "in", "os", ".", "environ", ":", "return", "pidpath", "=", "os", ".", "path", ".", "join", "(", "os", ".", "environ", "[", "'HOME'", "]", ",", "'.speech-dispatcher'", ",", "...
kill speech dispatcher processs
[ "kill", "speech", "dispatcher", "processs" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_speech.py#L27-L42
235,188
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/srtm.py
SRTMDownloader.loadFileList
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: ...
python
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: ...
[ "def", "loadFileList", "(", "self", ")", ":", "try", ":", "data", "=", "open", "(", "self", ".", "filelist_file", ",", "'rb'", ")", "except", "IOError", ":", "'''print \"No SRTM cached file list. Creating new one!\"'''", "if", "self", ".", "offline", "==", "0", ...
Load a previously created file list or create a new one if none is available.
[ "Load", "a", "previously", "created", "file", "list", "or", "create", "a", "new", "one", "if", "none", "is", "available", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/srtm.py#L89-L109
235,189
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/srtm.py
SRTMTile._avg
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...
python
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...
[ "def", "_avg", "(", "value1", ",", "value2", ",", "weight", ")", ":", "if", "value1", "is", "None", ":", "return", "value2", "if", "value2", "is", "None", ":", "return", "value1", "return", "value2", "*", "weight", "+", "value1", "*", "(", "1", "-", ...
Returns the weighted average of two values and handles the case where one value is None. If both values are None, None is returned.
[ "Returns", "the", "weighted", "average", "of", "two", "values", "and", "handles", "the", "case", "where", "one", "value", "is", "None", ".", "If", "both", "values", "are", "None", "None", "is", "returned", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/srtm.py#L305-L313
235,190
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/srtm.py
SRTMTile.calcOffset
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) ...
python
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) ...
[ "def", "calcOffset", "(", "self", ",", "x", ",", "y", ")", ":", "# Datalayout", "# X = longitude", "# Y = latitude", "# Sample for size 1201x1201", "# ( 0/1200) ( 1/1200) ... (1199/1200) (1200/1200)", "# ( 0/1199) ( 1/1199) ... (1199/1199) (1200/1199)", ...
Calculate offset into data array. Only uses to test correctness of the formula.
[ "Calculate", "offset", "into", "data", "array", ".", "Only", "uses", "to", "test", "correctness", "of", "the", "formula", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/srtm.py#L315-L334
235,191
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/srtm.py
SRTMTile.getPixelValue
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...
python
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...
[ "def", "getPixelValue", "(", "self", ",", "x", ",", "y", ")", ":", "assert", "x", "<", "self", ".", "size", ",", "\"x: %d<%d\"", "%", "(", "x", ",", "self", ".", "size", ")", "assert", "y", "<", "self", ".", "size", ",", "\"y: %d<%d\"", "%", "(",...
Get the value of a pixel from the data, handling voids in the SRTM data.
[ "Get", "the", "value", "of", "a", "pixel", "from", "the", "data", "handling", "voids", "in", "the", "SRTM", "data", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/srtm.py#L336-L347
235,192
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/srtm.py
SRTMTile.getAltitudeFromLatLon
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 ...
python
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 ...
[ "def", "getAltitudeFromLatLon", "(", "self", ",", "lat", ",", "lon", ")", ":", "# print \"-----\\nFromLatLon\", lon, lat", "lat", "-=", "self", ".", "lat", "lon", "-=", "self", ".", "lon", "# print \"lon, lat\", lon, lat", "if", "lat", "<", "0.0", "or", "lat", ...
Get the altitude of a lat lon pair, using the four neighbouring pixels for interpolation.
[ "Get", "the", "altitude", "of", "a", "lat", "lon", "pair", "using", "the", "four", "neighbouring", "pixels", "for", "interpolation", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_map/srtm.py#L350-L377
235,193
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/modules/lib/mavmemlog.py
mavmemlog.rewind
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 = {}
python
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 = {}
[ "def", "rewind", "(", "self", ")", ":", "self", ".", "_index", "=", "0", "self", ".", "percent", "=", "0", "self", ".", "messages", "=", "{", "}", "self", ".", "_flightmode_index", "=", "0", "self", ".", "_timestamp", "=", "None", "self", ".", "fli...
rewind to start
[ "rewind", "to", "start" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/modules/lib/mavmemlog.py#L68-L76
235,194
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/mavparm.py
MAVParmDict.mavset
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...
python
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...
[ "def", "mavset", "(", "self", ",", "mav", ",", "name", ",", "value", ",", "retries", "=", "3", ")", ":", "got_ack", "=", "False", "while", "retries", ">", "0", "and", "not", "got_ack", ":", "retries", "-=", "1", "mav", ".", "param_set_send", "(", "...
set a parameter on a mavlink connection
[ "set", "a", "parameter", "on", "a", "mavlink", "connection" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/mavparm.py#L17-L36
235,195
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/mavparm.py
MAVParmDict.save
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...
python
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...
[ "def", "save", "(", "self", ",", "filename", ",", "wildcard", "=", "'*'", ",", "verbose", "=", "False", ")", ":", "f", "=", "open", "(", "filename", ",", "mode", "=", "'w'", ")", "k", "=", "list", "(", "self", ".", "keys", "(", ")", ")", "k", ...
save parameters to a file
[ "save", "parameters", "to", "a", "file" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/mavparm.py#L39-L51
235,196
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/mavparm.py
MAVParmDict.load
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: ...
python
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: ...
[ "def", "load", "(", "self", ",", "filename", ",", "wildcard", "=", "'*'", ",", "mav", "=", "None", ",", "check", "=", "True", ")", ":", "try", ":", "f", "=", "open", "(", "filename", ",", "mode", "=", "'r'", ")", "except", ":", "print", "(", "\...
load parameters from a file
[ "load", "parameters", "from", "a", "file" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/mavparm.py#L54-L100
235,197
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/mavparm.py
MAVParmDict.diff
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)...
python
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)...
[ "def", "diff", "(", "self", ",", "filename", ",", "wildcard", "=", "'*'", ")", ":", "other", "=", "MAVParmDict", "(", ")", "if", "not", "other", ".", "load", "(", "filename", ")", ":", "return", "keys", "=", "sorted", "(", "list", "(", "set", "(", ...
show differences with another parameter file
[ "show", "differences", "with", "another", "parameter", "file" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/mavparm.py#L109-L123
235,198
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/generator/mavgen_java.py
generate
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])
python
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])
[ "def", "generate", "(", "basename", ",", "xml_list", ")", ":", "for", "xml", "in", "xml_list", ":", "generate_one", "(", "basename", ",", "xml", ")", "generate_enums", "(", "basename", ",", "xml", ")", "generate_MAVLinkMessage", "(", "basename", ",", "xml_li...
generate complete MAVLink Java implemenation
[ "generate", "complete", "MAVLink", "Java", "implemenation" ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/generator/mavgen_java.py#L611-L617
235,199
JdeRobot/base
src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/autoquad.py
MAVLink.aq_telemetry_f_encode
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 ...
python
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 ...
[ "def", "aq_telemetry_f_encode", "(", "self", ",", "Index", ",", "value1", ",", "value2", ",", "value3", ",", "value4", ",", "value5", ",", "value6", ",", "value7", ",", "value8", ",", "value9", ",", "value10", ",", "value11", ",", "value12", ",", "value1...
Sends up to 20 raw float values. Index : Index of message (uint16_t) value1 : value1 (float) value2 : value2 (float) value3 : value3 (float) value4 ...
[ "Sends", "up", "to", "20", "raw", "float", "values", "." ]
303b18992785b2fe802212f2d758a60873007f1f
https://github.com/JdeRobot/base/blob/303b18992785b2fe802212f2d758a60873007f1f/src/drivers/MAVLinkServer/MAVProxy/pymavlink/dialects/v10/autoquad.py#L7321-L7348