Esempio n. 1
0
    def plotDrone(self, drones):
        pl.cla()
        i = 0
        self.fig = pl.figure(self.figNum)
        self.axis3d = self.fig.add_subplot(111, projection='3d')
        self.setProperties()

        for uav in drones:
            ani.draw3d(self.axis3d, uav.xyz, uav.Rot_bn(), uavColours[i])
            if i != len(uavColours):
                i = i + 1
            else:
                i = 0
        pl.pause(0.001)
        pl.draw()
Esempio n. 2
0
def plotDrones(graph, droneSet, t):
    uavColours = ['r','g','b','k','y','c','m','w']
    count = 0
    graph.cla()
    for uav in droneSet:
        ani.draw3d(graph, uav.xyz, uav.Rot_bn(), uavColours[count])
        if count <= len(uavColours):
            count +=1
        else:
            count = 0

    graph.set_xlim(-5, 5)
    graph.set_ylim(-5, 5)
    graph.set_zlim(0, 10)
    graph.set_xlabel('South [m]')
    graph.set_ylabel('East [m]')
    graph.set_zlabel('Up [m]')
    graph.set_title("Time %.3f s" %t)
    pl.pause(0.001)
    pl.draw()