Ejemplo n.º 1
0
def exp_jiao_environment():
    map = ExpSetting.getBasicMap()
    fig = MapFigure(map)
    fig.drawMapByFeatures()
    fig.setXYLabel(u'距离/mm', u'距离/mm')
    fig.setXYLim(0, 2500, 0, 3200)
    fig.showFigure()
Ejemplo n.º 2
0
def drawMeasurePoint(radar_data, rag, p=[0, 0]):
    # 绘图
    xs = [x[0] for x in radar_data]
    ys = [x[1] for x in radar_data]

    fig = MapFigure(map)
    fig.drawMapByFeatures()

    colors = ['b.', 'r.', 'g.', 'b.', 'r.', 'g.', 'b.', 'r.', 'g.']
    for i in range(len(rag)):
        s = rag[i][0]
        e = rag[i][1]
        fig.drawRadarPoints(xs[s:e], ys[s:e], colors[i])

    fig.drawRadarPoints([p[0]], [p[1]], 'wo')

    fig.setXYLim(0, 2000, 0, 3000)
    fig.showFigure()
Ejemplo n.º 3
0
    radar_data = radar.getMeasureData(map, radar_pos)

    bps = DBSCAN.getBreakPoints(radar_data, radar_pos)
    rag = DBSCAN.getFeatureRange(radar_data, radar_pos)
    for i in range(len(radar_data)):
        print i, radar_data[i]
    print bps
    print rag

    p1 = Split.getSingleSplitPoint(radar_data, rag[0])
    print p1
    p2s = Split.getAroundIdx(radar_data, p1, 25)

    xs = [x[0] for x in radar_data]
    ys = [x[1] for x in radar_data]

    fig = MapFigure(map)
    fig.drawMapByFeatures()

    colors = ['b.', 'r.', 'g.']
    for i in range(len(rag)):
        s = rag[i][0]
        e = rag[i][1]
        fig.drawRadarPoints(xs[s:e], ys[s:e], colors[i])
    fig.drawRadarPoints(xs[p1], ys[p1], 'wo')
    fig.drawRadarPoints(xs[p2s[0]], ys[p2s[0]], 'wo')
    fig.drawRadarPoints(xs[p2s[1]], ys[p2s[1]], 'wo')

    fig.setXYLim(0, 2000, 0, 2000)
    fig.showFigure()