def __init__(self, attr_list):
        Displayable.__init__(self)
        name, density, cs_area = self.process_input(attr_list)

        self.name = name
        self.density = density
        self.cs_area = cs_area
示例#2
0
    def __init__(self, attr_list):
        Displayable.__init__(self)
        name, length, width = self.process_input(attr_list)

        self.name = name
        self.length = length
        self.width = width
    def __init__(self, attr_list):
        Displayable.__init__(self)
        name, density, thickness = self.process_input(attr_list)

        self.name = name
        self.density = density
        self.thickness = thickness
示例#4
0
    def __init__(self, attr_list):
        Displayable.__init__(self)
        name, weight, Kv, body_diameter, cost = self.process_input(attr_list)

        self.name = name
        self.weight = weight
        self.Kv = Kv
        self.body_diameter = body_diameter
        self.cost = cost
示例#5
0
 def __init__(self, attr_list):
     Displayable.__init__(self)
     name, weight, xdim, ydim, zdim, req_layer, req_orient = self.process_input(attr_list)
     self.name = name
     self.weight = weight
     self.xdim = xdim
     self.ydim = ydim
     self.zdim = zdim
     self.req_layer = req_layer
     self.req_orient = req_orient
    def __init__(self, attr_list):
        Displayable.__init__(self)
        name, weight, diameter, pitch, n_blades, cost = self.process_input(attr_list)

        self.name = name
        self.weight = weight
        self.diameter = diameter
        self.pitch = pitch
        self.n_blades = n_blades
        self.cost = cost
示例#7
0
    def __init__(self, attr_list):
        """
        attr_list = [['name'], ['length_val', 'length_unit'], ['width_val, 'width_unit'], ['height_val', 'height_unit']]
        """
        Displayable.__init__(self)
        name, length, width, height = self.process_input(attr_list)

        self.name = name
        self.length = length
        self.width = width
        self.height = height
示例#8
0
    def __init__(self, performance=None):
        Displayable.__init__(self)

        if performance is None:
            performance = [0] * len(self.perf_attr_names)

        weight, max_payload, max_endurance, max_dimension, build_time = performance

        self.weight = weight
        self.max_payload = max_payload
        self.max_endurance = max_endurance
        self.max_dimension = max_dimension
        self.build_time = build_time
    def __init__(self, attr_list):
        Displayable.__init__(self)
        motor, prop, test_bat_volt_rating, current_vec, voltage_vec, pwr_vec,\
            rpm_vec, throttle_vec, thrust_vec = self.process_input(attr_list)

        self.motor = motor
        self.prop = prop
        self.test_bat_volt_rating = test_bat_volt_rating
        self.current_vec = current_vec
        self.voltage_vec = voltage_vec
        self.pwr_vec = pwr_vec
        self.rpm_vec = rpm_vec
        self.throttle_vec = throttle_vec
        self.thrust_vec = thrust_vec
        self.max_thrust = {'value': max(self.thrust_vec['value']), 'unit': self.thrust_vec['unit']}
        self.name = "%s/%s" % (self.motor.name, self.prop.name)
示例#10
0
    def __init__(self, attr_list):
        """
        The relationship between mass and capacity is given in Gur and Rosen in units of kg and Wh:
        Capacity[W*h] = 4.04 * (mass[kg])**2 + 139 * mass[kg] + 0.0155

        Note: The inputs to the class are lists of either length 1 if the input has no units or length 2 if the input
        has units; e.g., weight = [weight_val, weight_unit]
        """
        Displayable.__init__(self)
        name, battery_type, weight, mass, capacity, voltage, cells, cost, xdim, ydim, zdim = self.process_input(
            attr_list
        )

        self.name = name
        self.battery_type = battery_type
        self.weight = weight
        self.mass = mass
        self.capacity = capacity
        self.voltage = voltage
        self.cells = cells
        self.cost = cost
        self.xdim = xdim
        self.ydim = ydim
        self.zdim = zdim