micloc.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:sound_source_localization 作者: povidanius 项目源码 文件源码
def __init__(self,N):

    self.time = 0
    self.samplesPerUSec = 0
    self.data = []
    self.corr = np.zeros((4,4))
    self.shifts = np.zeros((4,4), dtype=np.int)
    self.tdoa = np.zeros((4,4))
    self.event_index = -1
    spacing = 0.217
    self.speed_of_sound = 343.0
    self.ser = serial.Serial(
            port='/dev/ttyACM0',\
            baudrate=9600,\
            parity=serial.PARITY_NONE,\
            stopbits=serial.STOPBITS_ONE,\
            bytesize=serial.EIGHTBITS,\
            timeout=None)
    self.ser.flushInput()
        self.ser.flushOutput()

    self.locator = LocationCalculator()
    self.locator.simulate()
    time.sleep(5)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号